[llvm] [LoopInterchange] Bail out early if minimum loop nest is not met (PR #115128)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov 13 20:18:20 PST 2024
    
    
  
================
@@ -416,11 +424,11 @@ struct LoopInterchange {
 
   bool processLoopList(SmallVectorImpl<Loop *> &LoopList) {
     bool Changed = false;
-    unsigned LoopNestDepth = LoopList.size();
-    if (LoopNestDepth < 2) {
-      LLVM_DEBUG(dbgs() << "Loop doesn't contain minimum nesting level.\n");
+
+    if (!hasMinimumLoopDepth(LoopList))
----------------
CongzheUalberta wrote:
Yes I think it makes sense to convert it to an assert here.
https://github.com/llvm/llvm-project/pull/115128
    
    
More information about the llvm-commits
mailing list