https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/179160
Fix SPIR-V target builds broken since 20c15c7afe97 due to llvm.canonicalize.f32 not supported in SPIR-V. Keep `x` unchanged in the non-quotient path. OpenCL CTS remquo still passes on intel gpu. >From 42cb0479a4ebd4a5d9298fba42d06343b78f6626 Mon Sep 17 00:00:00 2001 From: Wenju He <[email protected]> Date: Mon, 2 Feb 2026 04:33:50 +0100 Subject: [PATCH] [libclc] remquo: avoid canonicalize for float Fix SPIR-V target builds broken since 20c15c7afe97 due to llvm.canonicalize.f32 not supported in SPIR-V. Keep `x` unchanged in the non-quotient path. OpenCL CTS remquo still passes on intel gpu. --- libclc/clc/lib/generic/math/clc_remquo.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libclc/clc/lib/generic/math/clc_remquo.inc b/libclc/clc/lib/generic/math/clc_remquo.inc index 79eef077bf691..f101e1e620019 100644 --- a/libclc/clc/lib/generic/math/clc_remquo.inc +++ b/libclc/clc/lib/generic/math/clc_remquo.inc @@ -70,7 +70,7 @@ _CLC_DEF _CLC_OVERLOAD float __clc_remquo(float x, float y, int qsgn = 1 + (((__clc_as_int(x) ^ __clc_as_int(y)) >> 31) << 1); float t = __clc_fma(y, -(float)qsgn, x); - ret = c ? t : __builtin_elementwise_canonicalize(x); + ret = c ? t : x; q7 = c ? qsgn : q7; ret = ax == ay ? __clc_copysign(0.0f, x) : ret; q7 = ax == ay ? qsgn : q7; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
