[llvm] [VPlan] Invert condition if needed when creating inner regions. (PR #132292)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 14:03:16 PDT 2025


================
@@ -420,6 +420,17 @@ static void createLoopRegion(VPlan &Plan, VPBlockBase *HeaderVPB) {
   auto *PreheaderVPBB = HeaderVPB->getPredecessors()[0];
   auto *LatchVPBB = HeaderVPB->getPredecessors()[1];
 
+  // We are canonicalizing the successors of the latch when introducing the
----------------
ayalz wrote:

```suggestion
  // The two successors of conditional branches match the condition, with the first successor corresponding to true and the second to false.
  // We canonicalize the successors of the latch when introducing the
```

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


More information about the llvm-commits mailing list