[llvm] [InstCombine] Allow freezing multiple operands (PR #154336)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 09:03:46 PDT 2025


================
@@ -4961,63 +4961,68 @@ Instruction *InstCombinerImpl::visitLandingPadInst(LandingPadInst &LI) {
 Value *
 InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(FreezeInst &OrigFI) {
   // Try to push freeze through instructions that propagate but don't produce
-  // poison as far as possible.  If an operand of freeze follows three
-  // conditions 1) one-use, 2) does not produce poison, and 3) has all but one
-  // guaranteed-non-poison operands then push the freeze through to the one
-  // operand that is not guaranteed non-poison.  The actual transform is as
-  // follows.
+  // poison as far as possible. If an operand of freeze does not produce poison
+  // then push the freeze through to the operands that are not guaranteed
+  // non-poison. The actual transform is as follows.
   //   Op1 = ...                        ; Op1 can be posion
----------------
dtcxzyw wrote:

```suggestion
  //   Op1 = ...                        ; Op1 can be poison
```

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


More information about the llvm-commits mailing list