enhance FoldOpIntoPhi in instcombine to try harder when a phi has
authorChris Lattner <sabre@nondot.org>
Sun, 16 Jan 2011 05:28:59 +0000 (05:28 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 16 Jan 2011 05:28:59 +0000 (05:28 +0000)
commit192228edb1c08ca11da2df959072bcaa99eacd63
treecdc7988daef8b656c8d663b006be839b60c8b18e
parentdf55fea807835bc23a2879fbf7f7a8bd53de8256
enhance FoldOpIntoPhi in instcombine to try harder when a phi has
multiple uses.  In some cases, all the uses are the same operation,
so instcombine can go ahead and promote the phi.  In the testcase
this pushes an add out of the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123568 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/InstCombine/phi.ll