1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
8 define <2 x i64> @fcmp_oeq_v2f64() {
9 ; CHECK-LABEL: fcmp_oeq_v2f64:
11 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
13 %1 = fcmp oeq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>
14 %2 = sext <2 x i1> %1 to <2 x i64>
18 define <2 x i64> @fcmp_oeq_v2f64_undef() {
19 ; CHECK-LABEL: fcmp_oeq_v2f64_undef:
21 ; CHECK-NEXT: xorps %xmm0, %xmm0
23 %1 = fcmp oeq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, undef
24 %2 = sext <2 x i1> %1 to <2 x i64>
28 define <2 x i64> @fcmp_oeq_v2f64_undef_elt() {
29 ; CHECK-LABEL: fcmp_oeq_v2f64_undef_elt:
31 ; CHECK-NEXT: xorps %xmm0, %xmm0
33 %1 = fcmp oeq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
34 %2 = sext <2 x i1> %1 to <2 x i64>
38 define <4 x i32> @fcmp_oeq_v4f32() {
39 ; CHECK-LABEL: fcmp_oeq_v4f32:
41 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
43 %1 = fcmp oeq <4 x float> <float -0.0, float 1.0, float -1.0, float +2.0>, <float +0.0, float 1.0, float -1.0, float +2.0>
44 %2 = sext <4 x i1> %1 to <4 x i32>
48 define <4 x i32> @fcmp_oeq_v4f32_undef() {
49 ; CHECK-LABEL: fcmp_oeq_v4f32_undef:
51 ; CHECK-NEXT: xorps %xmm0, %xmm0
53 %1 = fcmp oeq <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
54 %2 = sext <4 x i1> %1 to <4 x i32>
58 define <4 x i32> @fcmp_oeq_v4f32_undef_elt() {
59 ; CHECK-LABEL: fcmp_oeq_v4f32_undef_elt:
61 ; CHECK-NEXT: movaps {{.*#+}} xmm0 = [0,4294967295,4294967295,0]
63 %1 = fcmp oeq <4 x float> <float -0.0, float 1.0, float -1.0, float undef>, <float undef, float 1.0, float -1.0, float +2.0>
64 %2 = sext <4 x i1> %1 to <4 x i32>
72 define <2 x i64> @fcmp_ueq_v2f64() {
73 ; CHECK-LABEL: fcmp_ueq_v2f64:
75 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
77 %1 = fcmp ueq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>
78 %2 = sext <2 x i1> %1 to <2 x i64>
82 define <2 x i64> @fcmp_ueq_v2f64_undef() {
83 ; CHECK-LABEL: fcmp_ueq_v2f64_undef:
85 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
87 %1 = fcmp ueq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, undef
88 %2 = sext <2 x i1> %1 to <2 x i64>
92 define <2 x i64> @fcmp_ueq_v2f64_undef_elt() {
93 ; CHECK-LABEL: fcmp_ueq_v2f64_undef_elt:
95 ; CHECK-NEXT: movsd {{.*#+}} xmm0 = [18446744073709551615,0]
97 %1 = fcmp ueq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
98 %2 = sext <2 x i1> %1 to <2 x i64>
102 define <4 x i32> @fcmp_ueq_v4f32() {
103 ; CHECK-LABEL: fcmp_ueq_v4f32:
105 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
107 %1 = fcmp ueq <4 x float> <float -0.0, float 1.0, float -1.0, float +2.0>, <float +0.0, float 1.0, float -1.0, float +2.0>
108 %2 = sext <4 x i1> %1 to <4 x i32>
112 define <4 x i32> @fcmp_ueq_v4f32_undef() {
113 ; CHECK-LABEL: fcmp_ueq_v4f32_undef:
115 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
117 %1 = fcmp ueq <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
118 %2 = sext <4 x i1> %1 to <4 x i32>
122 define <4 x i32> @fcmp_ueq_v4f32_undef_elt() {
123 ; CHECK-LABEL: fcmp_ueq_v4f32_undef_elt:
125 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
127 %1 = fcmp ueq <4 x float> <float -0.0, float 1.0, float -1.0, float undef>, <float undef, float 1.0, float -1.0, float +2.0>
128 %2 = sext <4 x i1> %1 to <4 x i32>
136 define <2 x i64> @fcmp_false_v2f64() {
137 ; CHECK-LABEL: fcmp_false_v2f64:
139 ; CHECK-NEXT: xorps %xmm0, %xmm0
141 %1 = fcmp false <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>
142 %2 = sext <2 x i1> %1 to <2 x i64>
146 define <2 x i64> @fcmp_false_v2f64_undef() {
147 ; CHECK-LABEL: fcmp_false_v2f64_undef:
149 ; CHECK-NEXT: xorps %xmm0, %xmm0
151 %1 = fcmp false <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, undef
152 %2 = sext <2 x i1> %1 to <2 x i64>
156 define <2 x i64> @fcmp_false_v2f64_undef_elt() {
157 ; CHECK-LABEL: fcmp_false_v2f64_undef_elt:
159 ; CHECK-NEXT: xorps %xmm0, %xmm0
161 %1 = fcmp false <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
162 %2 = sext <2 x i1> %1 to <2 x i64>
166 define <4 x i32> @fcmp_false_v4f32() {
167 ; CHECK-LABEL: fcmp_false_v4f32:
169 ; CHECK-NEXT: xorps %xmm0, %xmm0
171 %1 = fcmp false <4 x float> <float -0.0, float 1.0, float -1.0, float +2.0>, <float +0.0, float 1.0, float -1.0, float +2.0>
172 %2 = sext <4 x i1> %1 to <4 x i32>
176 define <4 x i32> @fcmp_false_v4f32_undef() {
177 ; CHECK-LABEL: fcmp_false_v4f32_undef:
179 ; CHECK-NEXT: xorps %xmm0, %xmm0
181 %1 = fcmp false <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
182 %2 = sext <4 x i1> %1 to <4 x i32>
186 define <4 x i32> @fcmp_false_v4f32_undef_elt() {
187 ; CHECK-LABEL: fcmp_false_v4f32_undef_elt:
189 ; CHECK-NEXT: xorps %xmm0, %xmm0
191 %1 = fcmp false <4 x float> <float -0.0, float 1.0, float -1.0, float undef>, <float undef, float 1.0, float -1.0, float +2.0>
192 %2 = sext <4 x i1> %1 to <4 x i32>
200 define <2 x i64> @fcmp_true_v2f64() {
201 ; CHECK-LABEL: fcmp_true_v2f64:
203 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
205 %1 = fcmp true <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>
206 %2 = sext <2 x i1> %1 to <2 x i64>
210 define <2 x i64> @fcmp_true_v2f64_undef() {
211 ; CHECK-LABEL: fcmp_true_v2f64_undef:
213 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
215 %1 = fcmp true <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, undef
216 %2 = sext <2 x i1> %1 to <2 x i64>
220 define <2 x i64> @fcmp_true_v2f64_undef_elt() {
221 ; CHECK-LABEL: fcmp_true_v2f64_undef_elt:
223 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
225 %1 = fcmp true <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
226 %2 = sext <2 x i1> %1 to <2 x i64>
230 define <4 x i32> @fcmp_true_v4f32() {
231 ; CHECK-LABEL: fcmp_true_v4f32:
233 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
235 %1 = fcmp true <4 x float> <float -0.0, float 1.0, float -1.0, float +2.0>, <float +0.0, float 1.0, float -1.0, float +2.0>
236 %2 = sext <4 x i1> %1 to <4 x i32>
240 define <4 x i32> @fcmp_true_v4f32_undef() {
241 ; CHECK-LABEL: fcmp_true_v4f32_undef:
243 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
245 %1 = fcmp true <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
246 %2 = sext <4 x i1> %1 to <4 x i32>
250 define <4 x i32> @fcmp_true_v4f32_undef_elt() {
251 ; CHECK-LABEL: fcmp_true_v4f32_undef_elt:
253 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
255 %1 = fcmp true <4 x float> <float -0.0, float 1.0, float -1.0, float undef>, <float undef, float 1.0, float -1.0, float +2.0>
256 %2 = sext <4 x i1> %1 to <4 x i32>