gcc/testsuite/gcc.target/i386/pr105513-1.c
raw| 1 | /* { dg-do compile { target { ! ia32 } } } */ |
| 2 | /* { dg-options "-O2 -msse2 -mtune=skylake -mfpmath=sse" } */ |
| 3 | /* { dg-final { scan-assembler-not "\\(%rsp\\)" } } */ |
| 4 | |
| 5 | static int as_int(float x) |
| 6 | { |
| 7 | return (union{float x; int i;}){x}.i; |
| 8 | } |
| 9 | |
| 10 | float f(double y, float x) |
| 11 | { |
| 12 | int i = as_int(x); |
| 13 | if (__builtin_expect(i > 99, 0)) return 0; |
| 14 | if (i*2u < 77) if (i==2) return 0; |
| 15 | return y*x; |
| 16 | } |