| 1 |
/* Check that fcmp/eq and fcmp/gt instructions are generated when specifying |
| 2 |
-ffinite-math-only and -mieee. */ |
| 3 |
/* { dg-do compile { target { any_fpu } } } */ |
| 4 |
/* { dg-options "-O1 -ffinite-math-only -mieee" } */ |
| 5 |
/* { dg-final { scan-assembler-times "fcmp/eq" 4 } } */ |
| 6 |
/* { dg-final { scan-assembler-times "fcmp/gt" 4 } } */ |
| 7 |
|
| 8 |
int |
| 9 |
test_00 (float a, float b) |
| 10 |
{ |
| 11 |
return a <= b; |
| 12 |
} |
| 13 |
|
| 14 |
int |
| 15 |
test_01 (float a, float b) |
| 16 |
{ |
| 17 |
return a >= b; |
| 18 |
} |
| 19 |
|
| 20 |
int |
| 21 |
test_02 (double a, double b) |
| 22 |
{ |
| 23 |
return a <= b; |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
test_03 (double a, double b) |
| 28 |
{ |
| 29 |
return a >= b; |
| 30 |
} |