https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/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. >From 930eea8e4a1cc038596381cf5e03b6f5dc4f7eed Mon Sep 17 00:00:00 2001 From: Joseph Huber <[email protected]> Date: Sun, 14 Jun 2026 19:13:18 -0500 Subject: [PATCH] [libclc] Use __CLC_SCALAR instead of nonexistant __CLC_SCALAR1 for sin 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. --- libclc/clc/lib/generic/math/clc_sincos_helpers_fp64.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
