llvm-project/llvm/test/Transforms/LoopPredication
Anna Thomas 1d02b13eb7 [LoopPredication] Enable predication when latchCheckIV is wider than rangeCheck
Summary:
This patch allows us to predicate range checks that have a type narrower than
the latch check type. We leverage SCEV analysis to identify a truncate for the
latchLimit and latchStart.
There is also safety checks in place which requires the start and limit to be
known at compile time. We require this to make sure that the SCEV truncate expr
for the IV corresponding to the latch does not cause us to lose information
about the IV range.
Added tests show the loop predication over range checks that are of various
types and are narrower than the latch type.
This enhancement has been in our downstream tree for a while.

Reviewers: apilipenko, sanjoy, mkazantsev

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D39500

llvm-svn: 317269
2017-11-02 21:21:02 +00:00
..
basic.ll [LoopPredication] Handle the case when the guard and the latch IV have different offsets 2017-10-27 14:46:17 +00:00
nested.ll [LoopPredication] Check whether the loop is already guarded by the first iteration check condition 2017-10-12 21:21:17 +00:00
visited.ll [LoopPredication] Check whether the loop is already guarded by the first iteration check condition 2017-10-12 21:21:17 +00:00
widened.ll [LoopPredication] Enable predication when latchCheckIV is wider than rangeCheck 2017-11-02 21:21:02 +00:00