1 /* { dg-do run { target mipsisa64*-*-* } } */
2 /* { dg-mips-options "-mips64 -O2 -mips3d -mhard-float -mgp64" } */
4 /* Test MIPS-3D branch-if-any-two builtin functions */
8 typedef float v2sf
__attribute__ ((vector_size(8)));
10 int test0 (v2sf a
, v2sf b
);
11 int test1 (v2sf a
, v2sf b
);
12 int test2 (v2sf a
, v2sf b
);
13 int test3 (v2sf a
, v2sf b
);
14 int test4 (v2sf a
, v2sf b
);
15 int test5 (v2sf a
, v2sf b
);
16 int test6 (v2sf a
, v2sf b
);
17 int test7 (v2sf a
, v2sf b
);
18 int test8 (v2sf a
, v2sf b
);
19 int test9 (v2sf a
, v2sf b
);
20 int test10 (v2sf a
, v2sf b
);
21 int test11 (v2sf a
, v2sf b
);
22 int test12 (v2sf a
, v2sf b
);
23 int test13 (v2sf a
, v2sf b
);
24 int test14 (v2sf a
, v2sf b
);
25 int test15 (v2sf a
, v2sf b
);
26 int test16 (v2sf a
, v2sf b
);
27 int test17 (v2sf a
, v2sf b
);
28 int test18 (v2sf a
, v2sf b
);
29 int test19 (v2sf a
, v2sf b
);
30 int test20 (v2sf a
, v2sf b
);
31 int test21 (v2sf a
, v2sf b
);
32 int test22 (v2sf a
, v2sf b
);
33 int test23 (v2sf a
, v2sf b
);
34 int test24 (v2sf a
, v2sf b
);
35 int test25 (v2sf a
, v2sf b
);
36 int test26 (v2sf a
, v2sf b
);
37 int test27 (v2sf a
, v2sf b
);
38 int test28 (v2sf a
, v2sf b
);
39 int test29 (v2sf a
, v2sf b
);
40 int test30 (v2sf a
, v2sf b
);
41 int test31 (v2sf a
, v2sf b
);
43 float qnan
= 1.0f
/0.0f
- 1.0f
/0.0f
;
55 if (__builtin_mips_any_c_eq_ps(a
, b
) != i
)
57 if (__builtin_mips_all_c_eq_ps(a
, b
) != j
)
65 if (__builtin_mips_any_c_eq_ps(a
, b
) != i
)
67 if (__builtin_mips_all_c_eq_ps(a
, b
) != j
)
75 if (__builtin_mips_any_c_eq_ps(a
, b
) != i
)
77 if (__builtin_mips_all_c_eq_ps(a
, b
) != j
)
85 if (__builtin_mips_any_c_eq_ps(a
, b
) != i
)
87 if (__builtin_mips_all_c_eq_ps(a
, b
) != j
)
90 /* Test with 16 operators */
91 a
= (v2sf
) {10.58, 1984.0};
92 b
= (v2sf
) {567.345, 1984.0};
191 /* Reverse arguments */
289 #ifndef __FAST_MATH__
290 /* Test with 16 operators */
291 a
= (v2sf
) {qnan
, qnan
};
292 b
= (v2sf
) {567.345, 1984.0};
392 printf ("Test Passes\n");
396 int test0 (v2sf a
, v2sf b
)
398 return __builtin_mips_any_c_f_ps (a
, b
);
401 int test1 (v2sf a
, v2sf b
)
403 return __builtin_mips_all_c_f_ps (a
, b
);
406 int test2 (v2sf a
, v2sf b
)
408 return __builtin_mips_any_c_un_ps (a
, b
);
411 int test3 (v2sf a
, v2sf b
)
413 return __builtin_mips_all_c_un_ps (a
, b
);
416 int test4 (v2sf a
, v2sf b
)
418 return __builtin_mips_any_c_eq_ps (a
, b
);
421 int test5 (v2sf a
, v2sf b
)
423 return __builtin_mips_all_c_eq_ps (a
, b
);
426 int test6 (v2sf a
, v2sf b
)
428 return __builtin_mips_any_c_ueq_ps (a
, b
);
431 int test7 (v2sf a
, v2sf b
)
433 return __builtin_mips_all_c_ueq_ps (a
, b
);
436 int test8 (v2sf a
, v2sf b
)
438 return __builtin_mips_any_c_olt_ps (a
, b
);
441 int test9 (v2sf a
, v2sf b
)
443 return __builtin_mips_all_c_olt_ps (a
, b
);
446 int test10 (v2sf a
, v2sf b
)
448 return __builtin_mips_any_c_ult_ps (a
, b
);
451 int test11 (v2sf a
, v2sf b
)
453 return __builtin_mips_all_c_ult_ps (a
, b
);
456 int test12 (v2sf a
, v2sf b
)
458 return __builtin_mips_any_c_ole_ps (a
, b
);
461 int test13 (v2sf a
, v2sf b
)
463 return __builtin_mips_all_c_ole_ps (a
, b
);
466 int test14 (v2sf a
, v2sf b
)
468 return __builtin_mips_any_c_ule_ps (a
, b
);
471 int test15 (v2sf a
, v2sf b
)
473 return __builtin_mips_all_c_ule_ps (a
, b
);
476 int test16 (v2sf a
, v2sf b
)
478 return __builtin_mips_any_c_sf_ps (a
, b
);
481 int test17 (v2sf a
, v2sf b
)
483 return __builtin_mips_all_c_sf_ps (a
, b
);
486 int test18 (v2sf a
, v2sf b
)
488 return __builtin_mips_any_c_ngle_ps (a
, b
);
491 int test19 (v2sf a
, v2sf b
)
493 return __builtin_mips_all_c_ngle_ps (a
, b
);
496 int test20 (v2sf a
, v2sf b
)
498 return __builtin_mips_any_c_seq_ps (a
, b
);
501 int test21 (v2sf a
, v2sf b
)
503 return __builtin_mips_all_c_seq_ps (a
, b
);
506 int test22 (v2sf a
, v2sf b
)
508 return __builtin_mips_any_c_ngl_ps (a
, b
);
511 int test23 (v2sf a
, v2sf b
)
513 return __builtin_mips_all_c_ngl_ps (a
, b
);
516 int test24 (v2sf a
, v2sf b
)
518 return __builtin_mips_any_c_lt_ps (a
, b
);
521 int test25 (v2sf a
, v2sf b
)
523 return __builtin_mips_all_c_lt_ps (a
, b
);
526 int test26 (v2sf a
, v2sf b
)
528 return __builtin_mips_any_c_nge_ps (a
, b
);
531 int test27 (v2sf a
, v2sf b
)
533 return __builtin_mips_all_c_nge_ps (a
, b
);
536 int test28 (v2sf a
, v2sf b
)
538 return __builtin_mips_any_c_le_ps (a
, b
);
541 int test29 (v2sf a
, v2sf b
)
543 return __builtin_mips_all_c_le_ps (a
, b
);
546 int test30 (v2sf a
, v2sf b
)
548 return __builtin_mips_any_c_ngt_ps (a
, b
);
551 int test31 (v2sf a
, v2sf b
)
553 return __builtin_mips_all_c_ngt_ps (a
, b
);