Partial fix for bug 22589
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 18 Feb 2015 19:32:25 +0000 (19:32 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 18 Feb 2015 19:32:25 +0000 (19:32 +0000)
commit6da5a456f44bebd9e4f7ca2152933fac9c85a5ce
tree750993486bdd9a5beea7ddc433d52359eff59476
parent23719010dbbca248e817845477fbcec5ae6fb2e9
Partial fix for bug 22589

Don't spend the entire iteration space in the scalar loop prologue if
computing the trip count overflows.  This change also gets rid of the
backedge check in the prologue loop and the extra check for
overflowing trip-count.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229731 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/Transforms/LoopUnroll/runtime-loop.ll
test/Transforms/LoopUnroll/runtime-loop1.ll
test/Transforms/LoopUnroll/tripcount-overflow.ll