[llvm] [ConstantFold] Fold `tgamma` and `tgammaf` when the input parameter is a constant value. (PR #114065)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 08:06:05 PDT 2024
================
@@ -3629,6 +3639,10 @@ bool llvm::isMathLibCallNoop(const CallBase *Call,
case LibFunc_sqrtf:
return Op.isNaN() || Op.isZero() || !Op.isNegative();
+ case LibFunc_tgamma:
+ case LibFunc_tgammaf:
+ return true;
----------------
c8ef wrote:
Since we explicitly limit the input range, it should be safe to return *true* here. Ideally, this function could be integrated into the constant folding process.
https://github.com/llvm/llvm-project/pull/114065
More information about the llvm-commits
mailing list