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

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 4 10:02:38 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:

Do we need this bit here? I thought this PR was just adding support for pow[i]

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


More information about the llvm-commits mailing list