Fraser Cormack 7441e87fe0
[libclc] Move several integer functions to CLC library (#116786)
This commit moves over the OpenCL clz, hadd, mad24, mad_hi, mul24,
mul_hi, popcount, rhadd, and upsample builtins to the CLC library.

This commit also optimizes the vector forms of the mul_hi and upsample
builtins to consistently remain in vector types, instead of recursively
splitting vectors down to the scalar form.

The OpenCL mad_hi builtin wasn't previously publicly available from the
CLC libraries, as it was hash-defined to mul_hi in the header files.
That issue has been fixed, and mad_hi is now exposed.

The custom AMD implementation/workaround for popcount has been removed
as it was only required for clang < 7.

There are still two integer functions which haven't been moved over. The
OpenCL mad_sat builtin uses many of the other integer builtins, and
would benefit from optimization for vector types. That can take place in
a follow-up commit. The rotate builtin could similarly use some more
dedicated focus, potentially using clang builtins.
2025-01-29 13:45:33 +00:00

46 lines
1.0 KiB
Plaintext

common/clc_degrees.cl
common/clc_radians.cl
common/clc_smoothstep.cl
geometric/clc_dot.cl
integer/clc_abs.cl
integer/clc_abs_diff.cl
integer/clc_add_sat.cl
integer/clc_clz.cl
integer/clc_hadd.cl
integer/clc_mad24.cl
integer/clc_mul24.cl
integer/clc_mul_hi.cl
integer/clc_popcount.cl
integer/clc_rhadd.cl
integer/clc_sub_sat.cl
integer/clc_upsample.cl
math/clc_ceil.cl
math/clc_copysign.cl
math/clc_fabs.cl
math/clc_floor.cl
math/clc_mad.cl
math/clc_nextafter.cl
math/clc_rint.cl
math/clc_trunc.cl
relational/clc_all.cl
relational/clc_any.cl
relational/clc_bitselect.cl
relational/clc_isequal.cl
relational/clc_isfinite.cl
relational/clc_isgreater.cl
relational/clc_isgreaterequal.cl
relational/clc_isinf.cl
relational/clc_isless.cl
relational/clc_islessequal.cl
relational/clc_islessgreater.cl
relational/clc_isnan.cl
relational/clc_isnormal.cl
relational/clc_isnotequal.cl
relational/clc_isordered.cl
relational/clc_isunordered.cl
relational/clc_select.cl
relational/clc_signbit.cl
shared/clc_clamp.cl
shared/clc_max.cl
shared/clc_min.cl