1 // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -emit-llvm -o - -Wall -Werror | FileCheck %s
2 // RUN: %clang_cc1 -flax-vector-conversions=none -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +ssse3 -fno-signed-char -emit-llvm -o - -Wall -Werror | FileCheck %s
7 __m64
test_mm_abs_pi8(__m64 a
) {
8 // CHECK-LABEL: test_mm_abs_pi8
9 // CHECK: call x86_mmx @llvm.x86.ssse3.pabs.b
10 return _mm_abs_pi8(a
);
13 __m64
test_mm_abs_pi16(__m64 a
) {
14 // CHECK-LABEL: test_mm_abs_pi16
15 // CHECK: call x86_mmx @llvm.x86.ssse3.pabs.w
16 return _mm_abs_pi16(a
);
19 __m64
test_mm_abs_pi32(__m64 a
) {
20 // CHECK-LABEL: test_mm_abs_pi32
21 // CHECK: call x86_mmx @llvm.x86.ssse3.pabs.d
22 return _mm_abs_pi32(a
);
25 __m64
test_mm_add_pi8(__m64 a
, __m64 b
) {
26 // CHECK-LABEL: test_mm_add_pi8
27 // CHECK: call x86_mmx @llvm.x86.mmx.padd.b
28 return _mm_add_pi8(a
, b
);
31 __m64
test_mm_add_pi16(__m64 a
, __m64 b
) {
32 // CHECK-LABEL: test_mm_add_pi16
33 // CHECK: call x86_mmx @llvm.x86.mmx.padd.w
34 return _mm_add_pi16(a
, b
);
37 __m64
test_mm_add_pi32(__m64 a
, __m64 b
) {
38 // CHECK-LABEL: test_mm_add_pi32
39 // CHECK: call x86_mmx @llvm.x86.mmx.padd.d
40 return _mm_add_pi32(a
, b
);
43 __m64
test_mm_add_si64(__m64 a
, __m64 b
) {
44 // CHECK-LABEL: test_mm_add_si64
45 // CHECK: call x86_mmx @llvm.x86.mmx.padd.q(x86_mmx %{{.*}}, x86_mmx %{{.*}})
46 return _mm_add_si64(a
, b
);
49 __m64
test_mm_adds_pi8(__m64 a
, __m64 b
) {
50 // CHECK-LABEL: test_mm_adds_pi8
51 // CHECK: call x86_mmx @llvm.x86.mmx.padds.b
52 return _mm_adds_pi8(a
, b
);
55 __m64
test_mm_adds_pi16(__m64 a
, __m64 b
) {
56 // CHECK-LABEL: test_mm_adds_pi16
57 // CHECK: call x86_mmx @llvm.x86.mmx.padds.w
58 return _mm_adds_pi16(a
, b
);
61 __m64
test_mm_adds_pu8(__m64 a
, __m64 b
) {
62 // CHECK-LABEL: test_mm_adds_pu8
63 // CHECK: call x86_mmx @llvm.x86.mmx.paddus.b
64 return _mm_adds_pu8(a
, b
);
67 __m64
test_mm_adds_pu16(__m64 a
, __m64 b
) {
68 // CHECK-LABEL: test_mm_adds_pu16
69 // CHECK: call x86_mmx @llvm.x86.mmx.paddus.w
70 return _mm_adds_pu16(a
, b
);
73 __m64
test_mm_alignr_pi8(__m64 a
, __m64 b
) {
74 // CHECK-LABEL: test_mm_alignr_pi8
75 // CHECK: call x86_mmx @llvm.x86.mmx.palignr.b
76 return _mm_alignr_pi8(a
, b
, 2);
79 __m64
test_mm_and_si64(__m64 a
, __m64 b
) {
80 // CHECK-LABEL: test_mm_and_si64
81 // CHECK: call x86_mmx @llvm.x86.mmx.pand
82 return _mm_and_si64(a
, b
);
85 __m64
test_mm_andnot_si64(__m64 a
, __m64 b
) {
86 // CHECK-LABEL: test_mm_andnot_si64
87 // CHECK: call x86_mmx @llvm.x86.mmx.pandn
88 return _mm_andnot_si64(a
, b
);
91 __m64
test_mm_avg_pu8(__m64 a
, __m64 b
) {
92 // CHECK-LABEL: test_mm_avg_pu8
93 // CHECK: call x86_mmx @llvm.x86.mmx.pavg.b
94 return _mm_avg_pu8(a
, b
);
97 __m64
test_mm_avg_pu16(__m64 a
, __m64 b
) {
98 // CHECK-LABEL: test_mm_avg_pu16
99 // CHECK: call x86_mmx @llvm.x86.mmx.pavg.w
100 return _mm_avg_pu16(a
, b
);
103 __m64
test_mm_cmpeq_pi8(__m64 a
, __m64 b
) {
104 // CHECK-LABEL: test_mm_cmpeq_pi8
105 // CHECK: call x86_mmx @llvm.x86.mmx.pcmpeq.b
106 return _mm_cmpeq_pi8(a
, b
);
109 __m64
test_mm_cmpeq_pi16(__m64 a
, __m64 b
) {
110 // CHECK-LABEL: test_mm_cmpeq_pi16
111 // CHECK: call x86_mmx @llvm.x86.mmx.pcmpeq.w
112 return _mm_cmpeq_pi16(a
, b
);
115 __m64
test_mm_cmpeq_pi32(__m64 a
, __m64 b
) {
116 // CHECK-LABEL: test_mm_cmpeq_pi32
117 // CHECK: call x86_mmx @llvm.x86.mmx.pcmpeq.d
118 return _mm_cmpeq_pi32(a
, b
);
121 __m64
test_mm_cmpgt_pi8(__m64 a
, __m64 b
) {
122 // CHECK-LABEL: test_mm_cmpgt_pi8
123 // CHECK: call x86_mmx @llvm.x86.mmx.pcmpgt.b
124 return _mm_cmpgt_pi8(a
, b
);
127 __m64
test_mm_cmpgt_pi16(__m64 a
, __m64 b
) {
128 // CHECK-LABEL: test_mm_cmpgt_pi16
129 // CHECK: call x86_mmx @llvm.x86.mmx.pcmpgt.w
130 return _mm_cmpgt_pi16(a
, b
);
133 __m64
test_mm_cmpgt_pi32(__m64 a
, __m64 b
) {
134 // CHECK-LABEL: test_mm_cmpgt_pi32
135 // CHECK: call x86_mmx @llvm.x86.mmx.pcmpgt.d
136 return _mm_cmpgt_pi32(a
, b
);
139 __m128
test_mm_cvt_pi2ps(__m128 a
, __m64 b
) {
140 // CHECK-LABEL: test_mm_cvt_pi2ps
141 // CHECK: <4 x float> @llvm.x86.sse.cvtpi2ps
142 return _mm_cvt_pi2ps(a
, b
);
145 __m64
test_mm_cvt_ps2pi(__m128 a
) {
146 // CHECK-LABEL: test_mm_cvt_ps2pi
147 // CHECK: call x86_mmx @llvm.x86.sse.cvtps2pi
148 return _mm_cvt_ps2pi(a
);
151 __m64
test_mm_cvtpd_pi32(__m128d a
) {
152 // CHECK-LABEL: test_mm_cvtpd_pi32
153 // CHECK: call x86_mmx @llvm.x86.sse.cvtpd2pi
154 return _mm_cvtpd_pi32(a
);
157 __m128
test_mm_cvtpi16_ps(__m64 a
) {
158 // CHECK-LABEL: test_mm_cvtpi16_ps
159 // CHECK: call <4 x float> @llvm.x86.sse.cvtpi2ps
160 return _mm_cvtpi16_ps(a
);
163 __m128d
test_mm_cvtpi32_pd(__m64 a
) {
164 // CHECK-LABEL: test_mm_cvtpi32_pd
165 // CHECK: call <2 x double> @llvm.x86.sse.cvtpi2pd
166 return _mm_cvtpi32_pd(a
);
169 __m128
test_mm_cvtpi32_ps(__m128 a
, __m64 b
) {
170 // CHECK-LABEL: test_mm_cvtpi32_ps
171 // CHECK: call <4 x float> @llvm.x86.sse.cvtpi2ps
172 return _mm_cvtpi32_ps(a
, b
);
175 __m128
test_mm_cvtpi32x2_ps(__m64 a
, __m64 b
) {
176 // CHECK-LABEL: test_mm_cvtpi32x2_ps
177 // CHECK: call <4 x float> @llvm.x86.sse.cvtpi2ps
178 // CHECK: call <4 x float> @llvm.x86.sse.cvtpi2ps
179 return _mm_cvtpi32x2_ps(a
, b
);
182 __m64
test_mm_cvtps_pi16(__m128 a
) {
183 // CHECK-LABEL: test_mm_cvtps_pi16
184 // CHECK: call x86_mmx @llvm.x86.sse.cvtps2pi
185 return _mm_cvtps_pi16(a
);
188 __m64
test_mm_cvtps_pi32(__m128 a
) {
189 // CHECK-LABEL: test_mm_cvtps_pi32
190 // CHECK: call x86_mmx @llvm.x86.sse.cvtps2pi
191 return _mm_cvtps_pi32(a
);
194 __m64
test_mm_cvtsi32_si64(int a
) {
195 // CHECK-LABEL: test_mm_cvtsi32_si64
196 // CHECK: insertelement <2 x i32>
197 return _mm_cvtsi32_si64(a
);
200 int test_mm_cvtsi64_si32(__m64 a
) {
201 // CHECK-LABEL: test_mm_cvtsi64_si32
202 // CHECK: extractelement <2 x i32>
203 return _mm_cvtsi64_si32(a
);
206 __m64
test_mm_cvttpd_pi32(__m128d a
) {
207 // CHECK-LABEL: test_mm_cvttpd_pi32
208 // CHECK: call x86_mmx @llvm.x86.sse.cvttpd2pi
209 return _mm_cvttpd_pi32(a
);
212 __m64
test_mm_cvttps_pi32(__m128 a
) {
213 // CHECK-LABEL: test_mm_cvttps_pi32
214 // CHECK: call x86_mmx @llvm.x86.sse.cvttps2pi
215 return _mm_cvttps_pi32(a
);
218 int test_mm_extract_pi16(__m64 a
) {
219 // CHECK-LABEL: test_mm_extract_pi16
220 // CHECK: call i32 @llvm.x86.mmx.pextr.w
221 return _mm_extract_pi16(a
, 2);
224 __m64
test_m_from_int(int a
) {
225 // CHECK-LABEL: test_m_from_int
226 // CHECK: insertelement <2 x i32>
227 return _m_from_int(a
);
230 __m64
test_m_from_int64(long long a
) {
231 // CHECK-LABEL: test_m_from_int64
232 return _m_from_int64(a
);
235 __m64
test_mm_hadd_pi16(__m64 a
, __m64 b
) {
236 // CHECK-LABEL: test_mm_hadd_pi16
237 // CHECK: call x86_mmx @llvm.x86.ssse3.phadd.w
238 return _mm_hadd_pi16(a
, b
);
241 __m64
test_mm_hadd_pi32(__m64 a
, __m64 b
) {
242 // CHECK-LABEL: test_mm_hadd_pi32
243 // CHECK: call x86_mmx @llvm.x86.ssse3.phadd.d
244 return _mm_hadd_pi32(a
, b
);
247 __m64
test_mm_hadds_pi16(__m64 a
, __m64 b
) {
248 // CHECK-LABEL: test_mm_hadds_pi16
249 // CHECK: call x86_mmx @llvm.x86.ssse3.phadd.sw
250 return _mm_hadds_pi16(a
, b
);
253 __m64
test_mm_hsub_pi16(__m64 a
, __m64 b
) {
254 // CHECK-LABEL: test_mm_hsub_pi16
255 // CHECK: call x86_mmx @llvm.x86.ssse3.phsub.w
256 return _mm_hsub_pi16(a
, b
);
259 __m64
test_mm_hsub_pi32(__m64 a
, __m64 b
) {
260 // CHECK-LABEL: test_mm_hsub_pi32
261 // CHECK: call x86_mmx @llvm.x86.ssse3.phsub.d
262 return _mm_hsub_pi32(a
, b
);
265 __m64
test_mm_hsubs_pi16(__m64 a
, __m64 b
) {
266 // CHECK-LABEL: test_mm_hsubs_pi16
267 // CHECK: call x86_mmx @llvm.x86.ssse3.phsub.sw
268 return _mm_hsubs_pi16(a
, b
);
271 __m64
test_mm_insert_pi16(__m64 a
, int d
) {
272 // CHECK-LABEL: test_mm_insert_pi16
273 // CHECK: call x86_mmx @llvm.x86.mmx.pinsr.w
274 return _mm_insert_pi16(a
, d
, 2);
277 __m64
test_mm_madd_pi16(__m64 a
, __m64 b
) {
278 // CHECK-LABEL: test_mm_madd_pi16
279 // CHECK: call x86_mmx @llvm.x86.mmx.pmadd.wd
280 return _mm_madd_pi16(a
, b
);
283 __m64
test_mm_maddubs_pi16(__m64 a
, __m64 b
) {
284 // CHECK-LABEL: test_mm_maddubs_pi16
285 // CHECK: call x86_mmx @llvm.x86.ssse3.pmadd.ub.sw
286 return _mm_maddubs_pi16(a
, b
);
289 void test_mm_maskmove_si64(__m64 d
, __m64 n
, char *p
) {
290 // CHECK-LABEL: test_mm_maskmove_si64
291 // CHECK: call void @llvm.x86.mmx.maskmovq
292 _mm_maskmove_si64(d
, n
, p
);
295 __m64
test_mm_max_pi16(__m64 a
, __m64 b
) {
296 // CHECK-LABEL: test_mm_max_pi16
297 // CHECK: call x86_mmx @llvm.x86.mmx.pmaxs.w
298 return _mm_max_pi16(a
, b
);
301 __m64
test_mm_max_pu8(__m64 a
, __m64 b
) {
302 // CHECK-LABEL: test_mm_max_pu8
303 // CHECK: call x86_mmx @llvm.x86.mmx.pmaxu.b
304 return _mm_max_pu8(a
, b
);
307 __m64
test_mm_min_pi16(__m64 a
, __m64 b
) {
308 // CHECK-LABEL: test_mm_min_pi16
309 // CHECK: call x86_mmx @llvm.x86.mmx.pmins.w
310 return _mm_min_pi16(a
, b
);
313 __m64
test_mm_min_pu8(__m64 a
, __m64 b
) {
314 // CHECK-LABEL: test_mm_min_pu8
315 // CHECK: call x86_mmx @llvm.x86.mmx.pminu.b
316 return _mm_min_pu8(a
, b
);
319 int test_mm_movemask_pi8(__m64 a
) {
320 // CHECK-LABEL: test_mm_movemask_pi8
321 // CHECK: call i32 @llvm.x86.mmx.pmovmskb
322 return _mm_movemask_pi8(a
);
325 __m64
test_mm_mul_su32(__m64 a
, __m64 b
) {
326 // CHECK-LABEL: test_mm_mul_su32
327 // CHECK: call x86_mmx @llvm.x86.mmx.pmulu.dq(x86_mmx %{{.*}}, x86_mmx %{{.*}})
328 return _mm_mul_su32(a
, b
);
331 __m64
test_mm_mulhi_pi16(__m64 a
, __m64 b
) {
332 // CHECK-LABEL: test_mm_mulhi_pi16
333 // CHECK: call x86_mmx @llvm.x86.mmx.pmulh.w
334 return _mm_mulhi_pi16(a
, b
);
337 __m64
test_mm_mulhi_pu16(__m64 a
, __m64 b
) {
338 // CHECK-LABEL: test_mm_mulhi_pu16
339 // CHECK: call x86_mmx @llvm.x86.mmx.pmulhu.w
340 return _mm_mulhi_pu16(a
, b
);
343 __m64
test_mm_mulhrs_pi16(__m64 a
, __m64 b
) {
344 // CHECK-LABEL: test_mm_mulhrs_pi16
345 // CHECK: call x86_mmx @llvm.x86.ssse3.pmul.hr.sw
346 return _mm_mulhrs_pi16(a
, b
);
349 __m64
test_mm_mullo_pi16(__m64 a
, __m64 b
) {
350 // CHECK-LABEL: test_mm_mullo_pi16
351 // CHECK: call x86_mmx @llvm.x86.mmx.pmull.w
352 return _mm_mullo_pi16(a
, b
);
355 __m64
test_mm_or_si64(__m64 a
, __m64 b
) {
356 // CHECK-LABEL: test_mm_or_si64
357 // CHECK: call x86_mmx @llvm.x86.mmx.por
358 return _mm_or_si64(a
, b
);
361 __m64
test_mm_packs_pi16(__m64 a
, __m64 b
) {
362 // CHECK-LABEL: test_mm_packs_pi16
363 // CHECK: call x86_mmx @llvm.x86.mmx.packsswb
364 return _mm_packs_pi16(a
, b
);
367 __m64
test_mm_packs_pi32(__m64 a
, __m64 b
) {
368 // CHECK-LABEL: test_mm_packs_pi32
369 // CHECK: call x86_mmx @llvm.x86.mmx.packssdw
370 return _mm_packs_pi32(a
, b
);
373 __m64
test_mm_packs_pu16(__m64 a
, __m64 b
) {
374 // CHECK-LABEL: test_mm_packs_pu16
375 // CHECK: call x86_mmx @llvm.x86.mmx.packuswb
376 return _mm_packs_pu16(a
, b
);
379 __m64
test_mm_sad_pu8(__m64 a
, __m64 b
) {
380 // CHECK-LABEL: test_mm_sad_pu8
381 // CHECK: call x86_mmx @llvm.x86.mmx.psad.bw
382 return _mm_sad_pu8(a
, b
);
385 __m64
test_mm_set_pi8(char a
, char b
, char c
, char d
, char e
, char f
, char g
, char h
) {
386 // CHECK-LABEL: test_mm_set_pi8
387 // CHECK: insertelement <8 x i8>
388 // CHECK: insertelement <8 x i8>
389 // CHECK: insertelement <8 x i8>
390 // CHECK: insertelement <8 x i8>
391 // CHECK: insertelement <8 x i8>
392 // CHECK: insertelement <8 x i8>
393 // CHECK: insertelement <8 x i8>
394 // CHECK: insertelement <8 x i8>
395 return _mm_set_pi8(a
, b
, c
, d
, e
, f
, g
, h
);
398 __m64
test_mm_set_pi16(short a
, short b
, short c
, short d
) {
399 // CHECK-LABEL: test_mm_set_pi16
400 // CHECK: insertelement <4 x i16>
401 // CHECK: insertelement <4 x i16>
402 // CHECK: insertelement <4 x i16>
403 // CHECK: insertelement <4 x i16>
404 return _mm_set_pi16(a
, b
, c
, d
);
407 __m64
test_mm_set_pi32(int a
, int b
) {
408 // CHECK-LABEL: test_mm_set_pi32
409 // CHECK: insertelement <2 x i32>
410 // CHECK: insertelement <2 x i32>
411 return _mm_set_pi32(a
, b
);
414 __m64
test_mm_setr_pi8(char a
, char b
, char c
, char d
, char e
, char f
, char g
, char h
) {
415 // CHECK-LABEL: test_mm_setr_pi8
416 // CHECK: insertelement <8 x i8>
417 // CHECK: insertelement <8 x i8>
418 // CHECK: insertelement <8 x i8>
419 // CHECK: insertelement <8 x i8>
420 // CHECK: insertelement <8 x i8>
421 // CHECK: insertelement <8 x i8>
422 // CHECK: insertelement <8 x i8>
423 // CHECK: insertelement <8 x i8>
424 return _mm_setr_pi8(a
, b
, c
, d
, e
, f
, g
, h
);
427 __m64
test_mm_setr_pi16(short a
, short b
, short c
, short d
) {
428 // CHECK-LABEL: test_mm_setr_pi16
429 // CHECK: insertelement <4 x i16>
430 // CHECK: insertelement <4 x i16>
431 // CHECK: insertelement <4 x i16>
432 // CHECK: insertelement <4 x i16>
433 return _mm_setr_pi16(a
, b
, c
, d
);
436 __m64
test_mm_setr_pi32(int a
, int b
) {
437 // CHECK-LABEL: test_mm_setr_pi32
438 // CHECK: insertelement <2 x i32>
439 // CHECK: insertelement <2 x i32>
440 return _mm_setr_pi32(a
, b
);
443 __m64
test_mm_set1_pi8(char a
) {
444 // CHECK-LABEL: test_mm_set1_pi8
445 // CHECK: insertelement <8 x i8>
446 // CHECK: insertelement <8 x i8>
447 // CHECK: insertelement <8 x i8>
448 // CHECK: insertelement <8 x i8>
449 // CHECK: insertelement <8 x i8>
450 // CHECK: insertelement <8 x i8>
451 // CHECK: insertelement <8 x i8>
452 // CHECK: insertelement <8 x i8>
453 return _mm_set1_pi8(a
);
456 __m64
test_mm_set1_pi16(short a
) {
457 // CHECK-LABEL: test_mm_set1_pi16
458 // CHECK: insertelement <4 x i16>
459 // CHECK: insertelement <4 x i16>
460 // CHECK: insertelement <4 x i16>
461 // CHECK: insertelement <4 x i16>
462 return _mm_set1_pi16(a
);
465 __m64
test_mm_set1_pi32(int a
) {
466 // CHECK-LABEL: test_mm_set1_pi32
467 // CHECK: insertelement <2 x i32>
468 // CHECK: insertelement <2 x i32>
469 return _mm_set1_pi32(a
);
472 __m64
test_mm_shuffle_pi8(__m64 a
, __m64 b
) {
473 // CHECK-LABEL: test_mm_shuffle_pi8
474 // CHECK: call x86_mmx @llvm.x86.ssse3.pshuf.b
475 return _mm_shuffle_pi8(a
, b
);
478 __m64
test_mm_shuffle_pi16(__m64 a
) {
479 // CHECK-LABEL: test_mm_shuffle_pi16
480 // CHECK: call x86_mmx @llvm.x86.sse.pshuf.w
481 return _mm_shuffle_pi16(a
, 3);
484 __m64
test_mm_sign_pi8(__m64 a
, __m64 b
) {
485 // CHECK-LABEL: test_mm_sign_pi8
486 // CHECK: call x86_mmx @llvm.x86.ssse3.psign.b
487 return _mm_sign_pi8(a
, b
);
490 __m64
test_mm_sign_pi16(__m64 a
, __m64 b
) {
491 // CHECK-LABEL: test_mm_sign_pi16
492 // CHECK: call x86_mmx @llvm.x86.ssse3.psign.w
493 return _mm_sign_pi16(a
, b
);
496 __m64
test_mm_sign_pi32(__m64 a
, __m64 b
) {
497 // CHECK-LABEL: test_mm_sign_pi32
498 // CHECK: call x86_mmx @llvm.x86.ssse3.psign.d
499 return _mm_sign_pi32(a
, b
);
502 __m64
test_mm_sll_pi16(__m64 a
, __m64 b
) {
503 // CHECK-LABEL: test_mm_sll_pi16
504 // CHECK: call x86_mmx @llvm.x86.mmx.psll.w
505 return _mm_sll_pi16(a
, b
);
508 __m64
test_mm_sll_pi32(__m64 a
, __m64 b
) {
509 // CHECK-LABEL: test_mm_sll_pi32
510 // CHECK: call x86_mmx @llvm.x86.mmx.psll.d
511 return _mm_sll_pi32(a
, b
);
514 __m64
test_mm_sll_si64(__m64 a
, __m64 b
) {
515 // CHECK-LABEL: test_mm_sll_si64
516 // CHECK: call x86_mmx @llvm.x86.mmx.psll.q
517 return _mm_sll_si64(a
, b
);
520 __m64
test_mm_slli_pi16(__m64 a
) {
521 // CHECK-LABEL: test_mm_slli_pi16
522 // CHECK: call x86_mmx @llvm.x86.mmx.pslli.w
523 return _mm_slli_pi16(a
, 3);
526 __m64
test_mm_slli_pi32(__m64 a
) {
527 // CHECK-LABEL: test_mm_slli_pi32
528 // CHECK: call x86_mmx @llvm.x86.mmx.pslli.d
529 return _mm_slli_pi32(a
, 3);
532 __m64
test_mm_slli_si64(__m64 a
) {
533 // CHECK-LABEL: test_mm_slli_si64
534 // CHECK: call x86_mmx @llvm.x86.mmx.pslli.q
535 return _mm_slli_si64(a
, 3);
538 __m64
test_mm_sra_pi16(__m64 a
, __m64 b
) {
539 // CHECK-LABEL: test_mm_sra_pi16
540 // CHECK: call x86_mmx @llvm.x86.mmx.psra.w
541 return _mm_sra_pi16(a
, b
);
544 __m64
test_mm_sra_pi32(__m64 a
, __m64 b
) {
545 // CHECK-LABEL: test_mm_sra_pi32
546 // CHECK: call x86_mmx @llvm.x86.mmx.psra.d
547 return _mm_sra_pi32(a
, b
);
550 __m64
test_mm_srai_pi16(__m64 a
) {
551 // CHECK-LABEL: test_mm_srai_pi16
552 // CHECK: call x86_mmx @llvm.x86.mmx.psrai.w
553 return _mm_srai_pi16(a
, 3);
556 __m64
test_mm_srai_pi32(__m64 a
) {
557 // CHECK-LABEL: test_mm_srai_pi32
558 // CHECK: call x86_mmx @llvm.x86.mmx.psrai.d
559 return _mm_srai_pi32(a
, 3);
562 __m64
test_mm_srl_pi16(__m64 a
, __m64 b
) {
563 // CHECK-LABEL: test_mm_srl_pi16
564 // CHECK: call x86_mmx @llvm.x86.mmx.psrl.w
565 return _mm_srl_pi16(a
, b
);
568 __m64
test_mm_srl_pi32(__m64 a
, __m64 b
) {
569 // CHECK-LABEL: test_mm_srl_pi32
570 // CHECK: call x86_mmx @llvm.x86.mmx.psrl.d
571 return _mm_srl_pi32(a
, b
);
574 __m64
test_mm_srl_si64(__m64 a
, __m64 b
) {
575 // CHECK-LABEL: test_mm_srl_si64
576 // CHECK: call x86_mmx @llvm.x86.mmx.psrl.q
577 return _mm_srl_si64(a
, b
);
580 __m64
test_mm_srli_pi16(__m64 a
) {
581 // CHECK-LABEL: test_mm_srli_pi16
582 // CHECK: call x86_mmx @llvm.x86.mmx.psrli.w
583 return _mm_srli_pi16(a
, 3);
586 __m64
test_mm_srli_pi32(__m64 a
) {
587 // CHECK-LABEL: test_mm_srli_pi32
588 // CHECK: call x86_mmx @llvm.x86.mmx.psrli.d
589 return _mm_srli_pi32(a
, 3);
592 __m64
test_mm_srli_si64(__m64 a
) {
593 // CHECK-LABEL: test_mm_srli_si64
594 // CHECK: call x86_mmx @llvm.x86.mmx.psrli.q
595 return _mm_srli_si64(a
, 3);
598 void test_mm_stream_pi(__m64
*p
, __m64 a
) {
599 // CHECK-LABEL: test_mm_stream_pi
600 // CHECK: call void @llvm.x86.mmx.movnt.dq
604 void test_mm_stream_pi_void(void *p
, __m64 a
) {
605 // CHECK-LABEL: test_mm_stream_pi_void
606 // CHECK: call void @llvm.x86.mmx.movnt.dq
610 __m64
test_mm_sub_pi8(__m64 a
, __m64 b
) {
611 // CHECK-LABEL: test_mm_sub_pi8
612 // CHECK: call x86_mmx @llvm.x86.mmx.psub.b
613 return _mm_sub_pi8(a
, b
);
616 __m64
test_mm_sub_pi16(__m64 a
, __m64 b
) {
617 // CHECK-LABEL: test_mm_sub_pi16
618 // CHECK: call x86_mmx @llvm.x86.mmx.psub.w
619 return _mm_sub_pi16(a
, b
);
622 __m64
test_mm_sub_pi32(__m64 a
, __m64 b
) {
623 // CHECK-LABEL: test_mm_sub_pi32
624 // CHECK: call x86_mmx @llvm.x86.mmx.psub.d
625 return _mm_sub_pi32(a
, b
);
628 __m64
test_mm_sub_si64(__m64 a
, __m64 b
) {
629 // CHECK-LABEL: test_mm_sub_si64
630 // CHECK: call x86_mmx @llvm.x86.mmx.psub.q(x86_mmx %{{.*}}, x86_mmx %{{.*}})
631 return _mm_sub_si64(a
, b
);
634 __m64
test_mm_subs_pi8(__m64 a
, __m64 b
) {
635 // CHECK-LABEL: test_mm_subs_pi8
636 // CHECK: call x86_mmx @llvm.x86.mmx.psubs.b
637 return _mm_subs_pi8(a
, b
);
640 __m64
test_mm_subs_pi16(__m64 a
, __m64 b
) {
641 // CHECK-LABEL: test_mm_subs_pi16
642 // CHECK: call x86_mmx @llvm.x86.mmx.psubs.w
643 return _mm_subs_pi16(a
, b
);
646 __m64
test_mm_subs_pu8(__m64 a
, __m64 b
) {
647 // CHECK-LABEL: test_mm_subs_pu8
648 // CHECK: call x86_mmx @llvm.x86.mmx.psubus.b
649 return _mm_subs_pu8(a
, b
);
652 __m64
test_mm_subs_pu16(__m64 a
, __m64 b
) {
653 // CHECK-LABEL: test_mm_subs_pu16
654 // CHECK: call x86_mmx @llvm.x86.mmx.psubus.w
655 return _mm_subs_pu16(a
, b
);
658 int test_m_to_int(__m64 a
) {
659 // CHECK-LABEL: test_m_to_int
660 // CHECK: extractelement <2 x i32>
664 long long test_m_to_int64(__m64 a
) {
665 // CHECK-LABEL: test_m_to_int64
666 return _m_to_int64(a
);
669 __m64
test_mm_unpackhi_pi8(__m64 a
, __m64 b
) {
670 // CHECK-LABEL: test_mm_unpackhi_pi8
671 // CHECK: call x86_mmx @llvm.x86.mmx.punpckhbw
672 return _mm_unpackhi_pi8(a
, b
);
675 __m64
test_mm_unpackhi_pi16(__m64 a
, __m64 b
) {
676 // CHECK-LABEL: test_mm_unpackhi_pi16
677 // CHECK: call x86_mmx @llvm.x86.mmx.punpckhwd
678 return _mm_unpackhi_pi16(a
, b
);
681 __m64
test_mm_unpackhi_pi32(__m64 a
, __m64 b
) {
682 // CHECK-LABEL: test_mm_unpackhi_pi32
683 // CHECK: call x86_mmx @llvm.x86.mmx.punpckhdq
684 return _mm_unpackhi_pi32(a
, b
);
687 __m64
test_mm_unpacklo_pi8(__m64 a
, __m64 b
) {
688 // CHECK-LABEL: test_mm_unpacklo_pi8
689 // CHECK: call x86_mmx @llvm.x86.mmx.punpcklbw
690 return _mm_unpacklo_pi8(a
, b
);
693 __m64
test_mm_unpacklo_pi16(__m64 a
, __m64 b
) {
694 // CHECK-LABEL: test_mm_unpacklo_pi16
695 // CHECK: call x86_mmx @llvm.x86.mmx.punpcklwd
696 return _mm_unpacklo_pi16(a
, b
);
699 __m64
test_mm_unpacklo_pi32(__m64 a
, __m64 b
) {
700 // CHECK-LABEL: test_mm_unpacklo_pi32
701 // CHECK: call x86_mmx @llvm.x86.mmx.punpckldq
702 return _mm_unpacklo_pi32(a
, b
);
705 __m64
test_mm_xor_si64(__m64 a
, __m64 b
) {
706 // CHECK-LABEL: test_mm_xor_si64
707 // CHECK: call x86_mmx @llvm.x86.mmx.pxor
708 return _mm_xor_si64(a
, b
);