gcc/testsuite/gcc.target/i386/pr98169.c
raw| 1 | /* PR tree-optimization/98169 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -fno-finite-math-only" } */ |
| 4 | /* { dg-final { scan-assembler-times "\tsetn\?p\t" 4 } } */ |
| 5 | /* { dg-final { scan-assembler-not "\tjn\?\[ep]\t" } } */ |
| 6 | |
| 7 | int |
| 8 | f1 (float a) |
| 9 | { |
| 10 | return a == a; |
| 11 | } |
| 12 | |
| 13 | int |
| 14 | f2 (float a) |
| 15 | { |
| 16 | return !__builtin_isnanf (a); |
| 17 | } |
| 18 | |
| 19 | int |
| 20 | f3 (double a) |
| 21 | { |
| 22 | return a == a; |
| 23 | } |
| 24 | |
| 25 | int |
| 26 | f4 (double a) |
| 27 | { |
| 28 | return !__builtin_isnan (a); |
| 29 | } |