[x86] Fix another miscompile found through fuzz testing the new vector
authorChandler Carruth <chandlerc@gmail.com>
Thu, 7 Aug 2014 10:37:35 +0000 (10:37 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 7 Aug 2014 10:37:35 +0000 (10:37 +0000)
commit0e89fbb12006357451a5dc9733147b22a0ab5749
treefca773bb8fb0abaf8027f2df3a00d2d074dde80c
parent0651861b7b84f84865a652c4963db1a2c9671d9d
[x86] Fix another miscompile found through fuzz testing the new vector
shuffle lowering.

This is closely related to the previous one. Here we failed to use the
source offset when swapping in the other case -- where we end up
swapping the *final* shuffle. The cause of this bug is a bit different:
I simply wasn't thinking about the fact that this mask is actually
a slice of a wide mask and thus has numbers that need SourceOffset
applied. Simple fix. Would be even more simple with an algorithm-y thing
to use here, but correctness first. =]

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