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: movq $-1, %rax
96 ; CHECK-NEXT: movq %rax, %xmm0
98 %1 = fcmp ueq <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
99 %2 = sext <2 x i1> %1 to <2 x i64>
103 define <4 x i32> @fcmp_ueq_v4f32() {
104 ; CHECK-LABEL: fcmp_ueq_v4f32:
106 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
108 %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>
109 %2 = sext <4 x i1> %1 to <4 x i32>
113 define <4 x i32> @fcmp_ueq_v4f32_undef() {
114 ; CHECK-LABEL: fcmp_ueq_v4f32_undef:
116 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
118 %1 = fcmp ueq <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
119 %2 = sext <4 x i1> %1 to <4 x i32>
123 define <4 x i32> @fcmp_ueq_v4f32_undef_elt() {
124 ; CHECK-LABEL: fcmp_ueq_v4f32_undef_elt:
126 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
128 %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>
129 %2 = sext <4 x i1> %1 to <4 x i32>
137 define <2 x i64> @fcmp_false_v2f64() {
138 ; CHECK-LABEL: fcmp_false_v2f64:
140 ; CHECK-NEXT: xorps %xmm0, %xmm0
142 %1 = fcmp false <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>
143 %2 = sext <2 x i1> %1 to <2 x i64>
147 define <2 x i64> @fcmp_false_v2f64_undef() {
148 ; CHECK-LABEL: fcmp_false_v2f64_undef:
150 ; CHECK-NEXT: xorps %xmm0, %xmm0
152 %1 = fcmp false <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, undef
153 %2 = sext <2 x i1> %1 to <2 x i64>
157 define <2 x i64> @fcmp_false_v2f64_undef_elt() {
158 ; CHECK-LABEL: fcmp_false_v2f64_undef_elt:
160 ; CHECK-NEXT: xorps %xmm0, %xmm0
162 %1 = fcmp false <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
163 %2 = sext <2 x i1> %1 to <2 x i64>
167 define <4 x i32> @fcmp_false_v4f32() {
168 ; CHECK-LABEL: fcmp_false_v4f32:
170 ; CHECK-NEXT: xorps %xmm0, %xmm0
172 %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>
173 %2 = sext <4 x i1> %1 to <4 x i32>
177 define <4 x i32> @fcmp_false_v4f32_undef() {
178 ; CHECK-LABEL: fcmp_false_v4f32_undef:
180 ; CHECK-NEXT: xorps %xmm0, %xmm0
182 %1 = fcmp false <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
183 %2 = sext <4 x i1> %1 to <4 x i32>
187 define <4 x i32> @fcmp_false_v4f32_undef_elt() {
188 ; CHECK-LABEL: fcmp_false_v4f32_undef_elt:
190 ; CHECK-NEXT: xorps %xmm0, %xmm0
192 %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>
193 %2 = sext <4 x i1> %1 to <4 x i32>
201 define <2 x i64> @fcmp_true_v2f64() {
202 ; CHECK-LABEL: fcmp_true_v2f64:
204 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
206 %1 = fcmp true <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>
207 %2 = sext <2 x i1> %1 to <2 x i64>
211 define <2 x i64> @fcmp_true_v2f64_undef() {
212 ; CHECK-LABEL: fcmp_true_v2f64_undef:
214 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
216 %1 = fcmp true <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, undef
217 %2 = sext <2 x i1> %1 to <2 x i64>
221 define <2 x i64> @fcmp_true_v2f64_undef_elt() {
222 ; CHECK-LABEL: fcmp_true_v2f64_undef_elt:
224 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
226 %1 = fcmp true <2 x double> <double 0x3FF0000000000000, double 0xFFEFFFFFFFFFFFFF>, <double undef, double 0x3FF0000000000000>
227 %2 = sext <2 x i1> %1 to <2 x i64>
231 define <4 x i32> @fcmp_true_v4f32() {
232 ; CHECK-LABEL: fcmp_true_v4f32:
234 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
236 %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>
237 %2 = sext <4 x i1> %1 to <4 x i32>
241 define <4 x i32> @fcmp_true_v4f32_undef() {
242 ; CHECK-LABEL: fcmp_true_v4f32_undef:
244 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
246 %1 = fcmp true <4 x float> <float 1.0, float -1.0, float +2.0, float -0.0>, undef
247 %2 = sext <4 x i1> %1 to <4 x i32>
251 define <4 x i32> @fcmp_true_v4f32_undef_elt() {
252 ; CHECK-LABEL: fcmp_true_v4f32_undef_elt:
254 ; CHECK-NEXT: pcmpeqd %xmm0, %xmm0
256 %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>
257 %2 = sext <4 x i1> %1 to <4 x i32>