Refactor some code, making it simpler.
authorChris Lattner <sabre@nondot.org>
Thu, 11 May 2006 17:11:52 +0000 (17:11 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 11 May 2006 17:11:52 +0000 (17:11 +0000)
commit8c8c66a8cd793989e88ee33f0541c1ea60b3cb10
treece0ad76d063d2f27427cda36ac6cefe0b68543f7
parentf4df680ad407b4d3ef127b31abaf40c0dee1c8c1
Refactor some code, making it simpler.
When doing the initial pass of constant folding, if we get a constantexpr,
simplify the constant expr like we would do if the constant is folded in the
normal loop.

This fixes the missed-optimization regression in
Transforms/InstCombine/getelementptr.ll last night.

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