OSDN Git Service

IndVarSimplify: Allow LFTR to fire more often
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 18 Nov 2014 02:20:58 +0000 (02:20 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 18 Nov 2014 02:20:58 +0000 (02:20 +0000)
commit1ade0f0faa98877b688e0b9da58e876052c1e04e
treefb0308a459d4bcc18d0f19c13bf5192bd9056cb2
parent5d8a792eac56c8f6e7743b9ceda0e4ab13391071
IndVarSimplify: Allow LFTR to fire more often

I added a pessimization in r217102 to prevent miscompiles when the
incremented induction variable was used in a comparison; it would be
poison.

Try to use the incremented induction variable more often when we can be
sure that the increment won't end in poison.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222213 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/lftr-extend-const.ll