1 // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -ffp-exception-behavior=strict -o - -Wall -Werror | FileCheck %s
2
3
4 #include <immintrin.h>
5
test_mm256_cmp_pd_eq_oq(__m256d a,__m256d b)6 __m256d test_mm256_cmp_pd_eq_oq(__m256d a, __m256d b) {
7 // CHECK-LABEL: test_mm256_cmp_pd_eq_oq
8 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
9 return _mm256_cmp_pd(a, b, _CMP_EQ_OQ);
10 }
11
test_mm256_cmp_pd_lt_os(__m256d a,__m256d b)12 __m256d test_mm256_cmp_pd_lt_os(__m256d a, __m256d b) {
13 // CHECK-LABEL: test_mm256_cmp_pd_lt_os
14 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
15 return _mm256_cmp_pd(a, b, _CMP_LT_OS);
16 }
17
test_mm256_cmp_pd_le_os(__m256d a,__m256d b)18 __m256d test_mm256_cmp_pd_le_os(__m256d a, __m256d b) {
19 // CHECK-LABEL: test_mm256_cmp_pd_le_os
20 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
21 return _mm256_cmp_pd(a, b, _CMP_LE_OS);
22 }
23
test_mm256_cmp_pd_unord_q(__m256d a,__m256d b)24 __m256d test_mm256_cmp_pd_unord_q(__m256d a, __m256d b) {
25 // CHECK-LABEL: test_mm256_cmp_pd_unord_q
26 // CHECK: all <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
27 return _mm256_cmp_pd(a, b, _CMP_UNORD_Q);
28 }
29
test_mm256_cmp_pd_neq_uq(__m256d a,__m256d b)30 __m256d test_mm256_cmp_pd_neq_uq(__m256d a, __m256d b) {
31 // CHECK-LABEL: test_mm256_cmp_pd_neq_uq
32 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
33 return _mm256_cmp_pd(a, b, _CMP_NEQ_UQ);
34 }
35
test_mm256_cmp_pd_nlt_us(__m256d a,__m256d b)36 __m256d test_mm256_cmp_pd_nlt_us(__m256d a, __m256d b) {
37 // CHECK-LABEL: test_mm256_cmp_pd_nlt_us
38 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
39 return _mm256_cmp_pd(a, b, _CMP_NLT_US);
40 }
41
test_mm256_cmp_pd_nle_us(__m256d a,__m256d b)42 __m256d test_mm256_cmp_pd_nle_us(__m256d a, __m256d b) {
43 // CHECK-LABEL: test_mm256_cmp_pd_nle_us
44 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
45 return _mm256_cmp_pd(a, b, _CMP_NLE_US);
46 }
47
test_mm256_cmp_pd_ord_q(__m256d a,__m256d b)48 __m256d test_mm256_cmp_pd_ord_q(__m256d a, __m256d b) {
49 // CHECK-LABEL: test_mm256_cmp_pd_ord_q
50 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
51 return _mm256_cmp_pd(a, b, _CMP_ORD_Q);
52 }
53
test_mm256_cmp_pd_eq_uq(__m256d a,__m256d b)54 __m256d test_mm256_cmp_pd_eq_uq(__m256d a, __m256d b) {
55 // CHECK-LABEL: test_mm256_cmp_pd_eq_uq
56 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
57 return _mm256_cmp_pd(a, b, _CMP_EQ_UQ);
58 }
59
test_mm256_cmp_pd_nge_us(__m256d a,__m256d b)60 __m256d test_mm256_cmp_pd_nge_us(__m256d a, __m256d b) {
61 // CHECK-LABEL: test_mm256_cmp_pd_nge_us
62 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
63 return _mm256_cmp_pd(a, b, _CMP_NGE_US);
64 }
65
test_mm256_cmp_pd_ngt_us(__m256d a,__m256d b)66 __m256d test_mm256_cmp_pd_ngt_us(__m256d a, __m256d b) {
67 // CHECK-LABEL: test_mm256_cmp_pd_ngt_us
68 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
69 return _mm256_cmp_pd(a, b, _CMP_NGT_US);
70 }
71
test_mm256_cmp_pd_false_oq(__m256d a,__m256d b)72 __m256d test_mm256_cmp_pd_false_oq(__m256d a, __m256d b) {
73 // CHECK-LABEL: test_mm256_cmp_pd_false_oq
74 // CHECK: call <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double> %{{.*}}, <4 x double> %{{.*}}, i8 11)
75 return _mm256_cmp_pd(a, b, _CMP_FALSE_OQ);
76 }
77
test_mm256_cmp_pd_neq_oq(__m256d a,__m256d b)78 __m256d test_mm256_cmp_pd_neq_oq(__m256d a, __m256d b) {
79 // CHECK-LABEL: test_mm256_cmp_pd_neq_oq
80 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
81 return _mm256_cmp_pd(a, b, _CMP_NEQ_OQ);
82 }
83
test_mm256_cmp_pd_ge_os(__m256d a,__m256d b)84 __m256d test_mm256_cmp_pd_ge_os(__m256d a, __m256d b) {
85 // CHECK-LABEL: test_mm256_cmp_pd_ge_os
86 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
87 return _mm256_cmp_pd(a, b, _CMP_GE_OS);
88 }
89
test_mm256_cmp_pd_gt_os(__m256d a,__m256d b)90 __m256d test_mm256_cmp_pd_gt_os(__m256d a, __m256d b) {
91 // CHECK-LABEL: test_mm256_cmp_pd_gt_os
92 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
93 return _mm256_cmp_pd(a, b, _CMP_GT_OS);
94 }
95
test_mm256_cmp_pd_true_uq(__m256d a,__m256d b)96 __m256d test_mm256_cmp_pd_true_uq(__m256d a, __m256d b) {
97 // CHECK-LABEL: test_mm256_cmp_pd_true_uq
98 // CHECK: call <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double> %{{.*}}, <4 x double> %{{.*}}, i8 15)
99 return _mm256_cmp_pd(a, b, _CMP_TRUE_UQ);
100 }
101
test_mm256_cmp_pd_eq_os(__m256d a,__m256d b)102 __m256d test_mm256_cmp_pd_eq_os(__m256d a, __m256d b) {
103 // CHECK-LABEL: test_mm256_cmp_pd_eq_os
104 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
105 return _mm256_cmp_pd(a, b, _CMP_EQ_OS);
106 }
107
test_mm256_cmp_pd_lt_oq(__m256d a,__m256d b)108 __m256d test_mm256_cmp_pd_lt_oq(__m256d a, __m256d b) {
109 // CHECK-LABEL: test_mm256_cmp_pd_lt_oq
110 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
111 return _mm256_cmp_pd(a, b, _CMP_LT_OQ);
112 }
113
test_mm256_cmp_pd_le_oq(__m256d a,__m256d b)114 __m256d test_mm256_cmp_pd_le_oq(__m256d a, __m256d b) {
115 // CHECK-LABEL: test_mm256_cmp_pd_le_oq
116 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
117 return _mm256_cmp_pd(a, b, _CMP_LE_OQ);
118 }
119
test_mm256_cmp_pd_unord_s(__m256d a,__m256d b)120 __m256d test_mm256_cmp_pd_unord_s(__m256d a, __m256d b) {
121 // CHECK-LABEL: test_mm256_cmp_pd_unord_s
122 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
123 return _mm256_cmp_pd(a, b, _CMP_UNORD_S);
124 }
125
test_mm256_cmp_pd_neq_us(__m256d a,__m256d b)126 __m256d test_mm256_cmp_pd_neq_us(__m256d a, __m256d b) {
127 // CHECK-LABEL: test_mm256_cmp_pd_neq_us
128 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
129 return _mm256_cmp_pd(a, b, _CMP_NEQ_US);
130 }
131
test_mm256_cmp_pd_nlt_uq(__m256d a,__m256d b)132 __m256d test_mm256_cmp_pd_nlt_uq(__m256d a, __m256d b) {
133 // CHECK-LABEL: test_mm256_cmp_pd_nlt_uq
134 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
135 return _mm256_cmp_pd(a, b, _CMP_NLT_UQ);
136 }
137
test_mm256_cmp_pd_nle_uq(__m256d a,__m256d b)138 __m256d test_mm256_cmp_pd_nle_uq(__m256d a, __m256d b) {
139 // CHECK-LABEL: test_mm256_cmp_pd_nle_uq
140 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
141 return _mm256_cmp_pd(a, b, _CMP_NLE_UQ);
142 }
143
test_mm256_cmp_pd_ord_s(__m256d a,__m256d b)144 __m256d test_mm256_cmp_pd_ord_s(__m256d a, __m256d b) {
145 // CHECK-LABEL: test_mm256_cmp_pd_ord_s
146 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
147 return _mm256_cmp_pd(a, b, _CMP_ORD_S);
148 }
149
test_mm256_cmp_pd_eq_us(__m256d a,__m256d b)150 __m256d test_mm256_cmp_pd_eq_us(__m256d a, __m256d b) {
151 // CHECK-LABEL: test_mm256_cmp_pd_eq_us
152 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
153 return _mm256_cmp_pd(a, b, _CMP_EQ_US);
154 }
155
test_mm256_cmp_pd_nge_uq(__m256d a,__m256d b)156 __m256d test_mm256_cmp_pd_nge_uq(__m256d a, __m256d b) {
157 // CHECK-LABEL: test_mm256_cmp_pd_nge_uq
158 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
159 return _mm256_cmp_pd(a, b, _CMP_NGE_UQ);
160 }
161
test_mm256_cmp_pd_ngt_uq(__m256d a,__m256d b)162 __m256d test_mm256_cmp_pd_ngt_uq(__m256d a, __m256d b) {
163 // CHECK-LABEL: test_mm256_cmp_pd_ngt_uq
164 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
165 return _mm256_cmp_pd(a, b, _CMP_NGT_UQ);
166 }
167
test_mm256_cmp_pd_false_os(__m256d a,__m256d b)168 __m256d test_mm256_cmp_pd_false_os(__m256d a, __m256d b) {
169 // CHECK-LABEL: test_mm256_cmp_pd_false_os
170 // CHECK: call <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double> %{{.*}}, <4 x double> %{{.*}}, i8 27)
171 return _mm256_cmp_pd(a, b, _CMP_FALSE_OS);
172 }
173
test_mm256_cmp_pd_neq_os(__m256d a,__m256d b)174 __m256d test_mm256_cmp_pd_neq_os(__m256d a, __m256d b) {
175 // CHECK-LABEL: test_mm256_cmp_pd_neq_os
176 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
177 return _mm256_cmp_pd(a, b, _CMP_NEQ_OS);
178 }
179
test_mm256_cmp_pd_ge_oq(__m256d a,__m256d b)180 __m256d test_mm256_cmp_pd_ge_oq(__m256d a, __m256d b) {
181 // CHECK-LABEL: test_mm256_cmp_pd_ge_oq
182 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
183 return _mm256_cmp_pd(a, b, _CMP_GE_OQ);
184 }
185
test_mm256_cmp_pd_gt_oq(__m256d a,__m256d b)186 __m256d test_mm256_cmp_pd_gt_oq(__m256d a, __m256d b) {
187 // CHECK-LABEL: test_mm256_cmp_pd_gt_oq
188 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f64(<4 x double> %{{.*}}, <4 x double> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
189 return _mm256_cmp_pd(a, b, _CMP_GT_OQ);
190 }
191
test_mm256_cmp_pd_true_us(__m256d a,__m256d b)192 __m256d test_mm256_cmp_pd_true_us(__m256d a, __m256d b) {
193 // CHECK-LABEL: test_mm256_cmp_pd_true_us
194 // CHECK: call <4 x double> @llvm.x86.avx.cmp.pd.256(<4 x double> %{{.*}}, <4 x double> %{{.*}}, i8 31)
195 return _mm256_cmp_pd(a, b, _CMP_TRUE_US);
196 }
197
test_mm256_cmp_ps_eq_oq(__m256 a,__m256 b)198 __m256 test_mm256_cmp_ps_eq_oq(__m256 a, __m256 b) {
199 // CHECK-LABEL: test_mm256_cmp_ps_eq_oq
200 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
201 return _mm256_cmp_ps(a, b, _CMP_EQ_OQ);
202 }
203
test_mm256_cmp_ps_lt_os(__m256 a,__m256 b)204 __m256 test_mm256_cmp_ps_lt_os(__m256 a, __m256 b) {
205 // CHECK-LABEL: test_mm256_cmp_ps_lt_os
206 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
207 return _mm256_cmp_ps(a, b, _CMP_LT_OS);
208 }
209
test_mm256_cmp_ps_le_os(__m256 a,__m256 b)210 __m256 test_mm256_cmp_ps_le_os(__m256 a, __m256 b) {
211 // CHECK-LABEL: test_mm256_cmp_ps_le_os
212 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
213 return _mm256_cmp_ps(a, b, _CMP_LE_OS);
214 }
215
test_mm256_cmp_ps_unord_q(__m256 a,__m256 b)216 __m256 test_mm256_cmp_ps_unord_q(__m256 a, __m256 b) {
217 // CHECK-LABEL: test_mm256_cmp_ps_unord_q
218 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
219 return _mm256_cmp_ps(a, b, _CMP_UNORD_Q);
220 }
221
test_mm256_cmp_ps_neq_uq(__m256 a,__m256 b)222 __m256 test_mm256_cmp_ps_neq_uq(__m256 a, __m256 b) {
223 // CHECK-LABEL: test_mm256_cmp_ps_neq_uq
224 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
225 return _mm256_cmp_ps(a, b, _CMP_NEQ_UQ);
226 }
227
test_mm256_cmp_ps_nlt_us(__m256 a,__m256 b)228 __m256 test_mm256_cmp_ps_nlt_us(__m256 a, __m256 b) {
229 // CHECK-LABEL: test_mm256_cmp_ps_nlt_us
230 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
231 return _mm256_cmp_ps(a, b, _CMP_NLT_US);
232 }
233
test_mm256_cmp_ps_nle_us(__m256 a,__m256 b)234 __m256 test_mm256_cmp_ps_nle_us(__m256 a, __m256 b) {
235 // CHECK-LABEL: test_mm256_cmp_ps_nle_us
236 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
237 return _mm256_cmp_ps(a, b, _CMP_NLE_US);
238 }
239
test_mm256_cmp_ps_ord_q(__m256 a,__m256 b)240 __m256 test_mm256_cmp_ps_ord_q(__m256 a, __m256 b) {
241 // CHECK-LABEL: test_mm256_cmp_ps_ord_q
242 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
243 return _mm256_cmp_ps(a, b, _CMP_ORD_Q);
244 }
245
test_mm256_cmp_ps_eq_uq(__m256 a,__m256 b)246 __m256 test_mm256_cmp_ps_eq_uq(__m256 a, __m256 b) {
247 // CHECK-LABEL: test_mm256_cmp_ps_eq_uq
248 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
249 return _mm256_cmp_ps(a, b, _CMP_EQ_UQ);
250 }
251
test_mm256_cmp_ps_nge_us(__m256 a,__m256 b)252 __m256 test_mm256_cmp_ps_nge_us(__m256 a, __m256 b) {
253 // CHECK-LABEL: test_mm256_cmp_ps_nge_us
254 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
255 return _mm256_cmp_ps(a, b, _CMP_NGE_US);
256 }
257
test_mm256_cmp_ps_ngt_us(__m256 a,__m256 b)258 __m256 test_mm256_cmp_ps_ngt_us(__m256 a, __m256 b) {
259 // CHECK-LABEL: test_mm256_cmp_ps_ngt_us
260 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
261 return _mm256_cmp_ps(a, b, _CMP_NGT_US);
262 }
263
test_mm256_cmp_ps_false_oq(__m256 a,__m256 b)264 __m256 test_mm256_cmp_ps_false_oq(__m256 a, __m256 b) {
265 // CHECK-LABEL: test_mm256_cmp_ps_false_oq
266 // CHECK: call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %{{.*}}, <8 x float> %{{.*}}, i8 11)
267 return _mm256_cmp_ps(a, b, _CMP_FALSE_OQ);
268 }
269
test_mm256_cmp_ps_neq_oq(__m256 a,__m256 b)270 __m256 test_mm256_cmp_ps_neq_oq(__m256 a, __m256 b) {
271 // CHECK-LABEL: test_mm256_cmp_ps_neq_oq
272 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
273 return _mm256_cmp_ps(a, b, _CMP_NEQ_OQ);
274 }
275
test_mm256_cmp_ps_ge_os(__m256 a,__m256 b)276 __m256 test_mm256_cmp_ps_ge_os(__m256 a, __m256 b) {
277 // CHECK-LABEL: test_mm256_cmp_ps_ge_os
278 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
279 return _mm256_cmp_ps(a, b, _CMP_GE_OS);
280 }
281
test_mm256_cmp_ps_gt_os(__m256 a,__m256 b)282 __m256 test_mm256_cmp_ps_gt_os(__m256 a, __m256 b) {
283 // CHECK-LABEL: test_mm256_cmp_ps_gt_os
284 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
285 return _mm256_cmp_ps(a, b, _CMP_GT_OS);
286 }
287
test_mm256_cmp_ps_true_uq(__m256 a,__m256 b)288 __m256 test_mm256_cmp_ps_true_uq(__m256 a, __m256 b) {
289 // CHECK-LABEL: test_mm256_cmp_ps_true_uq
290 // CHECK: call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %{{.*}}, <8 x float> %{{.*}}, i8 15)
291 return _mm256_cmp_ps(a, b, _CMP_TRUE_UQ);
292 }
293
test_mm256_cmp_ps_eq_os(__m256 a,__m256 b)294 __m256 test_mm256_cmp_ps_eq_os(__m256 a, __m256 b) {
295 // CHECK-LABEL: test_mm256_cmp_ps_eq_os
296 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
297 return _mm256_cmp_ps(a, b, _CMP_EQ_OS);
298 }
299
test_mm256_cmp_ps_lt_oq(__m256 a,__m256 b)300 __m256 test_mm256_cmp_ps_lt_oq(__m256 a, __m256 b) {
301 // CHECK-LABEL: test_mm256_cmp_ps_lt_oq
302 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
303 return _mm256_cmp_ps(a, b, _CMP_LT_OQ);
304 }
305
test_mm256_cmp_ps_le_oq(__m256 a,__m256 b)306 __m256 test_mm256_cmp_ps_le_oq(__m256 a, __m256 b) {
307 // CHECK-LABEL: test_mm256_cmp_ps_le_oq
308 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
309 return _mm256_cmp_ps(a, b, _CMP_LE_OQ);
310 }
311
test_mm256_cmp_ps_unord_s(__m256 a,__m256 b)312 __m256 test_mm256_cmp_ps_unord_s(__m256 a, __m256 b) {
313 // CHECK-LABEL: test_mm256_cmp_ps_unord_s
314 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
315 return _mm256_cmp_ps(a, b, _CMP_UNORD_S);
316 }
317
test_mm256_cmp_ps_neq_us(__m256 a,__m256 b)318 __m256 test_mm256_cmp_ps_neq_us(__m256 a, __m256 b) {
319 // CHECK-LABEL: test_mm256_cmp_ps_neq_us
320 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
321 return _mm256_cmp_ps(a, b, _CMP_NEQ_US);
322 }
323
test_mm256_cmp_ps_nlt_uq(__m256 a,__m256 b)324 __m256 test_mm256_cmp_ps_nlt_uq(__m256 a, __m256 b) {
325 // CHECK-LABEL: test_mm256_cmp_ps_nlt_uq
326 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
327 return _mm256_cmp_ps(a, b, _CMP_NLT_UQ);
328 }
329
test_mm256_cmp_ps_nle_uq(__m256 a,__m256 b)330 __m256 test_mm256_cmp_ps_nle_uq(__m256 a, __m256 b) {
331 // CHECK-LABEL: test_mm256_cmp_ps_nle_uq
332 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
333 return _mm256_cmp_ps(a, b, _CMP_NLE_UQ);
334 }
335
test_mm256_cmp_ps_ord_s(__m256 a,__m256 b)336 __m256 test_mm256_cmp_ps_ord_s(__m256 a, __m256 b) {
337 // CHECK-LABEL: test_mm256_cmp_ps_ord_s
338 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
339 return _mm256_cmp_ps(a, b, _CMP_ORD_S);
340 }
341
test_mm256_cmp_ps_eq_us(__m256 a,__m256 b)342 __m256 test_mm256_cmp_ps_eq_us(__m256 a, __m256 b) {
343 // CHECK-LABEL: test_mm256_cmp_ps_eq_us
344 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
345 return _mm256_cmp_ps(a, b, _CMP_EQ_US);
346 }
347
test_mm256_cmp_ps_nge_uq(__m256 a,__m256 b)348 __m256 test_mm256_cmp_ps_nge_uq(__m256 a, __m256 b) {
349 // CHECK-LABEL: test_mm256_cmp_ps_nge_uq
350 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
351 return _mm256_cmp_ps(a, b, _CMP_NGE_UQ);
352 }
353
test_mm256_cmp_ps_ngt_uq(__m256 a,__m256 b)354 __m256 test_mm256_cmp_ps_ngt_uq(__m256 a, __m256 b) {
355 // CHECK-LABEL: test_mm256_cmp_ps_ngt_uq
356 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
357 return _mm256_cmp_ps(a, b, _CMP_NGT_UQ);
358 }
359
test_mm256_cmp_ps_false_os(__m256 a,__m256 b)360 __m256 test_mm256_cmp_ps_false_os(__m256 a, __m256 b) {
361 // CHECK-LABEL: test_mm256_cmp_ps_false_os
362 // CHECK: call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %{{.*}}, <8 x float> %{{.*}}, i8 27)
363 return _mm256_cmp_ps(a, b, _CMP_FALSE_OS);
364 }
365
test_mm256_cmp_ps_neq_os(__m256 a,__m256 b)366 __m256 test_mm256_cmp_ps_neq_os(__m256 a, __m256 b) {
367 // CHECK-LABEL: test_mm256_cmp_ps_neq_os
368 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmps.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
369 return _mm256_cmp_ps(a, b, _CMP_NEQ_OS);
370 }
371
test_mm256_cmp_ps_ge_oq(__m256 a,__m256 b)372 __m256 test_mm256_cmp_ps_ge_oq(__m256 a, __m256 b) {
373 // CHECK-LABEL: test_mm256_cmp_ps_ge_oq
374 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
375 return _mm256_cmp_ps(a, b, _CMP_GE_OQ);
376 }
377
test_mm256_cmp_ps_gt_oq(__m256 a,__m256 b)378 __m256 test_mm256_cmp_ps_gt_oq(__m256 a, __m256 b) {
379 // CHECK-LABEL: test_mm256_cmp_ps_gt_oq
380 // CHECK: call <8 x i1> @llvm.experimental.constrained.fcmp.v8f32(<8 x float> %{{.*}}, <8 x float> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
381 return _mm256_cmp_ps(a, b, _CMP_GT_OQ);
382 }
383
test_mm256_cmp_ps_true_us(__m256 a,__m256 b)384 __m256 test_mm256_cmp_ps_true_us(__m256 a, __m256 b) {
385 // CHECK-LABEL: test_mm256_cmp_ps_true_us
386 // CHECK: call <8 x float> @llvm.x86.avx.cmp.ps.256(<8 x float> %{{.*}}, <8 x float> %{{.*}}, i8 31)
387 return _mm256_cmp_ps(a, b, _CMP_TRUE_US);
388 }
389
test_mm_cmp_pd_eq_oq(__m128d a,__m128d b)390 __m128d test_mm_cmp_pd_eq_oq(__m128d a, __m128d b) {
391 // CHECK-LABEL: test_mm_cmp_pd_eq_oq
392 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
393 return _mm_cmp_pd(a, b, _CMP_EQ_OQ);
394 }
395
test_mm_cmp_pd_lt_os(__m128d a,__m128d b)396 __m128d test_mm_cmp_pd_lt_os(__m128d a, __m128d b) {
397 // CHECK-LABEL: test_mm_cmp_pd_lt_os
398 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
399 return _mm_cmp_pd(a, b, _CMP_LT_OS);
400 }
401
test_mm_cmp_pd_le_os(__m128d a,__m128d b)402 __m128d test_mm_cmp_pd_le_os(__m128d a, __m128d b) {
403 // CHECK-LABEL: test_mm_cmp_pd_le_os
404 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
405 return _mm_cmp_pd(a, b, _CMP_LE_OS);
406 }
407
test_mm_cmp_pd_unord_q(__m128d a,__m128d b)408 __m128d test_mm_cmp_pd_unord_q(__m128d a, __m128d b) {
409 // CHECK-LABEL: test_mm_cmp_pd_unord_q
410 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
411 return _mm_cmp_pd(a, b, _CMP_UNORD_Q);
412 }
413
test_mm_cmp_pd_neq_uq(__m128d a,__m128d b)414 __m128d test_mm_cmp_pd_neq_uq(__m128d a, __m128d b) {
415 // CHECK-LABEL: test_mm_cmp_pd_neq_uq
416 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
417 return _mm_cmp_pd(a, b, _CMP_NEQ_UQ);
418 }
419
test_mm_cmp_pd_nlt_us(__m128d a,__m128d b)420 __m128d test_mm_cmp_pd_nlt_us(__m128d a, __m128d b) {
421 // CHECK-LABEL: test_mm_cmp_pd_nlt_us
422 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
423 return _mm_cmp_pd(a, b, _CMP_NLT_US);
424 }
425
test_mm_cmp_pd_nle_us(__m128d a,__m128d b)426 __m128d test_mm_cmp_pd_nle_us(__m128d a, __m128d b) {
427 // CHECK-LABEL: test_mm_cmp_pd_nle_us
428 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
429 return _mm_cmp_pd(a, b, _CMP_NLE_US);
430 }
431
test_mm_cmp_pd_ord_q(__m128d a,__m128d b)432 __m128d test_mm_cmp_pd_ord_q(__m128d a, __m128d b) {
433 // CHECK-LABEL: test_mm_cmp_pd_ord_q
434 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
435 return _mm_cmp_pd(a, b, _CMP_ORD_Q);
436 }
437
test_mm_cmp_pd_eq_uq(__m128d a,__m128d b)438 __m128d test_mm_cmp_pd_eq_uq(__m128d a, __m128d b) {
439 // CHECK-LABEL: test_mm_cmp_pd_eq_uq
440 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
441 return _mm_cmp_pd(a, b, _CMP_EQ_UQ);
442 }
443
test_mm_cmp_pd_nge_us(__m128d a,__m128d b)444 __m128d test_mm_cmp_pd_nge_us(__m128d a, __m128d b) {
445 // CHECK-LABEL: test_mm_cmp_pd_nge_us
446 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
447 return _mm_cmp_pd(a, b, _CMP_NGE_US);
448 }
449
test_mm_cmp_pd_ngt_us(__m128d a,__m128d b)450 __m128d test_mm_cmp_pd_ngt_us(__m128d a, __m128d b) {
451 // CHECK-LABEL: test_mm_cmp_pd_ngt_us
452 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
453 return _mm_cmp_pd(a, b, _CMP_NGT_US);
454 }
455
test_mm_cmp_pd_false_oq(__m128d a,__m128d b)456 __m128d test_mm_cmp_pd_false_oq(__m128d a, __m128d b) {
457 // CHECK-LABEL: test_mm_cmp_pd_false_oq
458 // CHECK: call <2 x double> @llvm.x86.sse2.cmp.pd(<2 x double> %{{.*}}, <2 x double> %{{.*}}, i8 11)
459 return _mm_cmp_pd(a, b, _CMP_FALSE_OQ);
460 }
461
test_mm_cmp_pd_neq_oq(__m128d a,__m128d b)462 __m128d test_mm_cmp_pd_neq_oq(__m128d a, __m128d b) {
463 // CHECK-LABEL: test_mm_cmp_pd_neq_oq
464 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
465 return _mm_cmp_pd(a, b, _CMP_NEQ_OQ);
466 }
467
test_mm_cmp_pd_ge_os(__m128d a,__m128d b)468 __m128d test_mm_cmp_pd_ge_os(__m128d a, __m128d b) {
469 // CHECK-LABEL: test_mm_cmp_pd_ge_os
470 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
471 return _mm_cmp_pd(a, b, _CMP_GE_OS);
472 }
473
test_mm_cmp_pd_gt_os(__m128d a,__m128d b)474 __m128d test_mm_cmp_pd_gt_os(__m128d a, __m128d b) {
475 // CHECK-LABEL: test_mm_cmp_pd_gt_os
476 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
477 return _mm_cmp_pd(a, b, _CMP_GT_OS);
478 }
479
test_mm_cmp_pd_true_uq(__m128d a,__m128d b)480 __m128d test_mm_cmp_pd_true_uq(__m128d a, __m128d b) {
481 // CHECK-LABEL: test_mm_cmp_pd_true_uq
482 // CHECK: call <2 x double> @llvm.x86.sse2.cmp.pd(<2 x double> %{{.*}}, <2 x double> %{{.*}}, i8 15)
483 return _mm_cmp_pd(a, b, _CMP_TRUE_UQ);
484 }
485
test_mm_cmp_pd_eq_os(__m128d a,__m128d b)486 __m128d test_mm_cmp_pd_eq_os(__m128d a, __m128d b) {
487 // CHECK-LABEL: test_mm_cmp_pd_eq_os
488 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
489 return _mm_cmp_pd(a, b, _CMP_EQ_OS);
490 }
491
test_mm_cmp_pd_lt_oq(__m128d a,__m128d b)492 __m128d test_mm_cmp_pd_lt_oq(__m128d a, __m128d b) {
493 // CHECK-LABEL: test_mm_cmp_pd_lt_oq
494 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
495 return _mm_cmp_pd(a, b, _CMP_LT_OQ);
496 }
497
test_mm_cmp_pd_le_oq(__m128d a,__m128d b)498 __m128d test_mm_cmp_pd_le_oq(__m128d a, __m128d b) {
499 // CHECK-LABEL: test_mm_cmp_pd_le_oq
500 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
501 return _mm_cmp_pd(a, b, _CMP_LE_OQ);
502 }
503
test_mm_cmp_pd_unord_s(__m128d a,__m128d b)504 __m128d test_mm_cmp_pd_unord_s(__m128d a, __m128d b) {
505 // CHECK-LABEL: test_mm_cmp_pd_unord_s
506 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
507 return _mm_cmp_pd(a, b, _CMP_UNORD_S);
508 }
509
test_mm_cmp_pd_neq_us(__m128d a,__m128d b)510 __m128d test_mm_cmp_pd_neq_us(__m128d a, __m128d b) {
511 // CHECK-LABEL: test_mm_cmp_pd_neq_us
512 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
513 return _mm_cmp_pd(a, b, _CMP_NEQ_US);
514 }
515
test_mm_cmp_pd_nlt_uq(__m128d a,__m128d b)516 __m128d test_mm_cmp_pd_nlt_uq(__m128d a, __m128d b) {
517 // CHECK-LABEL: test_mm_cmp_pd_nlt_uq
518 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
519 return _mm_cmp_pd(a, b, _CMP_NLT_UQ);
520 }
521
test_mm_cmp_pd_nle_uq(__m128d a,__m128d b)522 __m128d test_mm_cmp_pd_nle_uq(__m128d a, __m128d b) {
523 // CHECK-LABEL: test_mm_cmp_pd_nle_uq
524 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
525 return _mm_cmp_pd(a, b, _CMP_NLE_UQ);
526 }
527
test_mm_cmp_pd_ord_s(__m128d a,__m128d b)528 __m128d test_mm_cmp_pd_ord_s(__m128d a, __m128d b) {
529 // CHECK-LABEL: test_mm_cmp_pd_ord_s
530 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
531 return _mm_cmp_pd(a, b, _CMP_ORD_S);
532 }
533
test_mm_cmp_pd_eq_us(__m128d a,__m128d b)534 __m128d test_mm_cmp_pd_eq_us(__m128d a, __m128d b) {
535 // CHECK-LABEL: test_mm_cmp_pd_eq_us
536 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
537 return _mm_cmp_pd(a, b, _CMP_EQ_US);
538 }
539
test_mm_cmp_pd_nge_uq(__m128d a,__m128d b)540 __m128d test_mm_cmp_pd_nge_uq(__m128d a, __m128d b) {
541 // CHECK-LABEL: test_mm_cmp_pd_nge_uq
542 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
543 return _mm_cmp_pd(a, b, _CMP_NGE_UQ);
544 }
545
test_mm_cmp_pd_ngt_uq(__m128d a,__m128d b)546 __m128d test_mm_cmp_pd_ngt_uq(__m128d a, __m128d b) {
547 // CHECK-LABEL: test_mm_cmp_pd_ngt_uq
548 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
549 return _mm_cmp_pd(a, b, _CMP_NGT_UQ);
550 }
551
test_mm_cmp_pd_false_os(__m128d a,__m128d b)552 __m128d test_mm_cmp_pd_false_os(__m128d a, __m128d b) {
553 // CHECK-LABEL: test_mm_cmp_pd_false_os
554 // CHECK: call <2 x double> @llvm.x86.sse2.cmp.pd(<2 x double> %{{.*}}, <2 x double> %{{.*}}, i8 27)
555 return _mm_cmp_pd(a, b, _CMP_FALSE_OS);
556 }
557
test_mm_cmp_pd_neq_os(__m128d a,__m128d b)558 __m128d test_mm_cmp_pd_neq_os(__m128d a, __m128d b) {
559 // CHECK-LABEL: test_mm_cmp_pd_neq_os
560 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmps.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
561 return _mm_cmp_pd(a, b, _CMP_NEQ_OS);
562 }
563
test_mm_cmp_pd_ge_oq(__m128d a,__m128d b)564 __m128d test_mm_cmp_pd_ge_oq(__m128d a, __m128d b) {
565 // CHECK-LABEL: test_mm_cmp_pd_ge_oq
566 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
567 return _mm_cmp_pd(a, b, _CMP_GE_OQ);
568 }
569
test_mm_cmp_pd_gt_oq(__m128d a,__m128d b)570 __m128d test_mm_cmp_pd_gt_oq(__m128d a, __m128d b) {
571 // CHECK-LABEL: test_mm_cmp_pd_gt_oq
572 // CHECK: call <2 x i1> @llvm.experimental.constrained.fcmp.v2f64(<2 x double> %{{.*}}, <2 x double> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
573 return _mm_cmp_pd(a, b, _CMP_GT_OQ);
574 }
575
test_mm_cmp_pd_true_us(__m128d a,__m128d b)576 __m128d test_mm_cmp_pd_true_us(__m128d a, __m128d b) {
577 // CHECK-LABEL: test_mm_cmp_pd_true_us
578 // CHECK: call <2 x double> @llvm.x86.sse2.cmp.pd(<2 x double> %{{.*}}, <2 x double> %{{.*}}, i8 31)
579 return _mm_cmp_pd(a, b, _CMP_TRUE_US);
580 }
581
test_mm_cmp_ps_eq_oq(__m128 a,__m128 b)582 __m128 test_mm_cmp_ps_eq_oq(__m128 a, __m128 b) {
583 // CHECK-LABEL: test_mm_cmp_ps_eq_oq
584 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
585 return _mm_cmp_ps(a, b, _CMP_EQ_OQ);
586 }
587
test_mm_cmp_ps_lt_os(__m128 a,__m128 b)588 __m128 test_mm_cmp_ps_lt_os(__m128 a, __m128 b) {
589 // CHECK-LABEL: test_mm_cmp_ps_lt_os
590 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
591 return _mm_cmp_ps(a, b, _CMP_LT_OS);
592 }
593
test_mm_cmp_ps_le_os(__m128 a,__m128 b)594 __m128 test_mm_cmp_ps_le_os(__m128 a, __m128 b) {
595 // CHECK-LABEL: test_mm_cmp_ps_le_os
596 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
597 return _mm_cmp_ps(a, b, _CMP_LE_OS);
598 }
599
test_mm_cmp_ps_unord_q(__m128 a,__m128 b)600 __m128 test_mm_cmp_ps_unord_q(__m128 a, __m128 b) {
601 // CHECK-LABEL: test_mm_cmp_ps_unord_q
602 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
603 return _mm_cmp_ps(a, b, _CMP_UNORD_Q);
604 }
605
test_mm_cmp_ps_neq_uq(__m128 a,__m128 b)606 __m128 test_mm_cmp_ps_neq_uq(__m128 a, __m128 b) {
607 // CHECK-LABEL: test_mm_cmp_ps_neq_uq
608 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
609 return _mm_cmp_ps(a, b, _CMP_NEQ_UQ);
610 }
611
test_mm_cmp_ps_nlt_us(__m128 a,__m128 b)612 __m128 test_mm_cmp_ps_nlt_us(__m128 a, __m128 b) {
613 // CHECK-LABEL: test_mm_cmp_ps_nlt_us
614 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
615 return _mm_cmp_ps(a, b, _CMP_NLT_US);
616 }
617
test_mm_cmp_ps_nle_us(__m128 a,__m128 b)618 __m128 test_mm_cmp_ps_nle_us(__m128 a, __m128 b) {
619 // CHECK-LABEL: test_mm_cmp_ps_nle_us
620 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
621 return _mm_cmp_ps(a, b, _CMP_NLE_US);
622 }
623
test_mm_cmp_ps_ord_q(__m128 a,__m128 b)624 __m128 test_mm_cmp_ps_ord_q(__m128 a, __m128 b) {
625 // CHECK-LABEL: test_mm_cmp_ps_ord_q
626 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
627 return _mm_cmp_ps(a, b, _CMP_ORD_Q);
628 }
629
test_mm_cmp_ps_eq_uq(__m128 a,__m128 b)630 __m128 test_mm_cmp_ps_eq_uq(__m128 a, __m128 b) {
631 // CHECK-LABEL: test_mm_cmp_ps_eq_uq
632 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
633 return _mm_cmp_ps(a, b, _CMP_EQ_UQ);
634 }
635
test_mm_cmp_ps_nge_us(__m128 a,__m128 b)636 __m128 test_mm_cmp_ps_nge_us(__m128 a, __m128 b) {
637 // CHECK-LABEL: test_mm_cmp_ps_nge_us
638 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
639 return _mm_cmp_ps(a, b, _CMP_NGE_US);
640 }
641
test_mm_cmp_ps_ngt_us(__m128 a,__m128 b)642 __m128 test_mm_cmp_ps_ngt_us(__m128 a, __m128 b) {
643 // CHECK-LABEL: test_mm_cmp_ps_ngt_us
644 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
645 return _mm_cmp_ps(a, b, _CMP_NGT_US);
646 }
647
test_mm_cmp_ps_false_oq(__m128 a,__m128 b)648 __m128 test_mm_cmp_ps_false_oq(__m128 a, __m128 b) {
649 // CHECK-LABEL: test_mm_cmp_ps_false_oq
650 // CHECK: call <4 x float> @llvm.x86.sse.cmp.ps(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i8 11)
651 return _mm_cmp_ps(a, b, _CMP_FALSE_OQ);
652 }
653
test_mm_cmp_ps_neq_oq(__m128 a,__m128 b)654 __m128 test_mm_cmp_ps_neq_oq(__m128 a, __m128 b) {
655 // CHECK-LABEL: test_mm_cmp_ps_neq_oq
656 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
657 return _mm_cmp_ps(a, b, _CMP_NEQ_OQ);
658 }
659
test_mm_cmp_ps_ge_os(__m128 a,__m128 b)660 __m128 test_mm_cmp_ps_ge_os(__m128 a, __m128 b) {
661 // CHECK-LABEL: test_mm_cmp_ps_ge_os
662 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
663 return _mm_cmp_ps(a, b, _CMP_GE_OS);
664 }
665
test_mm_cmp_ps_gt_os(__m128 a,__m128 b)666 __m128 test_mm_cmp_ps_gt_os(__m128 a, __m128 b) {
667 // CHECK-LABEL: test_mm_cmp_ps_gt_os
668 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
669 return _mm_cmp_ps(a, b, _CMP_GT_OS);
670 }
671
test_mm_cmp_ps_true_uq(__m128 a,__m128 b)672 __m128 test_mm_cmp_ps_true_uq(__m128 a, __m128 b) {
673 // CHECK-LABEL: test_mm_cmp_ps_true_uq
674 // CHECK: call <4 x float> @llvm.x86.sse.cmp.ps(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i8 15)
675 return _mm_cmp_ps(a, b, _CMP_TRUE_UQ);
676 }
677
test_mm_cmp_ps_eq_os(__m128 a,__m128 b)678 __m128 test_mm_cmp_ps_eq_os(__m128 a, __m128 b) {
679 // CHECK-LABEL: test_mm_cmp_ps_eq_os
680 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"oeq", metadata !"fpexcept.strict")
681 return _mm_cmp_ps(a, b, _CMP_EQ_OS);
682 }
683
test_mm_cmp_ps_lt_oq(__m128 a,__m128 b)684 __m128 test_mm_cmp_ps_lt_oq(__m128 a, __m128 b) {
685 // CHECK-LABEL: test_mm_cmp_ps_lt_oq
686 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"olt", metadata !"fpexcept.strict")
687 return _mm_cmp_ps(a, b, _CMP_LT_OQ);
688 }
689
test_mm_cmp_ps_le_oq(__m128 a,__m128 b)690 __m128 test_mm_cmp_ps_le_oq(__m128 a, __m128 b) {
691 // CHECK-LABEL: test_mm_cmp_ps_le_oq
692 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ole", metadata !"fpexcept.strict")
693 return _mm_cmp_ps(a, b, _CMP_LE_OQ);
694 }
695
test_mm_cmp_ps_unord_s(__m128 a,__m128 b)696 __m128 test_mm_cmp_ps_unord_s(__m128 a, __m128 b) {
697 // CHECK-LABEL: test_mm_cmp_ps_unord_s
698 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"uno", metadata !"fpexcept.strict")
699 return _mm_cmp_ps(a, b, _CMP_UNORD_S);
700 }
701
test_mm_cmp_ps_neq_us(__m128 a,__m128 b)702 __m128 test_mm_cmp_ps_neq_us(__m128 a, __m128 b) {
703 // CHECK-LABEL: test_mm_cmp_ps_neq_us
704 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"une", metadata !"fpexcept.strict")
705 return _mm_cmp_ps(a, b, _CMP_NEQ_US);
706 }
707
test_mm_cmp_ps_nlt_uq(__m128 a,__m128 b)708 __m128 test_mm_cmp_ps_nlt_uq(__m128 a, __m128 b) {
709 // CHECK-LABEL: test_mm_cmp_ps_nlt_uq
710 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"uge", metadata !"fpexcept.strict")
711 return _mm_cmp_ps(a, b, _CMP_NLT_UQ);
712 }
713
test_mm_cmp_ps_nle_uq(__m128 a,__m128 b)714 __m128 test_mm_cmp_ps_nle_uq(__m128 a, __m128 b) {
715 // CHECK-LABEL: test_mm_cmp_ps_nle_uq
716 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ugt", metadata !"fpexcept.strict")
717 return _mm_cmp_ps(a, b, _CMP_NLE_UQ);
718 }
719
test_mm_cmp_ps_ord_s(__m128 a,__m128 b)720 __m128 test_mm_cmp_ps_ord_s(__m128 a, __m128 b) {
721 // CHECK-LABEL: test_mm_cmp_ps_ord_s
722 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ord", metadata !"fpexcept.strict")
723 return _mm_cmp_ps(a, b, _CMP_ORD_S);
724 }
725
test_mm_cmp_ps_eq_us(__m128 a,__m128 b)726 __m128 test_mm_cmp_ps_eq_us(__m128 a, __m128 b) {
727 // CHECK-LABEL: test_mm_cmp_ps_eq_us
728 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ueq", metadata !"fpexcept.strict")
729 return _mm_cmp_ps(a, b, _CMP_EQ_US);
730 }
731
test_mm_cmp_ps_nge_uq(__m128 a,__m128 b)732 __m128 test_mm_cmp_ps_nge_uq(__m128 a, __m128 b) {
733 // CHECK-LABEL: test_mm_cmp_ps_nge_uq
734 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ult", metadata !"fpexcept.strict")
735 return _mm_cmp_ps(a, b, _CMP_NGE_UQ);
736 }
737
test_mm_cmp_ps_ngt_uq(__m128 a,__m128 b)738 __m128 test_mm_cmp_ps_ngt_uq(__m128 a, __m128 b) {
739 // CHECK-LABEL: test_mm_cmp_ps_ngt_uq
740 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ule", metadata !"fpexcept.strict")
741 return _mm_cmp_ps(a, b, _CMP_NGT_UQ);
742 }
743
test_mm_cmp_ps_false_os(__m128 a,__m128 b)744 __m128 test_mm_cmp_ps_false_os(__m128 a, __m128 b) {
745 // CHECK-LABEL: test_mm_cmp_ps_false_os
746 // CHECK: call <4 x float> @llvm.x86.sse.cmp.ps(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i8 27)
747 return _mm_cmp_ps(a, b, _CMP_FALSE_OS);
748 }
749
test_mm_cmp_ps_neq_os(__m128 a,__m128 b)750 __m128 test_mm_cmp_ps_neq_os(__m128 a, __m128 b) {
751 // CHECK-LABEL: test_mm_cmp_ps_neq_os
752 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmps.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"one", metadata !"fpexcept.strict")
753 return _mm_cmp_ps(a, b, _CMP_NEQ_OS);
754 }
755
test_mm_cmp_ps_ge_oq(__m128 a,__m128 b)756 __m128 test_mm_cmp_ps_ge_oq(__m128 a, __m128 b) {
757 // CHECK-LABEL: test_mm_cmp_ps_ge_oq
758 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"oge", metadata !"fpexcept.strict")
759 return _mm_cmp_ps(a, b, _CMP_GE_OQ);
760 }
761
test_mm_cmp_ps_gt_oq(__m128 a,__m128 b)762 __m128 test_mm_cmp_ps_gt_oq(__m128 a, __m128 b) {
763 // CHECK-LABEL: test_mm_cmp_ps_gt_oq
764 // CHECK: call <4 x i1> @llvm.experimental.constrained.fcmp.v4f32(<4 x float> %{{.*}}, <4 x float> %{{.*}}, metadata !"ogt", metadata !"fpexcept.strict")
765 return _mm_cmp_ps(a, b, _CMP_GT_OQ);
766 }
767
test_mm_cmp_ps_true_us(__m128 a,__m128 b)768 __m128 test_mm_cmp_ps_true_us(__m128 a, __m128 b) {
769 // CHECK-LABEL: test_mm_cmp_ps_true_us
770 // CHECK: call <4 x float> @llvm.x86.sse.cmp.ps(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i8 31)
771 return _mm_cmp_ps(a, b, _CMP_TRUE_US);
772 }
773