llvm-project/llvm/unittests/Analysis
Max Kazantsev 65cb9d79a2 [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond
We have a lot of various bugs that are caused by misuse of SCEV (in particular in LV),
all of them can simply be described as "we ask SCEV to prove some fact on invalid IR".
Some of examples of those are PR36311, PR37221, PR39160.

The problem is that these failues manifest differently (what we saw was failure of various
asserts across SCEV, but there can also be miscompiles). This patch adds an assert into two
SCEV methods that strongly rely on correctness of the IR and are involved in known failues.
This will at least allow us to have a clear indication of what was wrong in this case.

This patch also fixes a unit test with incorrect IR that fails this verification.

Differential Revision: https://reviews.llvm.org/D52930
Reviewed By: fhahn

llvm-svn: 346389
2018-11-08 05:07:58 +00:00
..
AliasAnalysisTest.cpp Replace most users of UnknownSize with LocationSize::unknown(); NFC 2018-10-10 21:28:44 +00:00
AliasSetTrackerTest.cpp [AliasSetTracker] Misc cleanup (NFCI) 2018-11-01 23:37:51 +00:00
BasicAliasAnalysisTest.cpp [Analysis] Make LocationSizes carry an 'imprecise' bit 2018-10-10 06:39:40 +00:00
BlockFrequencyInfoTest.cpp [BFI] Use rounding while computing profile counts. 2018-08-16 00:26:59 +00:00
BranchProbabilityInfoTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
CFGTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
CGSCCPassManagerTest.cpp [New PM] Introducing PassInstrumentation framework 2018-09-20 17:08:45 +00:00
CMakeLists.txt [DA] DivergenceAnalysis for unstructured, reducible CFGs 2018-10-18 09:38:44 +00:00
CallGraphTest.cpp
DivergenceAnalysisTest.cpp DivergenceAnalysisTest: fix use of uninitialized memory 2018-10-18 12:54:39 +00:00
GlobalsModRefTest.cpp GlobalsModRef: Ensure optnone+readonly/readnone attributes are respected 2017-06-07 21:37:39 +00:00
LazyCallGraphTest.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
LoopInfoTest.cpp [LoopInfo][FIX] Remove leftover dump in unit test 2018-09-11 17:49:43 +00:00
MemoryBuiltinsTest.cpp
MemorySSATest.cpp llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
OrderedBasicBlockTest.cpp [OrderedBasicBlock] Return false for comesBefore(A, A) 2017-06-02 13:10:31 +00:00
OrderedInstructionsTest.cpp Rename a few unittests/.../Foo.cpp files to FooTest.cpp 2018-09-03 12:43:26 +00:00
PhiValuesTest.cpp [PhiValues] Adjust unit test to invalidate instructions before deleting them 2018-06-28 15:17:07 +00:00
ProfileSummaryInfoTest.cpp Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
ScalarEvolutionTest.cpp [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond 2018-11-08 05:07:58 +00:00
SparsePropagation.cpp [SparsePropagation] Enable interprocedural analysis 2017-10-16 17:44:17 +00:00
TBAATest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
TargetLibraryInfoTest.cpp Fix unit tests after patch https://reviews.llvm.org/rL346313 2018-11-07 14:46:26 +00:00
UnrollAnalyzerTest.cpp Rename a few unittests/.../Foo.cpp files to FooTest.cpp 2018-09-03 12:43:26 +00:00
ValueLatticeTest.cpp [ValueLattice] Return false if value range did not change in mergeIn. 2018-06-27 12:57:51 +00:00
ValueTrackingTest.cpp [ValueTracking] determine sign of 0.0 from select when matching min/max FP 2018-11-04 14:28:48 +00:00