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)
commit9a91e4a18ab4ca06af1f03a1b7c80e74dcac2e52
tree19117c874afdf11f3554074d3f6b5f84a098c841
parent4db24cc49beb2fa6659997cbdd07f6b105ce6df7
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

llvm-svn: 222213
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/lftr-extend-const.ll