| 1 |
/* { dg-do run { target { powerpc*-*-* } } } */ |
| 2 |
/* { dg-require-effective-target p9vector_hw } */ |
| 3 |
/* { dg-options "-mdejagnu-cpu=power9" } */ |
| 4 |
|
| 5 |
#include <altivec.h> |
| 6 |
#include <stdbool.h> |
| 7 |
#include <stdlib.h> |
| 8 |
|
| 9 |
bool |
| 10 |
test_neg (float *p) |
| 11 |
{ |
| 12 |
float source = *p; |
| 13 |
|
| 14 |
return scalar_test_neg (source); |
| 15 |
} |
| 16 |
|
| 17 |
int |
| 18 |
main () |
| 19 |
{ |
| 20 |
float neg_number = (float) -1; |
| 21 |
float plus_number = (float) 1; |
| 22 |
|
| 23 |
if (!test_neg (&neg_number)) |
| 24 |
abort (); |
| 25 |
if (test_neg (&plus_number)) |
| 26 |
abort (); |
| 27 |
return 0; |
| 28 |
} |