Factorize common code out of the InstructionSimplify shift logic. Add in
authorDuncan Sands <baldrick@free.fr>
Fri, 14 Jan 2011 14:44:12 +0000 (14:44 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 14 Jan 2011 14:44:12 +0000 (14:44 +0000)
commitcf80bc1d4ac741620641c2bf48c25993bd478bd0
tree33e12d88f7d8cd3788cad49194fbfd105501dcf2
parent62becca681d04ad72079b4733a96f97ba3caa109
Factorize common code out of the InstructionSimplify shift logic.  Add in
threading of shifts over selects and phis while there.  This fires here and
there in the testsuite, to not much effect.  For example when compiling spirit
it fires 5 times, during early-cse, resulting in 6 more cse simplifications,
and 3 more terminators being folded by jump threading, but the final bitcode
doesn't change in any interesting way: other optimizations would have caught
the opportunity anyway, only later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123441 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/2011-01-14-Thread.ll [new file with mode: 0644]