implement PR4895, by making FoldOpIntoPhi handle select conditions
authorChris Lattner <sabre@nondot.org>
Sun, 27 Sep 2009 19:57:57 +0000 (19:57 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 27 Sep 2009 19:57:57 +0000 (19:57 +0000)
commit5d1704ddbf6d6471f4e8f9e0b27ab844d80e8172
tree7d93c24bdd678e24348097b2e167e3c4c837ff82
parentcec545097cf1a81c0936cf62e39a81940d9f720f
implement PR4895, by making FoldOpIntoPhi handle select conditions
that are phi nodes.  Also tighten up FoldOpIntoPhi to treat constantexpr
operands to phis just like other variables, avoiding moving constantexpr
computations around.

Patch by Daniel Dunbar.

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