[llvm] [InstCombine] foldOpIntoPhi should apply to icmp with non-constant operand (PR #147676)

Ross Kirsling via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 04:16:16 PDT 2025


================
@@ -7699,6 +7695,10 @@ Instruction *InstCombinerImpl::visitICmpInst(ICmpInst &I) {
   if (Instruction *New = foldSignBitTest(I))
     return New;
 
+  if (auto *PN = dyn_cast<PHINode>(Op0))
----------------
rkirsling wrote:

Done, thanks!

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


More information about the llvm-commits mailing list