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)
commite4a18605e0c56750aa999be92a41b88497460949
treedafba7620b7d53b6c030e511be793e578f3c42cc
parentacafded69c1d1ec0cfd71b0351d6428a609624a5
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.

llvm-svn: 198678
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/iv-widen.ll