[llvm] [InstCombine] Propagate poison pow[i] (PR #146750)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 4 14:28:57 PDT 2025


================
@@ -6793,6 +6793,9 @@ static Value *simplifyIntrinsic(CallBase *Call, Value *Callee,
   Function *F = cast<Function>(Callee);
   Intrinsic::ID IID = F->getIntrinsicID();
 
+  if (IID != Intrinsic::not_intrinsic && intrinsicPropagatesPoison(IID) &&
+      any_of(Args, IsaPred<PoisonValue>))
+    return PoisonValue::get(F->getReturnType());
----------------
lukel97 wrote:

Ah right, I see it's caused some other intrinsics to be constant folded so we should update the PR title too

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


More information about the llvm-commits mailing list