| 1 |
/* { dg-do compile } */ |
| 2 |
/* Disable phiopt as that will optimize away the `?:`, |
| 3 |
want to test simplify-rtx */ |
| 4 |
/* { dg-options "-O2 -ffast-math -fno-ssa-phiopt" } */ |
| 5 |
|
| 6 |
/* PR rtl-optimization/58195 */ |
| 7 |
|
| 8 |
float a2(float input) |
| 9 |
{ |
| 10 |
if (input == 0) |
| 11 |
return 0; |
| 12 |
return -input; |
| 13 |
} |
| 14 |
|
| 15 |
/* There should be no comparison against 0 here, */ |
| 16 |
/* { dg-final { scan-assembler-not "\tfcmp\t" } } */ |
| 17 |
/* { dg-final { scan-assembler-not "\tfcsel\t" } } */ |
| 18 |
/* { dg-final { scan-assembler "\tfneg\t" } } */ |
| 19 |
|