Reapply r198654 "indvars: sink truncates outside the loop."
authorAndrew Trick <atrick@apple.com>
Tue, 7 Jan 2014 06:59:12 +0000 (06:59 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 7 Jan 2014 06:59:12 +0000 (06:59 +0000)
commitb4e0c9b85d7a6c5adc05059c85e4cc52dd2d92b2
treec8b16585c3a5a3b28dd9709ab2cadbc6023b4e80
parenta4d123f4610be7603767629c793614bd4ec15907
Reapply r198654 "indvars: sink truncates outside the loop."

This doesn't seem to have actually broken anything. It was paranoia
on my part. Trying again now that bots are more stable.

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@198678 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
test/Transforms/IndVarSimplify/iv-widen.ll