| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target ia32 } */ |
| 3 |
/* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=i386" } } */ |
| 4 |
/* { dg-options "-O2 -march=i386 -ffast-math -masm=att" } */ |
| 5 |
|
| 6 |
extern short s; |
| 7 |
|
| 8 |
int test_f_s (short x) |
| 9 |
{ |
| 10 |
return (float)x > s; |
| 11 |
} |
| 12 |
|
| 13 |
int test_d_s (short x) |
| 14 |
{ |
| 15 |
return (double)x < s; |
| 16 |
} |
| 17 |
|
| 18 |
int test_ld_s (short x) |
| 19 |
{ |
| 20 |
return (long double)x == s; |
| 21 |
} |
| 22 |
|
| 23 |
extern int i; |
| 24 |
|
| 25 |
int test_f_i (int x) |
| 26 |
{ |
| 27 |
return (float)i >= x; |
| 28 |
} |
| 29 |
|
| 30 |
int test_d_i (int x) |
| 31 |
{ |
| 32 |
return (double)i <= x; |
| 33 |
} |
| 34 |
|
| 35 |
int test_ld_i (int x) |
| 36 |
{ |
| 37 |
return (long double)i != x; |
| 38 |
} |
| 39 |
|
| 40 |
/* { dg-final { scan-assembler-times "cmpw\[s\t\]" 3 } } */ |
| 41 |
/* { dg-final { scan-assembler-times "ficompl" 1 } } */ |
| 42 |
/* { dg-final { scan-assembler-times "cmpl" 2 } } */ |