2 /* { dg-options "-mips3d forbid_cpu=octeon.*" } */
4 /* Test MIPS-3D branch-if-any-two builtin functions */
8 typedef float v2sf
__attribute__ ((vector_size(8)));
10 NOMIPS16
int test0 (v2sf a
, v2sf b
);
11 NOMIPS16
int test1 (v2sf a
, v2sf b
);
12 NOMIPS16
int test2 (v2sf a
, v2sf b
);
13 NOMIPS16
int test3 (v2sf a
, v2sf b
);
14 NOMIPS16
int test4 (v2sf a
, v2sf b
);
15 NOMIPS16
int test5 (v2sf a
, v2sf b
);
16 NOMIPS16
int test6 (v2sf a
, v2sf b
);
17 NOMIPS16
int test7 (v2sf a
, v2sf b
);
18 NOMIPS16
int test8 (v2sf a
, v2sf b
);
19 NOMIPS16
int test9 (v2sf a
, v2sf b
);
20 NOMIPS16
int test10 (v2sf a
, v2sf b
);
21 NOMIPS16
int test11 (v2sf a
, v2sf b
);
22 NOMIPS16
int test12 (v2sf a
, v2sf b
);
23 NOMIPS16
int test13 (v2sf a
, v2sf b
);
24 NOMIPS16
int test14 (v2sf a
, v2sf b
);
25 NOMIPS16
int test15 (v2sf a
, v2sf b
);
26 NOMIPS16
int test16 (v2sf a
, v2sf b
);
27 NOMIPS16
int test17 (v2sf a
, v2sf b
);
28 NOMIPS16
int test18 (v2sf a
, v2sf b
);
29 NOMIPS16
int test19 (v2sf a
, v2sf b
);
30 NOMIPS16
int test20 (v2sf a
, v2sf b
);
31 NOMIPS16
int test21 (v2sf a
, v2sf b
);
32 NOMIPS16
int test22 (v2sf a
, v2sf b
);
33 NOMIPS16
int test23 (v2sf a
, v2sf b
);
34 NOMIPS16
int test24 (v2sf a
, v2sf b
);
35 NOMIPS16
int test25 (v2sf a
, v2sf b
);
36 NOMIPS16
int test26 (v2sf a
, v2sf b
);
37 NOMIPS16
int test27 (v2sf a
, v2sf b
);
38 NOMIPS16
int test28 (v2sf a
, v2sf b
);
39 NOMIPS16
int test29 (v2sf a
, v2sf b
);
40 NOMIPS16
int test30 (v2sf a
, v2sf b
);
41 NOMIPS16
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 NOMIPS16
int test0 (v2sf a
, v2sf b
)
398 return __builtin_mips_any_c_f_ps (a
, b
);
401 NOMIPS16
int test1 (v2sf a
, v2sf b
)
403 return __builtin_mips_all_c_f_ps (a
, b
);
406 NOMIPS16
int test2 (v2sf a
, v2sf b
)
408 return __builtin_mips_any_c_un_ps (a
, b
);
411 NOMIPS16
int test3 (v2sf a
, v2sf b
)
413 return __builtin_mips_all_c_un_ps (a
, b
);
416 NOMIPS16
int test4 (v2sf a
, v2sf b
)
418 return __builtin_mips_any_c_eq_ps (a
, b
);
421 NOMIPS16
int test5 (v2sf a
, v2sf b
)
423 return __builtin_mips_all_c_eq_ps (a
, b
);
426 NOMIPS16
int test6 (v2sf a
, v2sf b
)
428 return __builtin_mips_any_c_ueq_ps (a
, b
);
431 NOMIPS16
int test7 (v2sf a
, v2sf b
)
433 return __builtin_mips_all_c_ueq_ps (a
, b
);
436 NOMIPS16
int test8 (v2sf a
, v2sf b
)
438 return __builtin_mips_any_c_olt_ps (a
, b
);
441 NOMIPS16
int test9 (v2sf a
, v2sf b
)
443 return __builtin_mips_all_c_olt_ps (a
, b
);
446 NOMIPS16
int test10 (v2sf a
, v2sf b
)
448 return __builtin_mips_any_c_ult_ps (a
, b
);
451 NOMIPS16
int test11 (v2sf a
, v2sf b
)
453 return __builtin_mips_all_c_ult_ps (a
, b
);
456 NOMIPS16
int test12 (v2sf a
, v2sf b
)
458 return __builtin_mips_any_c_ole_ps (a
, b
);
461 NOMIPS16
int test13 (v2sf a
, v2sf b
)
463 return __builtin_mips_all_c_ole_ps (a
, b
);
466 NOMIPS16
int test14 (v2sf a
, v2sf b
)
468 return __builtin_mips_any_c_ule_ps (a
, b
);
471 NOMIPS16
int test15 (v2sf a
, v2sf b
)
473 return __builtin_mips_all_c_ule_ps (a
, b
);
476 NOMIPS16
int test16 (v2sf a
, v2sf b
)
478 return __builtin_mips_any_c_sf_ps (a
, b
);
481 NOMIPS16
int test17 (v2sf a
, v2sf b
)
483 return __builtin_mips_all_c_sf_ps (a
, b
);
486 NOMIPS16
int test18 (v2sf a
, v2sf b
)
488 return __builtin_mips_any_c_ngle_ps (a
, b
);
491 NOMIPS16
int test19 (v2sf a
, v2sf b
)
493 return __builtin_mips_all_c_ngle_ps (a
, b
);
496 NOMIPS16
int test20 (v2sf a
, v2sf b
)
498 return __builtin_mips_any_c_seq_ps (a
, b
);
501 NOMIPS16
int test21 (v2sf a
, v2sf b
)
503 return __builtin_mips_all_c_seq_ps (a
, b
);
506 NOMIPS16
int test22 (v2sf a
, v2sf b
)
508 return __builtin_mips_any_c_ngl_ps (a
, b
);
511 NOMIPS16
int test23 (v2sf a
, v2sf b
)
513 return __builtin_mips_all_c_ngl_ps (a
, b
);
516 NOMIPS16
int test24 (v2sf a
, v2sf b
)
518 return __builtin_mips_any_c_lt_ps (a
, b
);
521 NOMIPS16
int test25 (v2sf a
, v2sf b
)
523 return __builtin_mips_all_c_lt_ps (a
, b
);
526 NOMIPS16
int test26 (v2sf a
, v2sf b
)
528 return __builtin_mips_any_c_nge_ps (a
, b
);
531 NOMIPS16
int test27 (v2sf a
, v2sf b
)
533 return __builtin_mips_all_c_nge_ps (a
, b
);
536 NOMIPS16
int test28 (v2sf a
, v2sf b
)
538 return __builtin_mips_any_c_le_ps (a
, b
);
541 NOMIPS16
int test29 (v2sf a
, v2sf b
)
543 return __builtin_mips_all_c_le_ps (a
, b
);
546 NOMIPS16
int test30 (v2sf a
, v2sf b
)
548 return __builtin_mips_any_c_ngt_ps (a
, b
);
551 NOMIPS16
int test31 (v2sf a
, v2sf b
)
553 return __builtin_mips_all_c_ngt_ps (a
, b
);