[llvm] [AMDGPU] Quiet signaling NaN when constant-folding CLAMP (PR #207902)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 01:03:25 PDT 2026
================
@@ -18503,6 +18503,9 @@ SDValue SITargetLowering::performClampCombine(SDNode *N,
if (F > One)
return DCI.DAG.getConstantFP(One, SDLoc(N), N->getValueType(0));
+ if (F.isSignaling())
----------------
aobolensk wrote:
I have tried routing through getCanonicalConstantFP, but it makes existing v_clamp_constant_preserve_denorm_f32 test failed due to the fact that 0x7fffff is being folded to just 0. I'm not sure this is a good way or maybe I'm missing something
https://github.com/llvm/llvm-project/pull/207902
More information about the llvm-commits
mailing list