[x86] instcombine more cases of insertps into a shufflevector
authorSanjay Patel <spatel@rotateright.com>
Sat, 25 Apr 2015 20:55:25 +0000 (20:55 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sat, 25 Apr 2015 20:55:25 +0000 (20:55 +0000)
commit1111a216ee1e804e50c2d14a6dea813134196270
tree6c49949899f819eb6cbbb4795f6c96df43549cb6
parent3b916067830164db490118b28d92ab569534f235
[x86] instcombine more cases of insertps into a shufflevector

This is a follow-on to D8833 (insertps optimization when the zero mask is not used).

In this patch, we check for the case where the zmask is used, but both input vectors
to the insertps intrinsic are the same operand or the zmask overrides the destination
lane. This lets us replace the 2nd shuffle input operand with the zero vector.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235810 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/x86-insertps.ll