[InstCombine] Teach how to convert SSSE3/AVX2 byte shuffles to builtin shuffles if...
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 30 Sep 2015 16:44:39 +0000 (16:44 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 30 Sep 2015 16:44:39 +0000 (16:44 +0000)
commit2d31ad0715e5a541901ce7ea7c8ba4f1bf0165d7
tree702206a27aaee40611fa9f7eda3a35879ac02f49
parent1cbae49b80c3ddacd69305ea52b45e7d702e907d
[InstCombine] Teach how to convert SSSE3/AVX2 byte shuffles to builtin shuffles if the shuffle mask is constant.

This patch teaches InstCombiner how to convert a SSSE3/AVX2 byte shuffle to a
builtin shuffle if the mask is constant.

Converting byte shuffle intrinsic calls to builtin shuffles can help finding
more opportunities for combining shuffles later on in selection dag.

We may end up with byte shuffles with constant masks as the result of inlining.

Differential Revision: http://reviews.llvm.org/D13252

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248913 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/x86-pshufb.ll [new file with mode: 0644]