forked from OSchip/llvm-project
[x86] Fix a bug in the v8i16 shuffling exposed by the new splat-like
lowering for v16i8. ASan and some bots caught this bug with existing test cases. Fixing it even fixed a miscompile with one of the test cases. I'm still a bit suspicious of this test case as I've not taken a proper amount of time to think about it, but the fix here is strict goodness. llvm-svn: 211976
This commit is contained in:
parent
d5821f36d9
commit
bd0717d7cc
|
@ -7535,7 +7535,7 @@ static SDValue lowerV8I16BasicBlendVectorShuffle(SDLoc DL, SDValue V1,
|
|||
} else {
|
||||
// Otherwise pin the low inputs.
|
||||
for (int GoodInput : GoodInputs)
|
||||
MoveMask[Mask[GoodInput]] = Mask[GoodInput] - MaskOffset;
|
||||
MoveMask[Mask[GoodInput] - MaskOffset] = Mask[GoodInput] - MaskOffset;
|
||||
}
|
||||
|
||||
int MoveMaskIdx =
|
||||
|
|
|
@ -63,14 +63,15 @@ define <16 x i8> @shuffle_v16i8_00_00_00_00_04_04_04_04_08_08_08_08_12_12_12_12(
|
|||
; CHECK-SSE2-NEXT: pxor %xmm1, %xmm1
|
||||
; CHECK-SSE2-NEXT: movdqa %xmm0, %xmm2
|
||||
; CHECK-SSE2-NEXT: punpcklbw %xmm1, %xmm2
|
||||
; CHECK-SSE2-NEXT: pshufd {{.*}} # xmm2 = xmm2[2,1,2,3]
|
||||
; CHECK-SSE2-NEXT: pshufd {{.*}} # xmm2 = xmm2[0,2,2,3]
|
||||
; CHECK-SSE2-NEXT: pshuflw {{.*}} # xmm2 = xmm2[0,2,2,3,4,5,6,7]
|
||||
; CHECK-SSE2-NEXT: punpckhbw %xmm1, %xmm0
|
||||
; CHECK-SSE2-NEXT: pshufd {{.*}} # xmm0 = xmm0[0,2,2,3]
|
||||
; CHECK-SSE2-NEXT: pshuflw {{.*}} # xmm0 = xmm0[0,2,2,3,4,5,6,7]
|
||||
; CHECK-SSE2-NEXT: punpcklwd %xmm2, %xmm0
|
||||
; CHECK-SSE2-NEXT: pshufd {{.*}} # xmm0 = xmm0[0,1,0,3]
|
||||
; CHECK-SSE2-NEXT: pshufd {{.*}} # xmm0 = xmm0[0,1,2,1]
|
||||
; CHECK-SSE2-NEXT: pshuflw {{.*}} # xmm0 = xmm0[1,0,2,3,4,5,6,7]
|
||||
; CHECK-SSE2-NEXT: pshufhw {{.*}} # xmm0 = xmm0[0,1,2,3,5,5,6,7]
|
||||
; CHECK-SSE2-NEXT: pshufhw {{.*}} # xmm0 = xmm0[0,1,2,3,7,5,6,7]
|
||||
; CHECK-SSE2-NEXT: packuswb %xmm0, %xmm0
|
||||
; CHECK-SSE2-NEXT: punpcklbw %xmm0, %xmm0
|
||||
; CHECK-SSE2-NEXT: pshufd {{.*}} # xmm0 = xmm0[0,2,0,1]
|
||||
|
|
Loading…
Reference in New Issue