1 ; RUN: llc -march=mipsel -mcpu=mips32 -mattr=+dsp -verify-machineinstrs < %s | \
4 define i32 @test__builtin_mips_extr_w1(i32 %i0, i32, i64 %a0) nounwind {
8 %1 = tail call i32 @llvm.mips.extr.w(i64 %a0, i32 15)
12 declare i32 @llvm.mips.extr.w(i64, i32) nounwind
14 define i32 @test__builtin_mips_extr_w2(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
18 %1 = tail call i32 @llvm.mips.extr.w(i64 %a0, i32 %a1)
22 define i32 @test__builtin_mips_extr_r_w1(i32 %i0, i32, i64 %a0) nounwind {
26 %1 = tail call i32 @llvm.mips.extr.r.w(i64 %a0, i32 15)
30 declare i32 @llvm.mips.extr.r.w(i64, i32) nounwind
32 define i32 @test__builtin_mips_extr_s_h1(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
36 %1 = tail call i32 @llvm.mips.extr.s.h(i64 %a0, i32 %a1)
40 declare i32 @llvm.mips.extr.s.h(i64, i32) nounwind
42 define i32 @test__builtin_mips_extr_rs_w1(i32 %i0, i32, i64 %a0) nounwind {
46 %1 = tail call i32 @llvm.mips.extr.rs.w(i64 %a0, i32 15)
50 declare i32 @llvm.mips.extr.rs.w(i64, i32) nounwind
52 define i32 @test__builtin_mips_extr_rs_w2(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
56 %1 = tail call i32 @llvm.mips.extr.rs.w(i64 %a0, i32 %a1)
60 define i32 @test__builtin_mips_extr_s_h2(i32 %i0, i32, i64 %a0) nounwind {
64 %1 = tail call i32 @llvm.mips.extr.s.h(i64 %a0, i32 15)
68 define i32 @test__builtin_mips_extr_r_w2(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
72 %1 = tail call i32 @llvm.mips.extr.r.w(i64 %a0, i32 %a1)
76 define i32 @test__builtin_mips_extp1(i32 %i0, i32, i64 %a0) nounwind {
78 ; CHECK: extp ${{[0-9]+}}
80 %1 = tail call i32 @llvm.mips.extp(i64 %a0, i32 15)
84 declare i32 @llvm.mips.extp(i64, i32) nounwind
86 define i32 @test__builtin_mips_extp2(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
90 %1 = tail call i32 @llvm.mips.extp(i64 %a0, i32 %a1)
94 define i32 @test__builtin_mips_extpdp1(i32 %i0, i32, i64 %a0) nounwind {
96 ; CHECK: extpdp ${{[0-9]+}}
98 %1 = tail call i32 @llvm.mips.extpdp(i64 %a0, i32 15)
102 declare i32 @llvm.mips.extpdp(i64, i32) nounwind
104 define i32 @test__builtin_mips_extpdp2(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
108 %1 = tail call i32 @llvm.mips.extpdp(i64 %a0, i32 %a1)
112 define i64 @test__builtin_mips_dpau_h_qbl1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone {
116 %1 = bitcast i32 %a1.coerce to <4 x i8>
117 %2 = bitcast i32 %a2.coerce to <4 x i8>
118 %3 = tail call i64 @llvm.mips.dpau.h.qbl(i64 %a0, <4 x i8> %1, <4 x i8> %2)
122 declare i64 @llvm.mips.dpau.h.qbl(i64, <4 x i8>, <4 x i8>) nounwind readnone
124 define i64 @test__builtin_mips_dpau_h_qbr1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone {
128 %1 = bitcast i32 %a1.coerce to <4 x i8>
129 %2 = bitcast i32 %a2.coerce to <4 x i8>
130 %3 = tail call i64 @llvm.mips.dpau.h.qbr(i64 %a0, <4 x i8> %1, <4 x i8> %2)
134 declare i64 @llvm.mips.dpau.h.qbr(i64, <4 x i8>, <4 x i8>) nounwind readnone
136 define i64 @test__builtin_mips_dpsu_h_qbl1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone {
140 %1 = bitcast i32 %a1.coerce to <4 x i8>
141 %2 = bitcast i32 %a2.coerce to <4 x i8>
142 %3 = tail call i64 @llvm.mips.dpsu.h.qbl(i64 %a0, <4 x i8> %1, <4 x i8> %2)
146 declare i64 @llvm.mips.dpsu.h.qbl(i64, <4 x i8>, <4 x i8>) nounwind readnone
148 define i64 @test__builtin_mips_dpsu_h_qbr1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind readnone {
152 %1 = bitcast i32 %a1.coerce to <4 x i8>
153 %2 = bitcast i32 %a2.coerce to <4 x i8>
154 %3 = tail call i64 @llvm.mips.dpsu.h.qbr(i64 %a0, <4 x i8> %1, <4 x i8> %2)
158 declare i64 @llvm.mips.dpsu.h.qbr(i64, <4 x i8>, <4 x i8>) nounwind readnone
160 define i64 @test__builtin_mips_dpaq_s_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
164 %1 = bitcast i32 %a1.coerce to <2 x i16>
165 %2 = bitcast i32 %a2.coerce to <2 x i16>
166 %3 = tail call i64 @llvm.mips.dpaq.s.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2)
170 declare i64 @llvm.mips.dpaq.s.w.ph(i64, <2 x i16>, <2 x i16>) nounwind
172 define i64 @test__builtin_mips_dpaq_sa_l_w1(i32 %i0, i32, i64 %a0, i32 %a1, i32 %a2) nounwind {
176 %1 = tail call i64 @llvm.mips.dpaq.sa.l.w(i64 %a0, i32 %a1, i32 %a2)
180 declare i64 @llvm.mips.dpaq.sa.l.w(i64, i32, i32) nounwind
182 define i64 @test__builtin_mips_dpsq_s_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
186 %1 = bitcast i32 %a1.coerce to <2 x i16>
187 %2 = bitcast i32 %a2.coerce to <2 x i16>
188 %3 = tail call i64 @llvm.mips.dpsq.s.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2)
192 declare i64 @llvm.mips.dpsq.s.w.ph(i64, <2 x i16>, <2 x i16>) nounwind
194 define i64 @test__builtin_mips_dpsq_sa_l_w1(i32 %i0, i32, i64 %a0, i32 %a1, i32 %a2) nounwind {
198 %1 = tail call i64 @llvm.mips.dpsq.sa.l.w(i64 %a0, i32 %a1, i32 %a2)
202 declare i64 @llvm.mips.dpsq.sa.l.w(i64, i32, i32) nounwind
204 define i64 @test__builtin_mips_mulsaq_s_w_ph1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
206 ; CHECK: mulsaq_s.w.ph
208 %1 = bitcast i32 %a1.coerce to <2 x i16>
209 %2 = bitcast i32 %a2.coerce to <2 x i16>
210 %3 = tail call i64 @llvm.mips.mulsaq.s.w.ph(i64 %a0, <2 x i16> %1, <2 x i16> %2)
214 declare i64 @llvm.mips.mulsaq.s.w.ph(i64, <2 x i16>, <2 x i16>) nounwind
216 define i64 @test__builtin_mips_maq_s_w_phl1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
220 %1 = bitcast i32 %a1.coerce to <2 x i16>
221 %2 = bitcast i32 %a2.coerce to <2 x i16>
222 %3 = tail call i64 @llvm.mips.maq.s.w.phl(i64 %a0, <2 x i16> %1, <2 x i16> %2)
226 declare i64 @llvm.mips.maq.s.w.phl(i64, <2 x i16>, <2 x i16>) nounwind
228 define i64 @test__builtin_mips_maq_s_w_phr1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
232 %1 = bitcast i32 %a1.coerce to <2 x i16>
233 %2 = bitcast i32 %a2.coerce to <2 x i16>
234 %3 = tail call i64 @llvm.mips.maq.s.w.phr(i64 %a0, <2 x i16> %1, <2 x i16> %2)
238 declare i64 @llvm.mips.maq.s.w.phr(i64, <2 x i16>, <2 x i16>) nounwind
240 define i64 @test__builtin_mips_maq_sa_w_phl1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
242 ; CHECK: maq_sa.w.phl
244 %1 = bitcast i32 %a1.coerce to <2 x i16>
245 %2 = bitcast i32 %a2.coerce to <2 x i16>
246 %3 = tail call i64 @llvm.mips.maq.sa.w.phl(i64 %a0, <2 x i16> %1, <2 x i16> %2)
250 declare i64 @llvm.mips.maq.sa.w.phl(i64, <2 x i16>, <2 x i16>) nounwind
252 define i64 @test__builtin_mips_maq_sa_w_phr1(i32 %i0, i32, i64 %a0, i32 %a1.coerce, i32 %a2.coerce) nounwind {
254 ; CHECK: maq_sa.w.phr
256 %1 = bitcast i32 %a1.coerce to <2 x i16>
257 %2 = bitcast i32 %a2.coerce to <2 x i16>
258 %3 = tail call i64 @llvm.mips.maq.sa.w.phr(i64 %a0, <2 x i16> %1, <2 x i16> %2)
262 declare i64 @llvm.mips.maq.sa.w.phr(i64, <2 x i16>, <2 x i16>) nounwind
264 define i64 @test__builtin_mips_shilo1(i32 %i0, i32, i64 %a0) nounwind readnone {
266 ; CHECK: shilo $ac{{[0-9]}}
268 %1 = tail call i64 @llvm.mips.shilo(i64 %a0, i32 0)
272 declare i64 @llvm.mips.shilo(i64, i32) nounwind readnone
274 define i64 @test__builtin_mips_shilo2(i32 %i0, i32, i64 %a0, i32 %a1) nounwind readnone {
278 %1 = tail call i64 @llvm.mips.shilo(i64 %a0, i32 %a1)
282 define i64 @test__builtin_mips_mthlip1(i32 %i0, i32, i64 %a0, i32 %a1) nounwind {
284 ; CHECK: mthlip ${{[0-9]+}}
286 %1 = tail call i64 @llvm.mips.mthlip(i64 %a0, i32 %a1)
290 declare i64 @llvm.mips.mthlip(i64, i32) nounwind
292 define i32 @test__builtin_mips_bposge321(i32 %i0) nounwind readonly {
294 ; CHECK: bposge32 $BB{{[0-9]+}}
296 %0 = tail call i32 @llvm.mips.bposge32()
300 declare i32 @llvm.mips.bposge32() nounwind readonly
302 define i64 @test__builtin_mips_madd1(i32 %i0, i32, i64 %a0, i32 %a1, i32 %a2) nounwind readnone {
304 ; CHECK: madd $ac{{[0-9]}}
306 %1 = tail call i64 @llvm.mips.madd(i64 %a0, i32 %a1, i32 %a2)
310 declare i64 @llvm.mips.madd(i64, i32, i32) nounwind readnone
312 define i64 @test__builtin_mips_maddu1(i32 %i0, i32, i64 %a0, i32 %a1, i32 %a2) nounwind readnone {
314 ; CHECK: maddu $ac{{[0-9]}}
316 %1 = tail call i64 @llvm.mips.maddu(i64 %a0, i32 %a1, i32 %a2)
320 declare i64 @llvm.mips.maddu(i64, i32, i32) nounwind readnone
322 define i64 @test__builtin_mips_msub1(i32 %i0, i32, i64 %a0, i32 %a1, i32 %a2) nounwind readnone {
324 ; CHECK: msub $ac{{[0-9]}}
326 %1 = tail call i64 @llvm.mips.msub(i64 %a0, i32 %a1, i32 %a2)
330 declare i64 @llvm.mips.msub(i64, i32, i32) nounwind readnone
332 define i64 @test__builtin_mips_msubu1(i32 %i0, i32, i64 %a0, i32 %a1, i32 %a2) nounwind readnone {
334 ; CHECK: msubu $ac{{[0-9]}}
336 %1 = tail call i64 @llvm.mips.msubu(i64 %a0, i32 %a1, i32 %a2)
340 declare i64 @llvm.mips.msubu(i64, i32, i32) nounwind readnone
342 define i64 @test__builtin_mips_mult1(i32 %i0, i32 %a0, i32 %a1) nounwind readnone {
344 ; CHECK: mult $ac{{[0-9]}}
346 %0 = tail call i64 @llvm.mips.mult(i32 %a0, i32 %a1)
350 declare i64 @llvm.mips.mult(i32, i32) nounwind readnone
352 define i64 @test__builtin_mips_multu1(i32 %i0, i32 %a0, i32 %a1) nounwind readnone {
354 ; CHECK: multu $ac{{[0-9]}}
356 %0 = tail call i64 @llvm.mips.multu(i32 %a0, i32 %a1)
360 declare i64 @llvm.mips.multu(i32, i32) nounwind readnone
362 define { i32 } @test__builtin_mips_addq_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
366 %0 = bitcast i32 %a0.coerce to <2 x i16>
367 %1 = bitcast i32 %a1.coerce to <2 x i16>
368 %2 = tail call <2 x i16> @llvm.mips.addq.ph(<2 x i16> %0, <2 x i16> %1)
369 %3 = bitcast <2 x i16> %2 to i32
370 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
371 ret { i32 } %.fca.0.insert
374 declare <2 x i16> @llvm.mips.addq.ph(<2 x i16>, <2 x i16>) nounwind
376 define { i32 } @test__builtin_mips_addq_s_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
380 %0 = bitcast i32 %a0.coerce to <2 x i16>
381 %1 = bitcast i32 %a1.coerce to <2 x i16>
382 %2 = tail call <2 x i16> @llvm.mips.addq.s.ph(<2 x i16> %0, <2 x i16> %1)
383 %3 = bitcast <2 x i16> %2 to i32
384 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
385 ret { i32 } %.fca.0.insert
388 declare <2 x i16> @llvm.mips.addq.s.ph(<2 x i16>, <2 x i16>) nounwind
390 define i32 @test__builtin_mips_addq_s_w1(i32 %i0, i32 %a0, i32 %a1) nounwind {
394 %0 = tail call i32 @llvm.mips.addq.s.w(i32 %a0, i32 %a1)
398 declare i32 @llvm.mips.addq.s.w(i32, i32) nounwind
400 define { i32 } @test__builtin_mips_addu_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
404 %0 = bitcast i32 %a0.coerce to <4 x i8>
405 %1 = bitcast i32 %a1.coerce to <4 x i8>
406 %2 = tail call <4 x i8> @llvm.mips.addu.qb(<4 x i8> %0, <4 x i8> %1)
407 %3 = bitcast <4 x i8> %2 to i32
408 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
409 ret { i32 } %.fca.0.insert
412 declare <4 x i8> @llvm.mips.addu.qb(<4 x i8>, <4 x i8>) nounwind
414 define { i32 } @test__builtin_mips_addu_s_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
418 %0 = bitcast i32 %a0.coerce to <4 x i8>
419 %1 = bitcast i32 %a1.coerce to <4 x i8>
420 %2 = tail call <4 x i8> @llvm.mips.addu.s.qb(<4 x i8> %0, <4 x i8> %1)
421 %3 = bitcast <4 x i8> %2 to i32
422 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
423 ret { i32 } %.fca.0.insert
426 declare <4 x i8> @llvm.mips.addu.s.qb(<4 x i8>, <4 x i8>) nounwind
428 define { i32 } @test__builtin_mips_subq_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
432 %0 = bitcast i32 %a0.coerce to <2 x i16>
433 %1 = bitcast i32 %a1.coerce to <2 x i16>
434 %2 = tail call <2 x i16> @llvm.mips.subq.ph(<2 x i16> %0, <2 x i16> %1)
435 %3 = bitcast <2 x i16> %2 to i32
436 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
437 ret { i32 } %.fca.0.insert
440 declare <2 x i16> @llvm.mips.subq.ph(<2 x i16>, <2 x i16>) nounwind
442 define { i32 } @test__builtin_mips_subq_s_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
446 %0 = bitcast i32 %a0.coerce to <2 x i16>
447 %1 = bitcast i32 %a1.coerce to <2 x i16>
448 %2 = tail call <2 x i16> @llvm.mips.subq.s.ph(<2 x i16> %0, <2 x i16> %1)
449 %3 = bitcast <2 x i16> %2 to i32
450 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
451 ret { i32 } %.fca.0.insert
454 declare <2 x i16> @llvm.mips.subq.s.ph(<2 x i16>, <2 x i16>) nounwind
456 define i32 @test__builtin_mips_subq_s_w1(i32 %i0, i32 %a0, i32 %a1) nounwind {
460 %0 = tail call i32 @llvm.mips.subq.s.w(i32 %a0, i32 %a1)
464 declare i32 @llvm.mips.subq.s.w(i32, i32) nounwind
466 define { i32 } @test__builtin_mips_subu_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
470 %0 = bitcast i32 %a0.coerce to <4 x i8>
471 %1 = bitcast i32 %a1.coerce to <4 x i8>
472 %2 = tail call <4 x i8> @llvm.mips.subu.qb(<4 x i8> %0, <4 x i8> %1)
473 %3 = bitcast <4 x i8> %2 to i32
474 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
475 ret { i32 } %.fca.0.insert
478 declare <4 x i8> @llvm.mips.subu.qb(<4 x i8>, <4 x i8>) nounwind
480 define { i32 } @test__builtin_mips_subu_s_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
484 %0 = bitcast i32 %a0.coerce to <4 x i8>
485 %1 = bitcast i32 %a1.coerce to <4 x i8>
486 %2 = tail call <4 x i8> @llvm.mips.subu.s.qb(<4 x i8> %0, <4 x i8> %1)
487 %3 = bitcast <4 x i8> %2 to i32
488 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
489 ret { i32 } %.fca.0.insert
492 declare <4 x i8> @llvm.mips.subu.s.qb(<4 x i8>, <4 x i8>) nounwind
494 define i32 @test__builtin_mips_addsc1(i32 %i0, i32 %a0, i32 %a1) nounwind {
496 ; CHECK: addsc ${{[0-9]+}}
498 %0 = tail call i32 @llvm.mips.addsc(i32 %a0, i32 %a1)
502 declare i32 @llvm.mips.addsc(i32, i32) nounwind
504 define i32 @test__builtin_mips_addwc1(i32 %i0, i32 %a0, i32 %a1) nounwind {
506 ; CHECK: addwc ${{[0-9]+}}
508 %0 = tail call i32 @llvm.mips.addwc(i32 %a0, i32 %a1)
512 declare i32 @llvm.mips.addwc(i32, i32) nounwind
514 define i32 @test__builtin_mips_modsub1(i32 %i0, i32 %a0, i32 %a1) nounwind readnone {
516 ; CHECK: modsub ${{[0-9]+}}
518 %0 = tail call i32 @llvm.mips.modsub(i32 %a0, i32 %a1)
522 declare i32 @llvm.mips.modsub(i32, i32) nounwind readnone
524 define i32 @test__builtin_mips_raddu_w_qb1(i32 %i0, i32 %a0.coerce) nounwind readnone {
528 %0 = bitcast i32 %a0.coerce to <4 x i8>
529 %1 = tail call i32 @llvm.mips.raddu.w.qb(<4 x i8> %0)
533 declare i32 @llvm.mips.raddu.w.qb(<4 x i8>) nounwind readnone
535 define { i32 } @test__builtin_mips_muleu_s_ph_qbl1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
537 ; CHECK: muleu_s.ph.qbl
539 %0 = bitcast i32 %a0.coerce to <4 x i8>
540 %1 = bitcast i32 %a1.coerce to <2 x i16>
541 %2 = tail call <2 x i16> @llvm.mips.muleu.s.ph.qbl(<4 x i8> %0, <2 x i16> %1)
542 %3 = bitcast <2 x i16> %2 to i32
543 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
544 ret { i32 } %.fca.0.insert
547 declare <2 x i16> @llvm.mips.muleu.s.ph.qbl(<4 x i8>, <2 x i16>) nounwind
549 define { i32 } @test__builtin_mips_muleu_s_ph_qbr1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
551 ; CHECK: muleu_s.ph.qbr
553 %0 = bitcast i32 %a0.coerce to <4 x i8>
554 %1 = bitcast i32 %a1.coerce to <2 x i16>
555 %2 = tail call <2 x i16> @llvm.mips.muleu.s.ph.qbr(<4 x i8> %0, <2 x i16> %1)
556 %3 = bitcast <2 x i16> %2 to i32
557 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
558 ret { i32 } %.fca.0.insert
561 declare <2 x i16> @llvm.mips.muleu.s.ph.qbr(<4 x i8>, <2 x i16>) nounwind
563 define { i32 } @test__builtin_mips_mulq_rs_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
567 %0 = bitcast i32 %a0.coerce to <2 x i16>
568 %1 = bitcast i32 %a1.coerce to <2 x i16>
569 %2 = tail call <2 x i16> @llvm.mips.mulq.rs.ph(<2 x i16> %0, <2 x i16> %1)
570 %3 = bitcast <2 x i16> %2 to i32
571 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
572 ret { i32 } %.fca.0.insert
575 declare <2 x i16> @llvm.mips.mulq.rs.ph(<2 x i16>, <2 x i16>) nounwind
577 define i32 @test__builtin_mips_muleq_s_w_phl1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
579 ; CHECK: muleq_s.w.phl
581 %0 = bitcast i32 %a0.coerce to <2 x i16>
582 %1 = bitcast i32 %a1.coerce to <2 x i16>
583 %2 = tail call i32 @llvm.mips.muleq.s.w.phl(<2 x i16> %0, <2 x i16> %1)
587 declare i32 @llvm.mips.muleq.s.w.phl(<2 x i16>, <2 x i16>) nounwind
589 define i32 @test__builtin_mips_muleq_s_w_phr1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
591 ; CHECK: muleq_s.w.phr
593 %0 = bitcast i32 %a0.coerce to <2 x i16>
594 %1 = bitcast i32 %a1.coerce to <2 x i16>
595 %2 = tail call i32 @llvm.mips.muleq.s.w.phr(<2 x i16> %0, <2 x i16> %1)
599 declare i32 @llvm.mips.muleq.s.w.phr(<2 x i16>, <2 x i16>) nounwind
601 define { i32 } @test__builtin_mips_precrq_qb_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind readnone {
603 ; CHECK: precrq.qb.ph
605 %0 = bitcast i32 %a0.coerce to <2 x i16>
606 %1 = bitcast i32 %a1.coerce to <2 x i16>
607 %2 = tail call <4 x i8> @llvm.mips.precrq.qb.ph(<2 x i16> %0, <2 x i16> %1)
608 %3 = bitcast <4 x i8> %2 to i32
609 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
610 ret { i32 } %.fca.0.insert
613 declare <4 x i8> @llvm.mips.precrq.qb.ph(<2 x i16>, <2 x i16>) nounwind readnone
615 define { i32 } @test__builtin_mips_precrq_ph_w1(i32 %i0, i32 %a0, i32 %a1) nounwind readnone {
619 %0 = tail call <2 x i16> @llvm.mips.precrq.ph.w(i32 %a0, i32 %a1)
620 %1 = bitcast <2 x i16> %0 to i32
621 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
622 ret { i32 } %.fca.0.insert
625 declare <2 x i16> @llvm.mips.precrq.ph.w(i32, i32) nounwind readnone
627 define { i32 } @test__builtin_mips_precrq_rs_ph_w1(i32 %i0, i32 %a0, i32 %a1) nounwind {
629 ; CHECK: precrq_rs.ph.w
631 %0 = tail call <2 x i16> @llvm.mips.precrq.rs.ph.w(i32 %a0, i32 %a1)
632 %1 = bitcast <2 x i16> %0 to i32
633 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
634 ret { i32 } %.fca.0.insert
637 declare <2 x i16> @llvm.mips.precrq.rs.ph.w(i32, i32) nounwind
639 define { i32 } @test__builtin_mips_precrqu_s_qb_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
641 ; CHECK: precrqu_s.qb.ph
643 %0 = bitcast i32 %a0.coerce to <2 x i16>
644 %1 = bitcast i32 %a1.coerce to <2 x i16>
645 %2 = tail call <4 x i8> @llvm.mips.precrqu.s.qb.ph(<2 x i16> %0, <2 x i16> %1)
646 %3 = bitcast <4 x i8> %2 to i32
647 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
648 ret { i32 } %.fca.0.insert
651 declare <4 x i8> @llvm.mips.precrqu.s.qb.ph(<2 x i16>, <2 x i16>) nounwind
654 define i32 @test__builtin_mips_cmpu_eq_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
658 %0 = bitcast i32 %a0.coerce to <4 x i8>
659 %1 = bitcast i32 %a1.coerce to <4 x i8>
660 tail call void @llvm.mips.cmpu.eq.qb(<4 x i8> %0, <4 x i8> %1)
661 %2 = tail call i32 @llvm.mips.rddsp(i32 31)
665 declare void @llvm.mips.cmpu.eq.qb(<4 x i8>, <4 x i8>) nounwind
667 declare i32 @llvm.mips.rddsp(i32) nounwind readonly
669 define i32 @test__builtin_mips_cmpu_lt_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
673 %0 = bitcast i32 %a0.coerce to <4 x i8>
674 %1 = bitcast i32 %a1.coerce to <4 x i8>
675 tail call void @llvm.mips.cmpu.lt.qb(<4 x i8> %0, <4 x i8> %1)
676 %2 = tail call i32 @llvm.mips.rddsp(i32 31)
680 declare void @llvm.mips.cmpu.lt.qb(<4 x i8>, <4 x i8>) nounwind
682 define i32 @test__builtin_mips_cmpu_le_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
686 %0 = bitcast i32 %a0.coerce to <4 x i8>
687 %1 = bitcast i32 %a1.coerce to <4 x i8>
688 tail call void @llvm.mips.cmpu.le.qb(<4 x i8> %0, <4 x i8> %1)
689 %2 = tail call i32 @llvm.mips.rddsp(i32 31)
693 declare void @llvm.mips.cmpu.le.qb(<4 x i8>, <4 x i8>) nounwind
695 define i32 @test__builtin_mips_cmpgu_eq_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
699 %0 = bitcast i32 %a0.coerce to <4 x i8>
700 %1 = bitcast i32 %a1.coerce to <4 x i8>
701 %2 = tail call i32 @llvm.mips.cmpgu.eq.qb(<4 x i8> %0, <4 x i8> %1)
705 declare i32 @llvm.mips.cmpgu.eq.qb(<4 x i8>, <4 x i8>) nounwind
707 define i32 @test__builtin_mips_cmpgu_lt_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
711 %0 = bitcast i32 %a0.coerce to <4 x i8>
712 %1 = bitcast i32 %a1.coerce to <4 x i8>
713 %2 = tail call i32 @llvm.mips.cmpgu.lt.qb(<4 x i8> %0, <4 x i8> %1)
717 declare i32 @llvm.mips.cmpgu.lt.qb(<4 x i8>, <4 x i8>) nounwind
719 define i32 @test__builtin_mips_cmpgu_le_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
723 %0 = bitcast i32 %a0.coerce to <4 x i8>
724 %1 = bitcast i32 %a1.coerce to <4 x i8>
725 %2 = tail call i32 @llvm.mips.cmpgu.le.qb(<4 x i8> %0, <4 x i8> %1)
729 declare i32 @llvm.mips.cmpgu.le.qb(<4 x i8>, <4 x i8>) nounwind
731 define i32 @test__builtin_mips_cmp_eq_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
735 %0 = bitcast i32 %a0.coerce to <2 x i16>
736 %1 = bitcast i32 %a1.coerce to <2 x i16>
737 tail call void @llvm.mips.cmp.eq.ph(<2 x i16> %0, <2 x i16> %1)
738 %2 = tail call i32 @llvm.mips.rddsp(i32 31)
742 declare void @llvm.mips.cmp.eq.ph(<2 x i16>, <2 x i16>) nounwind
744 define i32 @test__builtin_mips_cmp_lt_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
748 %0 = bitcast i32 %a0.coerce to <2 x i16>
749 %1 = bitcast i32 %a1.coerce to <2 x i16>
750 tail call void @llvm.mips.cmp.lt.ph(<2 x i16> %0, <2 x i16> %1)
751 %2 = tail call i32 @llvm.mips.rddsp(i32 31)
755 declare void @llvm.mips.cmp.lt.ph(<2 x i16>, <2 x i16>) nounwind
757 define i32 @test__builtin_mips_cmp_le_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind {
761 %0 = bitcast i32 %a0.coerce to <2 x i16>
762 %1 = bitcast i32 %a1.coerce to <2 x i16>
763 tail call void @llvm.mips.cmp.le.ph(<2 x i16> %0, <2 x i16> %1)
764 %2 = tail call i32 @llvm.mips.rddsp(i32 31)
768 declare void @llvm.mips.cmp.le.ph(<2 x i16>, <2 x i16>) nounwind
770 define { i32 } @test__builtin_mips_pick_qb1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind readonly {
774 %0 = bitcast i32 %a0.coerce to <4 x i8>
775 %1 = bitcast i32 %a1.coerce to <4 x i8>
776 tail call void @llvm.mips.wrdsp(i32 %i0, i32 16)
777 %2 = tail call <4 x i8> @llvm.mips.pick.qb(<4 x i8> %0, <4 x i8> %1)
778 %3 = bitcast <4 x i8> %2 to i32
779 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
780 ret { i32 } %.fca.0.insert
783 declare <4 x i8> @llvm.mips.pick.qb(<4 x i8>, <4 x i8>) nounwind readonly
785 define { i32 } @test__builtin_mips_pick_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind readonly {
789 %0 = bitcast i32 %a0.coerce to <2 x i16>
790 %1 = bitcast i32 %a1.coerce to <2 x i16>
791 tail call void @llvm.mips.wrdsp(i32 %i0, i32 16)
792 %2 = tail call <2 x i16> @llvm.mips.pick.ph(<2 x i16> %0, <2 x i16> %1)
793 %3 = bitcast <2 x i16> %2 to i32
794 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
795 ret { i32 } %.fca.0.insert
798 declare <2 x i16> @llvm.mips.pick.ph(<2 x i16>, <2 x i16>) nounwind readonly
800 define { i32 } @test__builtin_mips_packrl_ph1(i32 %i0, i32 %a0.coerce, i32 %a1.coerce) nounwind readnone {
804 %0 = bitcast i32 %a0.coerce to <2 x i16>
805 %1 = bitcast i32 %a1.coerce to <2 x i16>
806 %2 = tail call <2 x i16> @llvm.mips.packrl.ph(<2 x i16> %0, <2 x i16> %1)
807 %3 = bitcast <2 x i16> %2 to i32
808 %.fca.0.insert = insertvalue { i32 } undef, i32 %3, 0
809 ret { i32 } %.fca.0.insert
812 declare <2 x i16> @llvm.mips.packrl.ph(<2 x i16>, <2 x i16>) nounwind readnone
814 define { i32 } @test__builtin_mips_shll_qb1(i32 %i0, i32 %a0.coerce) nounwind {
818 %0 = bitcast i32 %a0.coerce to <4 x i8>
819 %1 = tail call <4 x i8> @llvm.mips.shll.qb(<4 x i8> %0, i32 3)
820 %2 = bitcast <4 x i8> %1 to i32
821 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
822 ret { i32 } %.fca.0.insert
825 declare <4 x i8> @llvm.mips.shll.qb(<4 x i8>, i32) nounwind
827 define { i32 } @test__builtin_mips_shll_qb2(i32 %i0, i32 %a0.coerce, i32 %a1) nounwind {
831 %0 = bitcast i32 %a0.coerce to <4 x i8>
832 %1 = tail call <4 x i8> @llvm.mips.shll.qb(<4 x i8> %0, i32 %a1)
833 %2 = bitcast <4 x i8> %1 to i32
834 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
835 ret { i32 } %.fca.0.insert
838 define { i32 } @test__builtin_mips_shll_ph1(i32 %i0, i32 %a0.coerce) nounwind {
842 %0 = bitcast i32 %a0.coerce to <2 x i16>
843 %1 = tail call <2 x i16> @llvm.mips.shll.ph(<2 x i16> %0, i32 7)
844 %2 = bitcast <2 x i16> %1 to i32
845 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
846 ret { i32 } %.fca.0.insert
849 declare <2 x i16> @llvm.mips.shll.ph(<2 x i16>, i32) nounwind
851 define { i32 } @test__builtin_mips_shll_ph2(i32 %i0, i32 %a0.coerce, i32 %a1) nounwind {
855 %0 = bitcast i32 %a0.coerce to <2 x i16>
856 %1 = tail call <2 x i16> @llvm.mips.shll.ph(<2 x i16> %0, i32 %a1)
857 %2 = bitcast <2 x i16> %1 to i32
858 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
859 ret { i32 } %.fca.0.insert
862 define { i32 } @test__builtin_mips_shll_s_ph1(i32 %i0, i32 %a0.coerce) nounwind {
866 %0 = bitcast i32 %a0.coerce to <2 x i16>
867 %1 = tail call <2 x i16> @llvm.mips.shll.s.ph(<2 x i16> %0, i32 7)
868 %2 = bitcast <2 x i16> %1 to i32
869 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
870 ret { i32 } %.fca.0.insert
873 declare <2 x i16> @llvm.mips.shll.s.ph(<2 x i16>, i32) nounwind
875 define { i32 } @test__builtin_mips_shll_s_ph2(i32 %i0, i32 %a0.coerce, i32 %a1) nounwind {
879 %0 = bitcast i32 %a0.coerce to <2 x i16>
880 %1 = tail call <2 x i16> @llvm.mips.shll.s.ph(<2 x i16> %0, i32 %a1)
881 %2 = bitcast <2 x i16> %1 to i32
882 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
883 ret { i32 } %.fca.0.insert
886 define i32 @test__builtin_mips_shll_s_w1(i32 %i0, i32 %a0) nounwind {
890 %0 = tail call i32 @llvm.mips.shll.s.w(i32 %a0, i32 15)
894 declare i32 @llvm.mips.shll.s.w(i32, i32) nounwind
896 define i32 @test__builtin_mips_shll_s_w2(i32 %i0, i32 %a0, i32 %a1) nounwind {
900 %0 = tail call i32 @llvm.mips.shll.s.w(i32 %a0, i32 %a1)
904 define { i32 } @test__builtin_mips_shrl_qb1(i32 %i0, i32 %a0.coerce) nounwind readnone {
908 %0 = bitcast i32 %a0.coerce to <4 x i8>
909 %1 = tail call <4 x i8> @llvm.mips.shrl.qb(<4 x i8> %0, i32 3)
910 %2 = bitcast <4 x i8> %1 to i32
911 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
912 ret { i32 } %.fca.0.insert
915 declare <4 x i8> @llvm.mips.shrl.qb(<4 x i8>, i32) nounwind readnone
917 define { i32 } @test__builtin_mips_shrl_qb2(i32 %i0, i32 %a0.coerce, i32 %a1) nounwind readnone {
921 %0 = bitcast i32 %a0.coerce to <4 x i8>
922 %1 = tail call <4 x i8> @llvm.mips.shrl.qb(<4 x i8> %0, i32 %a1)
923 %2 = bitcast <4 x i8> %1 to i32
924 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
925 ret { i32 } %.fca.0.insert
928 define { i32 } @test__builtin_mips_shra_ph1(i32 %i0, i32 %a0.coerce) nounwind readnone {
932 %0 = bitcast i32 %a0.coerce to <2 x i16>
933 %1 = tail call <2 x i16> @llvm.mips.shra.ph(<2 x i16> %0, i32 7)
934 %2 = bitcast <2 x i16> %1 to i32
935 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
936 ret { i32 } %.fca.0.insert
939 declare <2 x i16> @llvm.mips.shra.ph(<2 x i16>, i32) nounwind readnone
941 define { i32 } @test__builtin_mips_shra_ph2(i32 %i0, i32 %a0.coerce, i32 %a1) nounwind readnone {
945 %0 = bitcast i32 %a0.coerce to <2 x i16>
946 %1 = tail call <2 x i16> @llvm.mips.shra.ph(<2 x i16> %0, i32 %a1)
947 %2 = bitcast <2 x i16> %1 to i32
948 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
949 ret { i32 } %.fca.0.insert
952 define { i32 } @test__builtin_mips_shra_r_ph1(i32 %i0, i32 %a0.coerce) nounwind readnone {
956 %0 = bitcast i32 %a0.coerce to <2 x i16>
957 %1 = tail call <2 x i16> @llvm.mips.shra.r.ph(<2 x i16> %0, i32 7)
958 %2 = bitcast <2 x i16> %1 to i32
959 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
960 ret { i32 } %.fca.0.insert
963 declare <2 x i16> @llvm.mips.shra.r.ph(<2 x i16>, i32) nounwind readnone
965 define { i32 } @test__builtin_mips_shra_r_ph2(i32 %i0, i32 %a0.coerce, i32 %a1) nounwind readnone {
969 %0 = bitcast i32 %a0.coerce to <2 x i16>
970 %1 = tail call <2 x i16> @llvm.mips.shra.r.ph(<2 x i16> %0, i32 %a1)
971 %2 = bitcast <2 x i16> %1 to i32
972 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
973 ret { i32 } %.fca.0.insert
976 define i32 @test__builtin_mips_shra_r_w1(i32 %i0, i32 %a0) nounwind readnone {
980 %0 = tail call i32 @llvm.mips.shra.r.w(i32 %a0, i32 15)
984 declare i32 @llvm.mips.shra.r.w(i32, i32) nounwind readnone
986 define i32 @test__builtin_mips_shra_r_w2(i32 %i0, i32 %a0, i32 %a1) nounwind readnone {
990 %0 = tail call i32 @llvm.mips.shra.r.w(i32 %a0, i32 %a1)
994 define { i32 } @test__builtin_mips_absq_s_ph1(i32 %i0, i32 %a0.coerce) nounwind {
998 %0 = bitcast i32 %a0.coerce to <2 x i16>
999 %1 = tail call <2 x i16> @llvm.mips.absq.s.ph(<2 x i16> %0)
1000 %2 = bitcast <2 x i16> %1 to i32
1001 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1002 ret { i32 } %.fca.0.insert
1005 declare <2 x i16> @llvm.mips.absq.s.ph(<2 x i16>) nounwind
1007 define i32 @test__builtin_mips_absq_s_w1(i32 %i0, i32 %a0) nounwind {
1011 %0 = tail call i32 @llvm.mips.absq.s.w(i32 %a0)
1015 declare i32 @llvm.mips.absq.s.w(i32) nounwind
1017 define i32 @test__builtin_mips_preceq_w_phl1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1019 ; CHECK: preceq.w.phl
1021 %0 = bitcast i32 %a0.coerce to <2 x i16>
1022 %1 = tail call i32 @llvm.mips.preceq.w.phl(<2 x i16> %0)
1026 declare i32 @llvm.mips.preceq.w.phl(<2 x i16>) nounwind readnone
1028 define i32 @test__builtin_mips_preceq_w_phr1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1030 ; CHECK: preceq.w.phr
1032 %0 = bitcast i32 %a0.coerce to <2 x i16>
1033 %1 = tail call i32 @llvm.mips.preceq.w.phr(<2 x i16> %0)
1037 declare i32 @llvm.mips.preceq.w.phr(<2 x i16>) nounwind readnone
1039 define { i32 } @test__builtin_mips_precequ_ph_qbl1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1041 ; CHECK: precequ.ph.qbl
1043 %0 = bitcast i32 %a0.coerce to <4 x i8>
1044 %1 = tail call <2 x i16> @llvm.mips.precequ.ph.qbl(<4 x i8> %0)
1045 %2 = bitcast <2 x i16> %1 to i32
1046 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1047 ret { i32 } %.fca.0.insert
1050 declare <2 x i16> @llvm.mips.precequ.ph.qbl(<4 x i8>) nounwind readnone
1052 define { i32 } @test__builtin_mips_precequ_ph_qbr1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1054 ; CHECK: precequ.ph.qbr
1056 %0 = bitcast i32 %a0.coerce to <4 x i8>
1057 %1 = tail call <2 x i16> @llvm.mips.precequ.ph.qbr(<4 x i8> %0)
1058 %2 = bitcast <2 x i16> %1 to i32
1059 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1060 ret { i32 } %.fca.0.insert
1063 declare <2 x i16> @llvm.mips.precequ.ph.qbr(<4 x i8>) nounwind readnone
1065 define { i32 } @test__builtin_mips_precequ_ph_qbla1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1067 ; CHECK: precequ.ph.qbla
1069 %0 = bitcast i32 %a0.coerce to <4 x i8>
1070 %1 = tail call <2 x i16> @llvm.mips.precequ.ph.qbla(<4 x i8> %0)
1071 %2 = bitcast <2 x i16> %1 to i32
1072 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1073 ret { i32 } %.fca.0.insert
1076 declare <2 x i16> @llvm.mips.precequ.ph.qbla(<4 x i8>) nounwind readnone
1078 define { i32 } @test__builtin_mips_precequ_ph_qbra1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1080 ; CHECK: precequ.ph.qbra
1082 %0 = bitcast i32 %a0.coerce to <4 x i8>
1083 %1 = tail call <2 x i16> @llvm.mips.precequ.ph.qbra(<4 x i8> %0)
1084 %2 = bitcast <2 x i16> %1 to i32
1085 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1086 ret { i32 } %.fca.0.insert
1089 declare <2 x i16> @llvm.mips.precequ.ph.qbra(<4 x i8>) nounwind readnone
1091 define { i32 } @test__builtin_mips_preceu_ph_qbl1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1093 ; CHECK: preceu.ph.qbl
1095 %0 = bitcast i32 %a0.coerce to <4 x i8>
1096 %1 = tail call <2 x i16> @llvm.mips.preceu.ph.qbl(<4 x i8> %0)
1097 %2 = bitcast <2 x i16> %1 to i32
1098 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1099 ret { i32 } %.fca.0.insert
1102 declare <2 x i16> @llvm.mips.preceu.ph.qbl(<4 x i8>) nounwind readnone
1104 define { i32 } @test__builtin_mips_preceu_ph_qbr1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1106 ; CHECK: preceu.ph.qbr
1108 %0 = bitcast i32 %a0.coerce to <4 x i8>
1109 %1 = tail call <2 x i16> @llvm.mips.preceu.ph.qbr(<4 x i8> %0)
1110 %2 = bitcast <2 x i16> %1 to i32
1111 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1112 ret { i32 } %.fca.0.insert
1115 declare <2 x i16> @llvm.mips.preceu.ph.qbr(<4 x i8>) nounwind readnone
1117 define { i32 } @test__builtin_mips_preceu_ph_qbla1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1119 ; CHECK: preceu.ph.qbla
1121 %0 = bitcast i32 %a0.coerce to <4 x i8>
1122 %1 = tail call <2 x i16> @llvm.mips.preceu.ph.qbla(<4 x i8> %0)
1123 %2 = bitcast <2 x i16> %1 to i32
1124 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1125 ret { i32 } %.fca.0.insert
1128 declare <2 x i16> @llvm.mips.preceu.ph.qbla(<4 x i8>) nounwind readnone
1130 define { i32 } @test__builtin_mips_preceu_ph_qbra1(i32 %i0, i32 %a0.coerce) nounwind readnone {
1132 ; CHECK: preceu.ph.qbra
1134 %0 = bitcast i32 %a0.coerce to <4 x i8>
1135 %1 = tail call <2 x i16> @llvm.mips.preceu.ph.qbra(<4 x i8> %0)
1136 %2 = bitcast <2 x i16> %1 to i32
1137 %.fca.0.insert = insertvalue { i32 } undef, i32 %2, 0
1138 ret { i32 } %.fca.0.insert
1141 declare <2 x i16> @llvm.mips.preceu.ph.qbra(<4 x i8>) nounwind readnone
1143 define { i32 } @test__builtin_mips_repl_qb1(i32 %i0) nounwind readnone {
1147 %0 = tail call <4 x i8> @llvm.mips.repl.qb(i32 127)
1148 %1 = bitcast <4 x i8> %0 to i32
1149 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
1150 ret { i32 } %.fca.0.insert
1153 declare <4 x i8> @llvm.mips.repl.qb(i32) nounwind readnone
1155 define { i32 } @test__builtin_mips_repl_qb2(i32 %i0, i32 %a0) nounwind readnone {
1159 %0 = tail call <4 x i8> @llvm.mips.repl.qb(i32 %a0)
1160 %1 = bitcast <4 x i8> %0 to i32
1161 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
1162 ret { i32 } %.fca.0.insert
1165 define { i32 } @test__builtin_mips_repl_ph1(i32 %i0) nounwind readnone {
1169 %0 = tail call <2 x i16> @llvm.mips.repl.ph(i32 0)
1170 %1 = bitcast <2 x i16> %0 to i32
1171 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
1172 ret { i32 } %.fca.0.insert
1175 define { i32 } @test__builtin_mips_repl_ph2(i32 %i0) nounwind readnone {
1179 %0 = tail call <2 x i16> @llvm.mips.repl.ph(i32 -2)
1180 %1 = bitcast <2 x i16> %0 to i32
1181 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
1182 ret { i32 } %.fca.0.insert
1185 declare <2 x i16> @llvm.mips.repl.ph(i32) nounwind readnone
1187 define { i32 } @test__builtin_mips_repl_ph3(i32 %i0, i32 %a0) nounwind readnone {
1191 %0 = tail call <2 x i16> @llvm.mips.repl.ph(i32 %a0)
1192 %1 = bitcast <2 x i16> %0 to i32
1193 %.fca.0.insert = insertvalue { i32 } undef, i32 %1, 0
1194 ret { i32 } %.fca.0.insert
1197 define i32 @test__builtin_mips_bitrev1(i32 %i0, i32 %a0) nounwind readnone {
1199 ; CHECK: bitrev ${{[0-9]+}}
1201 %0 = tail call i32 @llvm.mips.bitrev(i32 %a0)
1205 declare i32 @llvm.mips.bitrev(i32) nounwind readnone
1207 define i32 @test__builtin_mips_lbux1(i32 %i0, i8* %a0, i32 %a1) nounwind readonly {
1209 ; CHECK: lbux ${{[0-9]+}}
1211 %0 = tail call i32 @llvm.mips.lbux(i8* %a0, i32 %a1)
1215 declare i32 @llvm.mips.lbux(i8*, i32) nounwind readonly
1217 define i32 @test__builtin_mips_lhx1(i32 %i0, i8* %a0, i32 %a1) nounwind readonly {
1219 ; CHECK: lhx ${{[0-9]+}}
1221 %0 = tail call i32 @llvm.mips.lhx(i8* %a0, i32 %a1)
1225 declare i32 @llvm.mips.lhx(i8*, i32) nounwind readonly
1227 define i32 @test__builtin_mips_lwx1(i32 %i0, i8* %a0, i32 %a1) nounwind readonly {
1229 ; CHECK: lwx ${{[0-9]+}}
1231 %0 = tail call i32 @llvm.mips.lwx(i8* %a0, i32 %a1)
1235 declare i32 @llvm.mips.lwx(i8*, i32) nounwind readonly
1237 define i32 @test__builtin_mips_wrdsp1(i32 %i0, i32 %a0) nounwind {
1239 ; CHECK: wrdsp ${{[0-9]+}}
1240 ; CHECK: rddsp ${{[0-9]+}}
1242 tail call void @llvm.mips.wrdsp(i32 %a0, i32 31)
1243 %0 = tail call i32 @llvm.mips.rddsp(i32 31)
1247 declare void @llvm.mips.wrdsp(i32, i32) nounwind