| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-options "-mapxf -march=x86-64 -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-not "setle"} } */ |
| 4 |
/* { dg-final { scan-assembler-not "setge"} } */ |
| 5 |
/* { dg-final { scan-assembler-not "sete"} } */ |
| 6 |
/* { dg-final { scan-assembler-not "xor"} } */ |
| 7 |
/* { dg-final { scan-assembler-times "setzune" 1} } */ |
| 8 |
/* { dg-final { scan-assembler-times "setzule" 1} } */ |
| 9 |
/* { dg-final { scan-assembler-times "setzue" 1} } */ |
| 10 |
/* { dg-final { scan-assembler-times "setzuge" 1} } */ |
| 11 |
/* { dg-final { scan-assembler "imulzu"} } */ |
| 12 |
|
| 13 |
__attribute__((noinline, noclone, target("apxf"))) |
| 14 |
long long foo0 (int a) |
| 15 |
{ |
| 16 |
return a == 0 ? 0 : 1; |
| 17 |
} |
| 18 |
|
| 19 |
__attribute__((noinline, noclone, target("apxf"))) |
| 20 |
long foo1 (int a, int b) |
| 21 |
{ |
| 22 |
return a > b ? 0 : 1; |
| 23 |
} |
| 24 |
|
| 25 |
__attribute__((noinline, noclone, target("apxf"))) |
| 26 |
int foo2 (int a, int b) |
| 27 |
{ |
| 28 |
return a != b ? 0 : 1; |
| 29 |
} |
| 30 |
|
| 31 |
__attribute__((noinline, noclone, target("apxf"))) |
| 32 |
short foo3 (int a, int b) |
| 33 |
{ |
| 34 |
return a < b ? 0 : 1; |
| 35 |
} |
| 36 |
|
| 37 |
__attribute__((noinline, noclone, target("apxf"))) |
| 38 |
unsigned long |
| 39 |
f1(unsigned short x) |
| 40 |
{ |
| 41 |
unsigned short a; |
| 42 |
a = x * 1000; |
| 43 |
return a; |
| 44 |
} |