[llvm] [VPlan] Refactor VPlan creation, add transform introducing region (NFC). (PR #128419)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 14:36:24 PST 2025


================
@@ -180,7 +180,7 @@ VPBasicBlock *PlainCFGBuilder::getOrCreateVPBB(BasicBlock *BB) {
 
   // Get or create a region for the loop containing BB.
   Loop *LoopOfBB = LI->getLoopFor(BB);
-  if (!LoopOfBB || !doesContainLoop(LoopOfBB, TheLoop))
+  if (!LoopOfBB || LoopOfBB == TheLoop || !doesContainLoop(LoopOfBB, TheLoop))
----------------
ayalz wrote:

Drop the `if (LoopOfBB == TheLoop) {` case below which is now dead.

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


More information about the llvm-commits mailing list