[llvm] b92725e - [X86] Add test coverage for #58585

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 06:34:33 PDT 2022


Author: Simon Pilgrim
Date: 2022-10-25T14:33:55+01:00
New Revision: b92725ecbc5d9aca927ae48eb50a51b23b213a13

URL: https://github.com/llvm/llvm-project/commit/b92725ecbc5d9aca927ae48eb50a51b23b213a13
DIFF: https://github.com/llvm/llvm-project/commit/b92725ecbc5d9aca927ae48eb50a51b23b213a13.diff

LOG: [X86] Add test coverage for #58585

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
index 6cf5633a4360..6f843ab0e847 100644
--- a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
+++ b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll
@@ -638,6 +638,24 @@ define <8 x float> @shuffle_v8f32_00224466_v4f32(<4 x float> %a, <4 x float> %b)
   ret <8 x float> %3
 }
 
+define <8 x float> @shuffle_v8f32_00004444_v4f32(<4 x float> %a, <4 x float> %b) {
+; AVX1-LABEL: shuffle_v8f32_00004444_v4f32:
+; AVX1:       # %bb.0:
+; AVX1-NEXT:    # kill: def $xmm0 killed $xmm0 def $ymm0
+; AVX1-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX1-NEXT:    vpermilps {{.*#+}} ymm0 = ymm0[0,0,0,0,4,4,4,4]
+; AVX1-NEXT:    retq
+;
+; AVX2OR512VL-LABEL: shuffle_v8f32_00004444_v4f32:
+; AVX2OR512VL:       # %bb.0:
+; AVX2OR512VL-NEXT:    vbroadcastss %xmm0, %xmm0
+; AVX2OR512VL-NEXT:    vbroadcastss %xmm1, %xmm1
+; AVX2OR512VL-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX2OR512VL-NEXT:    retq
+  %1 = shufflevector <4 x float> %a, <4 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
+  ret <8 x float> %1
+}
+
 define <8 x float> @shuffle_v8f32_10325476(<8 x float> %a, <8 x float> %b) {
 ; ALL-LABEL: shuffle_v8f32_10325476:
 ; ALL:       # %bb.0:
@@ -3270,6 +3288,24 @@ define <8 x i32> @shuffle_v8i32_32107654_v4i32(<4 x i32> %a, <4 x i32> %b) {
   ret <8 x i32> %3
 }
 
+define <8 x i32> @shuffle_v8i32_00004444_v4f32(<4 x i32> %a, <4 x i32> %b) {
+; AVX1-LABEL: shuffle_v8i32_00004444_v4f32:
+; AVX1:       # %bb.0:
+; AVX1-NEXT:    # kill: def $xmm0 killed $xmm0 def $ymm0
+; AVX1-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX1-NEXT:    vpermilps {{.*#+}} ymm0 = ymm0[0,0,0,0,4,4,4,4]
+; AVX1-NEXT:    retq
+;
+; AVX2OR512VL-LABEL: shuffle_v8i32_00004444_v4f32:
+; AVX2OR512VL:       # %bb.0:
+; AVX2OR512VL-NEXT:    vbroadcastss %xmm0, %xmm0
+; AVX2OR512VL-NEXT:    vbroadcastss %xmm1, %xmm1
+; AVX2OR512VL-NEXT:    vinsertf128 $1, %xmm1, %ymm0, %ymm0
+; AVX2OR512VL-NEXT:    retq
+  %1 = shufflevector <4 x i32> %a, <4 x i32> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
+  ret <8 x i32> %1
+}
+
 define <8 x float> @splat_mem_v8f32_2(ptr %p) {
 ; ALL-LABEL: splat_mem_v8f32_2:
 ; ALL:       # %bb.0:


        


More information about the llvm-commits mailing list