llvm-6502/test/Analysis
Andrew Trick 10bb82e54f Rewrite SCEV's backedge taken count computation.
Patch by Michele Scandale!

Rewrite of the functions used to compute the backedge taken count of a
loop on LT and GT comparisons.

I decided to split the handling of LT and GT cases becasue the trick
"a > b == -a < -b" in some cases prevents the trip count computation
due to the multiplication by -1 on the two operands of the
comparison. This issue comes from the conservative computation of
value range of SCEVs: taking the negative SCEV of an expression that
have a small positive range (e.g. [0,31]), we would have a SCEV with a
fullset as value range.

Indeed, in the new rewritten function I tried to better handle the
maximum backedge taken count computation when MAX/MIN expression are
used to handle the cases where no entry guard is found.

Some test have been modified in order to check the new value correctly
(I manually check them and reasoning on possible overflow the new
values seem correct).

I finally added a new test case related to the multiplication by -1
issue on GT comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-06 02:08:26 +00:00
..
BasicAA Revert r193251 : Use address-taken to disambiguate global variable and indirect memops. 2013-10-27 03:08:44 +00:00
BlockFrequencyInfo [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
BranchProbabilityInfo Consider (x == -1) unlikely in BranchProbabilityInfo 2013-11-01 10:58:22 +00:00
CallGraph [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
CostModel X86: Custom lower sext v16i8 to v16i16, and the corresponding truncate. 2013-10-23 21:06:07 +00:00
DependenceAnalysis [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Dominators [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
GlobalsModRef [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
Lint Fix lint assert on integer vector division 2013-08-26 23:29:33 +00:00
LoopInfo FileCheck-ize tests. 2013-08-22 00:51:19 +00:00
MemoryDependenceAnalysis [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
PostDominators FileCheck-ize tests. 2013-08-22 00:51:19 +00:00
RegionInfo [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
ScalarEvolution Rewrite SCEV's backedge taken count computation. 2013-11-06 02:08:26 +00:00
TypeBasedAliasAnalysis Simplify testing case (Thanks Rafael for the testing case). 2013-10-22 18:15:50 +00:00