]> granicus.if.org Git - llvm/commit
[DAGCombiner] Fix fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask...
authorCraig Topper <craig.topper@gmail.com>
Sat, 1 Apr 2017 04:26:20 +0000 (04:26 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sat, 1 Apr 2017 04:26:20 +0000 (04:26 +0000)
commit0c554b7eb16059f55e8d921f0f321a5ffa5af26f
treed908f532c03b5085725d92e3f71b0b827e4e3f13
parent2a400a79a23eb72635208c3ac75781bc25058592
[DAGCombiner] Fix fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask) to explicitly ensure that only one of the inputs of each shuffle is a zero vector.

This can only happen when we have a mix of zero and undef elements and the two vectors have a different arrangement of zeros/undefs. The shuffle should eventually be constant folded to all zeros.

Fixes PR32484.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299291 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/pr32484.ll [new file with mode: 0644]