[llvm] [ConstantFold] Fold `erf` and `erff` when the input parameter is a constant value. (PR #113079)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 28 20:31:11 PDT 2024
================
@@ -3624,6 +3628,10 @@ bool llvm::isMathLibCallNoop(const CallBase *Call,
case LibFunc_sqrtf:
return Op.isNaN() || Op.isZero() || !Op.isNegative();
+ case LibFunc_erf:
+ case LibFunc_erff:
+ return true;
----------------
arsenm wrote:
You would have to enable strictfp support (which barely works in llvm), or avoid calling the host function in any of the edge cases that you are relying on the exception
https://github.com/llvm/llvm-project/pull/113079
More information about the llvm-commits
mailing list