[InstCombine] allow lengthening of insertelement to eliminate shuffles
authorSanjay Patel <spatel@rotateright.com>
Sun, 30 Sep 2018 13:50:42 +0000 (13:50 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 30 Sep 2018 13:50:42 +0000 (13:50 +0000)
commit26c119a9c2f1d6866fe5996ef5a039b4fc3749ca
tree8caae0b7b55785ce1fd1fd5922fe0c360fb68734
parent818cfc40ff464d426be37a552c3db8e895c94321
[InstCombine] allow lengthening of insertelement to eliminate shuffles

As noted in post-commit comments for D52548, the limitation on
increasing vector length can be applied by opcode.
As a first step, this patch only allows insertelement to be
widened because that has no logical downsides for IR and has
little risk of pessimizing codegen.

This may cause PR39132 to go into hiding during a full compile,
but that bug is not fixed.

llvm-svn: 343406
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
llvm/test/Transforms/InstCombine/vec_shuffle.ll