| 1 |
/* { dg-do run { target { powerpc64*-*-* && p8vector_hw } } } */ |
| 2 |
/* { dg-options "-mfloat128 -mvsx" } */ |
| 3 |
/* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */ |
| 4 |
|
| 5 |
void abort (); |
| 6 |
|
| 7 |
typedef __complex float __cfloat128 __attribute__((mode(KC))); |
| 8 |
|
| 9 |
__cfloat128 divide (__cfloat128 x, __cfloat128 y) |
| 10 |
{ |
| 11 |
return x / y; |
| 12 |
} |
| 13 |
|
| 14 |
__cfloat128 z, a; |
| 15 |
|
| 16 |
int main () |
| 17 |
{ |
| 18 |
z = divide (5.0q + 5.0jq, 2.0q + 1.0jq); |
| 19 |
a = 3.0q + 1.0jq; |
| 20 |
if (z != a) |
| 21 |
abort (); |
| 22 |
return 0; |
| 23 |
} |