scalarizePHI needs to insert the next ExtractElement in the same block
authorJoey Gouly <joey.gouly@arm.com>
Fri, 24 May 2013 12:29:54 +0000 (12:29 +0000)
committerJoey Gouly <joey.gouly@arm.com>
Fri, 24 May 2013 12:29:54 +0000 (12:29 +0000)
commit4a941316cdcfbc3671c806c9c40df1bad09ba6ad
tree5ac3f64e9853eaace017dc109c5871e4dd04e54e
parent77226a03dca98e6237c1068f2652fe41bea7b687
scalarizePHI needs to insert the next ExtractElement in the same block
as the BinaryOperator, *not* in the block where the IRBuilder is currently
inserting into. Fixes a bug where scalarizePHI would create instructions
that would not dominate all uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182639 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/vec_phi_extract.ll