mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
[x86] Add the test case from PR22412, we now get this right even with
the new vector shuffle legality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229310 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fbde8bffba
commit
3e93916175
@ -2676,3 +2676,51 @@ entry:
|
||||
%r2 = fadd <4 x float> %s1, %s2
|
||||
ret <4 x float> %r2
|
||||
}
|
||||
|
||||
define <8 x float> @PR22412(<8 x float> %a, <8 x float> %b) {
|
||||
; SSE2-LABEL: PR22412:
|
||||
; SSE2: # BB#0: # %entry
|
||||
; SSE2-NEXT: movsd {{.*#+}} xmm2 = xmm0[0],xmm2[1]
|
||||
; SSE2-NEXT: movapd %xmm2, %xmm0
|
||||
; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,0],xmm3[3,2]
|
||||
; SSE2-NEXT: shufps {{.*#+}} xmm3 = xmm3[1,0],xmm2[3,2]
|
||||
; SSE2-NEXT: movaps %xmm3, %xmm1
|
||||
; SSE2-NEXT: retq
|
||||
;
|
||||
; SSSE3-LABEL: PR22412:
|
||||
; SSSE3: # BB#0: # %entry
|
||||
; SSSE3-NEXT: movsd {{.*#+}} xmm2 = xmm0[0],xmm2[1]
|
||||
; SSSE3-NEXT: movapd %xmm2, %xmm0
|
||||
; SSSE3-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,0],xmm3[3,2]
|
||||
; SSSE3-NEXT: shufps {{.*#+}} xmm3 = xmm3[1,0],xmm2[3,2]
|
||||
; SSSE3-NEXT: movaps %xmm3, %xmm1
|
||||
; SSSE3-NEXT: retq
|
||||
;
|
||||
; SSE41-LABEL: PR22412:
|
||||
; SSE41: # BB#0: # %entry
|
||||
; SSE41-NEXT: blendpd {{.*#+}} xmm0 = xmm0[0],xmm2[1]
|
||||
; SSE41-NEXT: movapd %xmm0, %xmm1
|
||||
; SSE41-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,0],xmm3[3,2]
|
||||
; SSE41-NEXT: shufps {{.*#+}} xmm3 = xmm3[1,0],xmm0[3,2]
|
||||
; SSE41-NEXT: movaps %xmm1, %xmm0
|
||||
; SSE41-NEXT: movaps %xmm3, %xmm1
|
||||
; SSE41-NEXT: retq
|
||||
;
|
||||
; AVX1-LABEL: PR22412:
|
||||
; AVX1: # BB#0: # %entry
|
||||
; AVX1-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3]
|
||||
; AVX1-NEXT: vperm2f128 {{.*#+}} ymm1 = ymm0[2,3,0,1]
|
||||
; AVX1-NEXT: vshufps {{.*#+}} ymm0 = ymm0[1,0],ymm1[3,2],ymm0[5,4],ymm1[7,6]
|
||||
; AVX1-NEXT: retq
|
||||
;
|
||||
; AVX2-LABEL: PR22412:
|
||||
; AVX2: # BB#0: # %entry
|
||||
; AVX2-NEXT: vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3]
|
||||
; AVX2-NEXT: vmovaps {{.*#+}} ymm1 = [1,0,7,6,5,4,3,2]
|
||||
; AVX2-NEXT: vpermps %ymm0, %ymm1, %ymm0
|
||||
; AVX2-NEXT: retq
|
||||
entry:
|
||||
%s1 = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 1, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
|
||||
%s2 = shufflevector <8 x float> %s1, <8 x float> undef, <8 x i32> <i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2>
|
||||
ret <8 x float> %s2
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user