indvars: sink truncates outside the loop.
authorAndrew Trick <atrick@apple.com>
Tue, 7 Jan 2014 01:02:55 +0000 (01:02 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 7 Jan 2014 01:02:55 +0000 (01:02 +0000)
commitced88c5918851fb6b34c247471a7d2b62f806a01
tree10ad09333a8308887a1414dfb4642c930c5e0f60
parentf86063e7ec333becdc083735273e93335bc4ac18
indvars: sink truncates outside the loop.

This is a follow up of the r198338 commit that added truncates for
lcssa phi nodes. Sinking the truncates below the phis cleans up the
loop and simplifies subsequent analysis within the indvars pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198654 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/iv-widen.ll