1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+sse4.2 | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse4.2 | FileCheck %s --check-prefix=X64
7 define <2 x i16> @compare_v2i64_to_v2i16_unary(<2 x i16>* %src) nounwind {
8 ; X86-LABEL: compare_v2i64_to_v2i16_unary:
10 ; X86-NEXT: pcmpeqd %xmm0, %xmm0
13 ; X64-LABEL: compare_v2i64_to_v2i16_unary:
15 ; X64-NEXT: pcmpeqd %xmm0, %xmm0
17 %val = load <2 x i16>, <2 x i16>* %src, align 4
18 %cmp = icmp uge <2 x i16> %val, %val
19 %sel = select <2 x i1> %cmp, <2 x i16> <i16 -1, i16 -1>, <2 x i16> zeroinitializer
23 define <2 x i16> @compare_v2i64_to_v2i16_binary(<2 x i16>* %src0, <2 x i16>* %src1) nounwind {
24 ; X86-LABEL: compare_v2i64_to_v2i16_binary:
26 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
27 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
28 ; X86-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
29 ; X86-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
30 ; X86-NEXT: pmaxuw %xmm1, %xmm0
31 ; X86-NEXT: pcmpeqw %xmm1, %xmm0
34 ; X64-LABEL: compare_v2i64_to_v2i16_binary:
36 ; X64-NEXT: movd {{.*#+}} xmm1 = mem[0],zero,zero,zero
37 ; X64-NEXT: movd {{.*#+}} xmm0 = mem[0],zero,zero,zero
38 ; X64-NEXT: pmaxuw %xmm1, %xmm0
39 ; X64-NEXT: pcmpeqw %xmm1, %xmm0
41 %val0 = load <2 x i16>, <2 x i16>* %src0, align 4
42 %val1 = load <2 x i16>, <2 x i16>* %src1, align 4
43 %cmp = icmp uge <2 x i16> %val0, %val1
44 %sel = select <2 x i1> %cmp, <2 x i16> <i16 -1, i16 -1>, <2 x i16> zeroinitializer