| 1 |
/* PR tree-optimization/91734 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-add-options ieee } */ |
| 4 |
/* { dg-additional-options "-O2 -std=gnu99" } */ |
| 5 |
|
| 6 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 7 |
f1 (float x) |
| 8 |
{ |
| 9 |
return __builtin_sqrtf (x) < __FLT_MIN__; |
| 10 |
} |
| 11 |
|
| 12 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 13 |
f2 (float x) |
| 14 |
{ |
| 15 |
return __builtin_sqrtf (x) < 0x1.2dd3d0p-65f; |
| 16 |
} |
| 17 |
|
| 18 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 19 |
f3 (float x) |
| 20 |
{ |
| 21 |
return __builtin_sqrtf (x) >= 0x1.2dd3d0p-65f; |
| 22 |
} |
| 23 |
|
| 24 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 25 |
f4 (float x) |
| 26 |
{ |
| 27 |
return __builtin_sqrtf (x) >= 0x1.5642e6p+54f; |
| 28 |
} |
| 29 |
|
| 30 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 31 |
f5 (float x) |
| 32 |
{ |
| 33 |
return __builtin_sqrtf (x) > 0x1.5642e6p+54f; |
| 34 |
} |
| 35 |
|
| 36 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 37 |
f6 (float x) |
| 38 |
{ |
| 39 |
return __builtin_sqrtf (x) < 0x1.4da1cp-19f; |
| 40 |
} |
| 41 |
|
| 42 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 43 |
f7 (float x) |
| 44 |
{ |
| 45 |
return __builtin_sqrtf (x) <= 0x1.4da1cp-19f; |
| 46 |
} |
| 47 |
|
| 48 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 49 |
f8 (float x) |
| 50 |
{ |
| 51 |
return __builtin_sqrtf (x) < 0x1.50cb62p-65f; |
| 52 |
} |
| 53 |
|
| 54 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 55 |
f9 (float x) |
| 56 |
{ |
| 57 |
return __builtin_sqrtf (x) <= 0x1.4fc00cp-73f; |
| 58 |
} |
| 59 |
|
| 60 |
__attribute__((noipa, optimize ("Ofast"))) int |
| 61 |
f10 (float x) |
| 62 |
{ |
| 63 |
return __builtin_sqrtf (x) < 0x1.001002p+0f; |
| 64 |
} |
| 65 |
|
| 66 |
int |
| 67 |
main () |
| 68 |
{ |
| 69 |
if (__FLT_RADIX__ != 2 |
| 70 |
|| __FLT_MANT_DIG__ != 24 |
| 71 |
|| __FLT_MIN_EXP__ != -125 |
| 72 |
|| __FLT_MAX_EXP__ != 128 |
| 73 |
|| __FLT_HAS_DENORM__ != 1 |
| 74 |
|| __FLT_HAS_INFINITY__ != 1) |
| 75 |
return 0; |
| 76 |
if (!f1 (0.0f) || f1 (0x1.0p-149f)) |
| 77 |
__builtin_abort (); |
| 78 |
if (!f2 (0x1.63dbc0p-130f)) |
| 79 |
__builtin_abort (); |
| 80 |
if (f3 (0x1.63dbc0p-130f)) |
| 81 |
__builtin_abort (); |
| 82 |
if (!f4 (0x1.c996d0p+108f) || !f4 (0x1.c996cep+108f) || f4 (0x1.c996ccp+108f)) |
| 83 |
__builtin_abort (); |
| 84 |
if (f5 (0x1.c996d0p+108f) || f5 (0x1.c996d2p+108f) || !f5 (0x1.c996d4p+108f)) |
| 85 |
__builtin_abort (); |
| 86 |
if (!f6 (0x1.b2ce3p-38f) || f6 (0x1.b2ce32p-38f) || f6 (0x1.b2ce34p-38f)) |
| 87 |
__builtin_abort (); |
| 88 |
if (!f7 (0x1.b2ce3p-38f) || !f7 (0x1.b2ce34p-38f) || !f7 (0x1.b2ce36p-38f) || f7 (0x1.b2ce38p-38f)) |
| 89 |
__builtin_abort (); |
| 90 |
if (!f8 (0x1.bb166p-130f) || !f8 (0x1.bb168p-130f) || f8 (0x1.bb16ap-130f) || f8 (0x1.bb16cp-130f)) |
| 91 |
__builtin_abort (); |
| 92 |
if (!f9 (0x1.8p-146f) || !f9 (0x1.ap-146f) || f9 (0x1.cp-146f) || f9 (0x1.ep-146f)) |
| 93 |
__builtin_abort (); |
| 94 |
if (f10 (0x1.002004p+0f)) |
| 95 |
__builtin_abort (); |
| 96 |
return 0; |
| 97 |
} |