[InstCombine] avoid an insertelement transformation that induces the opposite extract...
authorSanjay Patel <spatel@rotateright.com>
Fri, 29 Jan 2016 20:21:02 +0000 (20:21 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 29 Jan 2016 20:21:02 +0000 (20:21 +0000)
commit66fff73c765785a775dda676cc4e76e024686754
tree19967c11b240bca32fa6d659def3380f7604ffc1
parent02e73d1c3c983c6091c1892e69d2d288be63d11b
[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.

llvm-svn: 259236
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
llvm/test/Transforms/InstCombine/insert-extract-shuffle.ll