Add a missed SCEV fold that is required to continue analyzing the IR produced
authorNick Lewycky <nicholas@mxc.ca>
Wed, 19 Jan 2011 16:59:46 +0000 (16:59 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 19 Jan 2011 16:59:46 +0000 (16:59 +0000)
commit30aa8b13c93211f68bb4efddd1e47817a1d107f1
tree7ade38c10f647ed959557a49079469439b416548
parent3abd75bf1dc96ee0cd7e8c1b8331e27672437b8b
Add a missed SCEV fold that is required to continue analyzing the IR produced
by indvars through the scev expander.

trunc(add x, y) --> add(trunc x, y). Currently SCEV largely folds the other way
which is probably wrong, but preserved to minimize churn. Instcombine doesn't
do this fold either, demonstrating a missed optz'n opportunity on code doing
add+trunc+add.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123838 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/fold.ll