[llvm] 45c672e - [runtimeunroll] Under EXPENSIVE_CHECKS, validate loop info

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 2 16:28:52 PDT 2021


Author: Philip Reames
Date: 2021-09-02T16:28:46-07:00
New Revision: 45c672e20d40be1f6dfc68ff0ee5347c91833d7c

URL: https://github.com/llvm/llvm-project/commit/45c672e20d40be1f6dfc68ff0ee5347c91833d7c
DIFF: https://github.com/llvm/llvm-project/commit/45c672e20d40be1f6dfc68ff0ee5347c91833d7c.diff

LOG: [runtimeunroll] Under EXPENSIVE_CHECKS, validate loop info

Requested in review comment on D108476

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index 86aa43c99ede4..105c628fe0cfa 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -939,10 +939,12 @@ bool llvm::UnrollRuntimeLoopRemainder(
   // of its parent loops, so the Scalar Evolution pass needs to be run again.
   SE->forgetTopmostLoop(L);
 
-  // Verify that the Dom Tree is correct.
+  // Verify that the Dom Tree and Loop Info are correct.
 #if defined(EXPENSIVE_CHECKS) && !defined(NDEBUG)
-  if (DT)
+  if (DT) {
     assert(DT->verify(DominatorTree::VerificationLevel::Full));
+    LI->verify(*DT);
+  }
 #endif
 
   // For unroll factor 2 remainder loop will have 1 iteration.


        


More information about the llvm-commits mailing list