[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 14:38:33 PDT 2025


================
@@ -514,6 +546,11 @@ void VPBasicBlock::execute(VPTransformState *State) {
 
   // 2. Fill the IR basic block with IR instructions.
   executeRecipes(State, NewBB);
+
+  // If this block is a latch, update CurrentParentLoop.
----------------
ayalz wrote:

```suggestion
  // If this block is a latch, update CurrentParentLoop. The second successor of a latch is a header, with the other successor being an exit/middle.
```
Wrapping in `VPBlockUtils::isLatch()` may be clearer?

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


More information about the llvm-commits mailing list