| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mvis3" } */ |
| 3 |
|
| 4 |
float test_fnadds(float x, float y) |
| 5 |
{ |
| 6 |
return -(x + y); |
| 7 |
} |
| 8 |
|
| 9 |
double test_fnaddd(double x, double y) |
| 10 |
{ |
| 11 |
return -(x + y); |
| 12 |
} |
| 13 |
|
| 14 |
float test_fnmuls(float x, float y) |
| 15 |
{ |
| 16 |
return -(x * y); |
| 17 |
} |
| 18 |
|
| 19 |
double test_fnmuld(double x, double y) |
| 20 |
{ |
| 21 |
return -(x * y); |
| 22 |
} |
| 23 |
|
| 24 |
double test_fnsmuld(float x, float y) |
| 25 |
{ |
| 26 |
return -((double)x * (double)y); |
| 27 |
} |
| 28 |
|
| 29 |
/* { dg-final { scan-assembler "fnadds\t%" } } */ |
| 30 |
/* { dg-final { scan-assembler "fnaddd\t%" } } */ |
| 31 |
/* { dg-final { scan-assembler "fnmuls\t%" } } */ |
| 32 |
/* { dg-final { scan-assembler "fnmuld\t%" } } */ |
| 33 |
/* { dg-final { scan-assembler "fnsmuld\t%" } } */ |