diff --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll index 6cf5633a43603f..6f843ab0e84785 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> + 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> + ret <8 x i32> %1 +} + define <8 x float> @splat_mem_v8f32_2(ptr %p) { ; ALL-LABEL: splat_mem_v8f32_2: ; ALL: # %bb.0: