[x86] Fix the very broken formation of vpunpck instructions in the
authorChandler Carruth <chandlerc@gmail.com>
Fri, 15 Aug 2014 03:54:49 +0000 (03:54 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 15 Aug 2014 03:54:49 +0000 (03:54 +0000)
commit886f0101a7d176543b831f5efb74c03427244a55
treec1b3ecf629b21f1164f65a7986ac8f2b7d3e1964
parent906ae95a164751b77f21074b1c7d6effcd665fc7
[x86] Fix the very broken formation of vpunpck instructions in the
target-specific shuffl DAG combines.

We were recognizing the paired shuffles backwards. This code needs to be
replaced anyways as we have the same functionality elsewhere, but I'll
do the refactoring in a follow-up, this is the minimal fix to the
behavior.

In addition to fixing miscompiles with the new vector shuffle lowering,
it also causes the canonicalization to kick in much better, selecting
the smaller encoding variants in lots of places in the new AVX path.
This still isn't quite ideal as we don't need both the shufpd and the
punpck instructions, but that'll get fixed in a follow-up patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215690 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/avx-sext.ll
test/CodeGen/X86/vector-shuffle-128-v4.ll
test/CodeGen/X86/vector-shuffle-256-v4.ll