X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FX86%2Fvector-shuffle-256-v16.ll;h=6683ea2b6a54b7d9c12a86f812bea1803a679f0d;hb=b6d43abb7cd9d23c0d1ca55b9865571052a535b6;hp=df4994da693201ce646f6ebf53635b31c795271a;hpb=9329447cf40261f568fb91374e26476c4898a440;p=oota-llvm.git diff --git a/test/CodeGen/X86/vector-shuffle-256-v16.ll b/test/CodeGen/X86/vector-shuffle-256-v16.ll index df4994da693..6683ea2b6a5 100644 --- a/test/CodeGen/X86/vector-shuffle-256-v16.ll +++ b/test/CodeGen/X86/vector-shuffle-256-v16.ll @@ -3261,3 +3261,30 @@ define <16 x i16> @insert_v16i16_0elt_into_zero_vector(i16* %ptr) { ret <16 x i16> %i0 } +define <16 x i16> @concat_v16i16_0_1_2_3_4_5_6_7_24_25_26_27_28_29_30_31(<16 x i16> %a, <16 x i16> %b) { +; ALL-LABEL: concat_v16i16_0_1_2_3_4_5_6_7_24_25_26_27_28_29_30_31: +; ALL: # BB#0: +; ALL-NEXT: vextractf128 $1, %ymm1, %xmm1 +; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; ALL-NEXT: retq + %alo = shufflevector <16 x i16> %a, <16 x i16> undef, <8 x i32> + %bhi = shufflevector <16 x i16> %b, <16 x i16> undef, <8 x i32> + %shuf = shufflevector <8 x i16> %alo, <8 x i16> %bhi, <16 x i32> + ret <16 x i16> %shuf +} + +define <16 x i16> @concat_v16i16_8_9_10_11_12_13_14_15_24_25_26_27_28_29_30_31_bc(<16 x i16> %a, <16 x i16> %b) { +; ALL-LABEL: concat_v16i16_8_9_10_11_12_13_14_15_24_25_26_27_28_29_30_31_bc: +; ALL: # BB#0: +; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0 +; ALL-NEXT: vextractf128 $1, %ymm1, %xmm1 +; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0 +; ALL-NEXT: retq + %ahi = shufflevector <16 x i16> %a, <16 x i16> undef, <8 x i32> + %bhi = shufflevector <16 x i16> %b, <16 x i16> undef, <8 x i32> + %bc0hi = bitcast <8 x i16> %ahi to <16 x i8> + %bc1hi = bitcast <8 x i16> %bhi to <16 x i8> + %shuffle8 = shufflevector <16 x i8> %bc0hi, <16 x i8> %bc1hi, <32 x i32> + %shuffle16 = bitcast <32 x i8> %shuffle8 to <16 x i16> + ret <16 x i16> %shuffle16 +}