[Constant Hoisting] Fix insertion point for constant materialization.
authorJuergen Ributzka <juergen@apple.com>
Sat, 8 Feb 2014 00:20:49 +0000 (00:20 +0000)
committerJuergen Ributzka <juergen@apple.com>
Sat, 8 Feb 2014 00:20:49 +0000 (00:20 +0000)
commit6f1819f2e6465d9a29b25b49a4d60864e50946f6
treea684277e9ce60fdf862d5b0771d1efaf1b403bea
parent1368e659d7f5f5b1f87268a9a4c8265b29879320
[Constant Hoisting] Fix insertion point for constant materialization.

The bitcast instruction during constant materialization was not placed correcly
in the presence of phi nodes. This commit fixes the insertion point to be in the
idom instead.

This fixes PR18768

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201009 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ConstantHoisting.cpp
test/Transforms/ConstantHoisting/X86/phi.ll