[x86] Fix a really terrible bug in the repeated 128-bin-lane shuffle
authorChandler Carruth <chandlerc@gmail.com>
Wed, 24 Sep 2014 01:03:57 +0000 (01:03 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 24 Sep 2014 01:03:57 +0000 (01:03 +0000)
commit8415f84e49664d6427af58f15741f404a309ebd2
tree42923d7bf787c6bc5fa348cae048ea16796d4a7b
parent73ce2886b1c3537eb592bc8450b96ce63cbe2f85
[x86] Fix a really terrible bug in the repeated 128-bin-lane shuffle
detection. It was incorrectly handling undef lanes by actually treating
an undef lane in the first 128-bit lane as a *numeric* shuffle value.

Fortunately, this almost always DTRT and disabled detecting repeated
patterns. But not always. =/ This patch introduces a much more
principled approach and fixes the miscompiles I spotted by inspection
previously.

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