From: Sanjoy Das Date: Mon, 24 Apr 2017 00:41:58 +0000 (+0000) Subject: [SCEV] Enable SCEV verification by default in EXPENSIVE_CHECKS builds X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57106e79634ce89fe3480101187492c15e5ba3b0;p=llvm [SCEV] Enable SCEV verification by default in EXPENSIVE_CHECKS builds git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301150 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index fa9d1e326c2..390e495b92b 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -114,9 +114,16 @@ MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden, cl::init(100)); // FIXME: Enable this with EXPENSIVE_CHECKS when the test suite is clean. -static cl::opt -VerifySCEV("verify-scev", - cl::desc("Verify ScalarEvolution's backedge taken counts (slow)")); +static cl::opt VerifySCEV( + "verify-scev", + cl::desc("Verify ScalarEvolution's backedge taken counts (slow)"), +#ifdef EXPENSIVE_CHECKS + cl::init(true) +#else + cl::init(false) +#endif + ); + static cl::opt VerifySCEVMap("verify-scev-maps", cl::desc("Verify no dangling value in ScalarEvolution's " diff --git a/test/Transforms/LoopUnswitch/2008-11-03-Invariant.ll b/test/Transforms/LoopUnswitch/2008-11-03-Invariant.ll index 90c0944e38d..01ef37122a1 100644 --- a/test/Transforms/LoopUnswitch/2008-11-03-Invariant.ll +++ b/test/Transforms/LoopUnswitch/2008-11-03-Invariant.ll @@ -1,5 +1,5 @@ ; REQUIRES: asserts -; RUN: opt < %s -loop-unswitch -stats -disable-output 2>&1 | grep "1 loop-unswitch - Number of branches unswitched" | count 1 +; RUN: opt < %s -loop-unswitch -stats -disable-output 2>&1 | grep "1 loop-unswitch[ ]*-[ ]*Number of branches unswitched" | count 1 ; PR 3170 define i32 @a(i32 %x, i32 %y) nounwind { entry: