[x86] Refactor the bit shift code the same as I just did the byte shift
authorChandler Carruth <chandlerc@gmail.com>
Wed, 18 Feb 2015 09:19:58 +0000 (09:19 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 18 Feb 2015 09:19:58 +0000 (09:19 +0000)
commit4e8a4638e96ebfcaee1774c357a72fd60f092f95
treece613be2bd8079d946d6f67222203dd97f461e01
parentbebd59c74ba55cdda62466f72c5031274c37b93b
[x86] Refactor the bit shift code the same as I just did the byte shift
code.

While this didn't have the miscompile (it used MatchLeft consistently)
it missed some cases where it could use right shifts. I've added a test
case Craig Topper came up with to exercise the right shift matching.

This code is really identical between the two. I'm going to merge them
next so that we don't keep two copies of all of this logic.

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