[llvm] [SimplifyLibCalls] Move constant folding logic in `ConstantFoldLibCall2` (PR #172139)

Ron Xavier via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 15 08:54:03 PST 2025


================
@@ -3201,18 +3201,8 @@ Value *LibCallSimplifier::optimizeFdim(CallInst *CI, IRBuilderBase &B) {
   if (isa<PoisonValue>(CI->getArgOperand(1)))
     return CI->getArgOperand(1);
----------------
Ronxvier wrote:

Sorry, I'm new to llvm contribution, do you mean poison cases should just be removed entirely? Because as I understand it, ConstantFoldLibCall2 only takes in operands of known constants

https://github.com/llvm/llvm-project/pull/172139


More information about the llvm-commits mailing list