[llvm] [InstCombine] Replace an integer comparison of a `phi` node with multiple `ucmp`/`scmp` operands and a constant with `phi` of individual comparisons of original intrinsic's arguments (PR #107769)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 04:28:48 PDT 2024


================
@@ -1809,8 +1809,8 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN) {
   // Check to see whether the instruction can be folded into each phi operand.
   // If there is one operand that does not fold, remember the BB it is in.
   SmallVector<Value *> NewPhiValues;
-  BasicBlock *NonSimplifiedBB = nullptr;
-  Value *NonSimplifiedInVal = nullptr;
+  SmallVector<unsigned int> OpsToMoveUseTo;
----------------
dtcxzyw wrote:

```suggestion
  SmallVector<unsigned int> OpsToMoveUseToIncomingBB;
```

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


More information about the llvm-commits mailing list