mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
[x86] Add a bunch of test cases where we have different shuffle patterns
in the high and low 128-bit lanes of a v8f32 vector. No functionality change yet, but wanted to set up the baseline for my next patch which will make these quite a bit better. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218224 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -377,3 +377,154 @@ define <8 x float> @shuffle_v8f32_10225466(<8 x float> %a, <8 x float> %b) {
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 2, i32 5, i32 4, i32 6, i32 6>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_00015444(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_00015444
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,0,1]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,0,0,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 5, i32 4, i32 4, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_00204644(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_00204644
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,2,0]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,2,0,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 6, i32 4, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_03004474(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_03004474
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,3,0,0]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,3,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 4, i32 7, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_10004444(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_10004444
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[1,0,0,0]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_22006446(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_22006446
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[2,2,0,0]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[2,0,0,2]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 4, i32 4, i32 6>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_33307474(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_33307474
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[3,3,3,0]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[3,0,3,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 4, i32 7, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_32104567(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_32104567
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[3,2,1,0]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 4, i32 5, i32 6, i32 7>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_00236744(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_00236744
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,2,3]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[2,3,0,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 6, i32 7, i32 4, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_00226644(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_00226644
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vmovsldup {{.*}} # xmm1 = xmm0[0,0,2,2]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[2,2,0,0]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 6, i32 6, i32 4, i32 4>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_10324567(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_10324567
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[1,0,3,2]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 6, i32 7>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_11334567(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_11334567
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vmovshdup {{.*}} # xmm1 = xmm0[1,1,3,3]
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 4, i32 5, i32 6, i32 7>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_01235467(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_01235467
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm1
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[1,0,2,3]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @shuffle_v8f32_01235466(<8 x float> %a, <8 x float> %b) {
|
||||
; ALL-LABEL: @shuffle_v8f32_01235466
|
||||
; ALL: # BB#0:
|
||||
; ALL-NEXT: vextractf128 $1, %ymm0, %xmm1
|
||||
; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[1,0,2,2]
|
||||
; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
|
||||
; ALL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 6>
|
||||
ret <8 x float> %shuffle
|
||||
}
|
||||
|
Reference in New Issue
Block a user