llvm-6502/test/Analysis
Benjamin Kramer 19ea37059a SCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive.
We can't do this for the general case as saying a GEP with a negative index
doesn't have unsigned wrap isn't valid for negative indices.
  %gep = getelementptr inbounds i32* %p, i64 -1

But an inbounds GEP cannot run past the end of address space. So we check for
the very common case of a positive index and make GEPs derived from that NUW.
Together with Andy's recent non-unit stride work this lets us analyze loops
like

  void foo3(int *a, int *b) {
    for (; a < b; a++) {}
  }

PR12375, PR12376.

Differential Revision: http://llvm-reviews.chandlerc.com/D2033

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 07:30:06 +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 [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +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 SCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive. 2013-10-28 07:30:06 +00:00
TypeBasedAliasAnalysis Simplify testing case (Thanks Rafael for the testing case). 2013-10-22 18:15:50 +00:00