OSDN Git Service

[SCEV] Teach isLoopBackedgeGuardedByCond to exploit trip counts.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 25 Sep 2015 19:59:57 +0000 (19:59 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 25 Sep 2015 19:59:57 +0000 (19:59 +0000)
commit9026ca15f417575439bc02e37634c40c55670bb6
treeef4f1ad70781d3174ea79e62fe6f28446ab590ec
parentf5a027d2d3fd48d0e6a9b853270c7576877cd4cc
[SCEV] Teach isLoopBackedgeGuardedByCond to exploit trip counts.

Summary:
If the trip count of a specific backedge is `N`, then we know that
backedge is effectively guarded by the condition `{0,+,1} u< N`.  This
change teaches SCEV to use this condition to prove things in
`isLoopBackedgeGuardedByCond`.

Depends on D12948
Depends on D12949

Reviewers: atrick, reames, majnemer, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12950

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248608 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/zext-wrap.ll
test/Transforms/IndVarSimplify/eliminate-comparison.ll