[SCEV] Enable verification under EXPENSIVE_CHECKS
authorNikita Popov <npopov@redhat.com>
Mon, 28 Feb 2022 10:18:18 +0000 (11:18 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 7 Mar 2022 08:53:00 +0000 (09:53 +0100)
SCEV verification should no longer affect results of subsequent
queries, and our lit tests as well as llvm-test-suite pass with
SCEV verification enabled, so I think we can enable it by default
under EXPENSIVE_CHECKS now.

Differential Revision: https://reviews.llvm.org/D120708

llvm/lib/Analysis/ScalarEvolution.cpp

index 3381173..94c4249 100644 (file)
@@ -142,8 +142,11 @@ STATISTIC(NumTripCountsNotComputed,
 STATISTIC(NumBruteForceTripCountsComputed,
           "Number of loops with trip counts computed by force");
 
-// FIXME: Enable this with EXPENSIVE_CHECKS when the test suite is clean.
+#ifdef EXPENSIVE_CHECKS
+bool llvm::VerifySCEV = true;
+#else
 bool llvm::VerifySCEV = false;
+#endif
 
 static cl::opt<unsigned>
 MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden,