1 ; RUN: llc -mtriple=x86_64-- -mattr=sse4.1 < %s | FileCheck %s -check-prefix=SSE4
2 ; RUN: llc -mtriple=x86_64-- -mattr=avx < %s | FileCheck %s -check-prefix=AVX1
3 ; RUN: llc -mtriple=x86_64-- -mattr=avx2 < %s | FileCheck %s -check-prefix=AVX2
5 define <16 x i16> @split16(<16 x i16> %a, <16 x i16> %b, <16 x i8> %__mask) {
10 ; AVX1-LABEL: split16:
14 ; AVX2-LABEL: split16:
17 %1 = icmp ult <16 x i16> %a, %b
18 %2 = select <16 x i1> %1, <16 x i16> %a, <16 x i16> %b
22 define <32 x i16> @split32(<32 x i16> %a, <32 x i16> %b, <32 x i8> %__mask) {
23 ; SSE4-LABEL: split32:
29 ; AVX1-LABEL: split32:
35 ; AVX2-LABEL: split32:
39 %1 = icmp ult <32 x i16> %a, %b
40 %2 = select <32 x i1> %1, <32 x i16> %a, <32 x i16> %b
45 define i128 @split128(<2 x i128> %a, <2 x i128> %b) {
46 ; SSE4-LABEL: split128:
54 ; AVX1-LABEL: split128:
62 ; AVX2-LABEL: split128:
70 %add = add nsw <2 x i128> %a, %b
71 %rdx.shuf = shufflevector <2 x i128> %add, <2 x i128> undef, <2 x i32> <i32 undef, i32 0>
72 %bin.rdx = add <2 x i128> %add, %rdx.shuf
73 %e = extractelement <2 x i128> %bin.rdx, i32 1