[libclc] 303400f - [libclc] Use __CLC_SCALAR instead of nonexistant __CLC_SCALAR1 for sin (#203807)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 14 18:33:40 PDT 2026
Author: Joseph Huber
Date: 2026-06-14T20:33:36-05:00
New Revision: 303400f0809a808d0f478c05eeaf0073d6fa149a
URL: https://github.com/llvm/llvm-project/commit/303400f0809a808d0f478c05eeaf0073d6fa149a
DIFF: https://github.com/llvm/llvm-project/commit/303400f0809a808d0f478c05eeaf0073d6fa149a.diff
LOG: [libclc] Use __CLC_SCALAR instead of nonexistant __CLC_SCALAR1 for sin (#203807)
Summary:
This seems to be a typo? Every other case is guarded by `__CLC_SCALAR`
but this case had a `1` after it. Removing this improved performance on
sin/cos/tan to match the ROCm version.
Added:
Modified:
libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
Removed:
################################################################################
diff --git a/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc b/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
index 059ac8a128322..42eacc97ddd1c 100644
--- a/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
+++ b/libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc
@@ -257,7 +257,7 @@ _CLC_DEF _CLC_OVERLOAD __CLC_INTN __clc_argReductionS(
private __CLC_DOUBLEN *r_lo, private __CLC_DOUBLEN *r_hi, __CLC_DOUBLEN x) {
__CLC_LONGN is_large = x >= (__CLC_DOUBLEN)0x1.0p+30;
-#ifdef __CLC_SCALAR1
+#ifdef __CLC_SCALAR
if (is_large)
return __clc_remainder_piby2_large(x, r_lo, r_hi);
return __clc_remainder_piby2_small(x, r_lo, r_hi);
More information about the cfe-commits
mailing list