diff --git a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll index 2e29d1806720..4a8dd3ea8398 100644 --- a/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll +++ b/llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll @@ -625,6 +625,19 @@ define <8 x float> @shuffle_v8f32_00224466(<8 x float> %a, <8 x float> %b) { ret <8 x float> %shuffle } +define <8 x float> @shuffle_v8f32_00224466_v4f32(<4 x float> %a, <4 x float> %b) { +; ALL-LABEL: shuffle_v8f32_00224466_v4f32: +; ALL: # %bb.0: +; ALL-NEXT: vmovsldup {{.*#+}} xmm0 = xmm0[0,0,2,2] +; ALL-NEXT: vmovsldup {{.*#+}} xmm1 = xmm1[0,0,2,2] +; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; ALL-NEXT: retq + %1 = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> + %2 = shufflevector <4 x float> %b, <4 x float> %b, <4 x i32> + %3 = shufflevector <4 x float> %1, <4 x float> %2, <8 x i32> + ret <8 x float> %3 +} + define <8 x float> @shuffle_v8f32_10325476(<8 x float> %a, <8 x float> %b) { ; ALL-LABEL: shuffle_v8f32_10325476: ; ALL: # %bb.0: @@ -643,6 +656,19 @@ define <8 x float> @shuffle_v8f32_11335577(<8 x float> %a, <8 x float> %b) { ret <8 x float> %shuffle } +define <8 x float> @shuffle_v8f32_11335577_v4f32(<4 x float> %a, <4 x float> %b) { +; ALL-LABEL: shuffle_v8f32_11335577_v4f32: +; ALL: # %bb.0: +; ALL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3] +; ALL-NEXT: vmovshdup {{.*#+}} xmm1 = xmm1[1,1,3,3] +; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; ALL-NEXT: retq + %1 = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> + %2 = shufflevector <4 x float> %b, <4 x float> %b, <4 x i32> + %3 = shufflevector <4 x float> %1, <4 x float> %2, <8 x i32> + ret <8 x float> %3 +} + define <8 x float> @shuffle_v8f32_10235467(<8 x float> %a, <8 x float> %b) { ; ALL-LABEL: shuffle_v8f32_10235467: ; ALL: # %bb.0: