[llvm] [VPlan][NFCI] Small code quality fixes in VPlanHCFGBuilder (PR #134324)
    Florian Hahn via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Apr 11 12:58:26 PDT 2025
    
    
  
================
@@ -423,7 +424,7 @@ void PlainCFGBuilder::buildPlainCFG(
     BasicBlock *IRSucc1 = BI->getSuccessor(1);
     VPBasicBlock *Successor0 = getOrCreateVPBB(IRSucc0);
     VPBasicBlock *Successor1 = getOrCreateVPBB(IRSucc1);
-    if (BB == LoopForBB->getLoopLatch()) {
+    if (BB == LoopForBB->getLoopLatch() && Region) {
----------------
fhahn wrote:
If anything, an assert should be added. FYI the code will probably go away in the near future: https://github.com/llvm/llvm-project/pull/129402
https://github.com/llvm/llvm-project/pull/134324
    
    
More information about the llvm-commits
mailing list