[SCEV] Fix unused variable warning (NFC)
authorNikita Popov <npopov@redhat.com>
Sat, 11 Dec 2021 20:02:37 +0000 (21:02 +0100)
committerNikita Popov <npopov@redhat.com>
Sat, 11 Dec 2021 20:03:54 +0000 (21:03 +0100)
llvm/lib/Analysis/ScalarEvolution.cpp

index 2e2aa76..8ea448e 100644 (file)
@@ -13057,11 +13057,13 @@ void ScalarEvolution::verify() const {
     Worklist.append(L->begin(), L->end());
   }
   for (auto &KV : ValueExprMap) {
+#ifndef NDEBUG
     // Check for SCEV expressions referencing invalid/deleted loops.
     if (auto *AR = dyn_cast<SCEVAddRecExpr>(KV.second)) {
       assert(ValidLoops.contains(AR->getLoop()) &&
              "AddRec references invalid loop");
     }
+#endif
 
     // Check that the value is also part of the reverse map.
     auto It = ExprValueMap.find(KV.second);