| 1 |
/* { dg-require-effective-target ppc_float128_hw } */ |
| 2 |
/* { dg-options "-mvsx -O2 -ffast-math" } */ |
| 3 |
/* { dg-additional-options "-mdejagnu-cpu=power9" { target { ! has_arch_pwr9 } } } */ |
| 4 |
|
| 5 |
#ifndef TYPE |
| 6 |
#define TYPE _Float128 |
| 7 |
#endif |
| 8 |
|
| 9 |
/* Test that the fminf128/fmaxf128 functions generate if/then/else and not a |
| 10 |
call. */ |
| 11 |
TYPE f128_min (TYPE a, TYPE b) { return __builtin_fminf128 (a, b); } |
| 12 |
TYPE f128_max (TYPE a, TYPE b) { return __builtin_fmaxf128 (a, b); } |
| 13 |
|
| 14 |
/* Adjust code power10 which has native min/max instructions. */ |
| 15 |
/* { dg-final { scan-assembler-times {\mxscmpuqp\M} 2 { target { ! has_arch_pwr10 } } } } */ |
| 16 |
/* { dg-final { scan-assembler-times {\mxsmincqp\M} 1 { target has_arch_pwr10 } } } */ |
| 17 |
/* { dg-final { scan-assembler-times {\mxsmaxcqp\M} 1 { target has_arch_pwr10 } } } */ |
| 18 |
/* { dg-final { scan-assembler-not {\mbl\M} } } */ |