Skip to content

Commit ca39bbc

Browse files
committed
Guard nvvm intrinsic folding with StrictFP check
1 parent 387a299 commit ca39bbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,6 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) {
17991799
case Intrinsic::nvvm_d2ull_rn:
18001800
case Intrinsic::nvvm_d2ull_rp:
18011801
case Intrinsic::nvvm_d2ull_rz:
1802-
return !Call->isStrictFP();
18031802

18041803
// NVVM math intrinsics:
18051804
case Intrinsic::nvvm_ceil_d:
@@ -1861,6 +1860,7 @@ bool llvm::canConstantFoldCallTo(const CallBase *Call, const Function *F) {
18611860
case Intrinsic::nvvm_sqrt_rn_ftz_f:
18621861
case Intrinsic::nvvm_sqrt_approx_f:
18631862
case Intrinsic::nvvm_sqrt_approx_ftz_f:
1863+
return !Call->isStrictFP();
18641864

18651865
// Sign operations are actually bitwise operations, they do not raise
18661866
// exceptions even for SNANs.

0 commit comments

Comments
 (0)