]> granicus.if.org Git - llvm/commit
[IRCE] Do not process empty safe ranges
authorMax Kazantsev <max.kazantsev@azul.com>
Wed, 11 Oct 2017 06:53:07 +0000 (06:53 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Wed, 11 Oct 2017 06:53:07 +0000 (06:53 +0000)
commit168a8230000ecfefaba6511adea04f1c3eacfc8a
tree18ea4a66f279e38d2775d9561da0afc5455414e1
parentc65eb3a4b70a119da41ff2d3ebce0b037f92cba7
[IRCE] Do not process empty safe ranges

IRCE should not apply when the safe iteration range is proved to be empty.
In this case we do unneeded job creating pre/post loops and then never
go to the main loop.

This patch makes IRCE not apply to empty safe ranges, adds test for this
situation and also modifies one of existing tests where it used to happen
slightly.

Reviewed By: anna
Differential Revision: https://reviews.llvm.org/D38577

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315437 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
test/Transforms/IRCE/correct-loop-info.ll
test/Transforms/IRCE/single-access-no-preloop.ll