Merging r259236:
authorHans Wennborg <hans@hanshq.net>
Fri, 29 Jan 2016 21:33:02 +0000 (21:33 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 29 Jan 2016 21:33:02 +0000 (21:33 +0000)
commit5ad5d2c5359a4e878c732db59ee7fc6e0a25dc00
treee4cca57c3dcbe7daf2618e1a067e1730cf947e9a
parentcd30d75375a03a290c6621da13cbab4f10545c56
Merging r259236:
------------------------------------------------------------------------
r259236 | spatel | 2016-01-29 12:21:02 -0800 (Fri, 29 Jan 2016) | 8 lines

[InstCombine] avoid an insertelement transformation that induces the opposite extractelement fold (PR26354)

We would infinite loop because we created a shufflevector that was wider than
needed and then failed to combine that with the insertelement. When subsequently
visiting the extractelement from that shuffle, we see that it's unnecessary,
delete it, and trigger another visit to the insertelement.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259245 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/insert-extract-shuffle.ll