| 1 |
/* Target architectures where RTL has been found to produce the expected |
| 2 |
(neg:SI (ge:SI ...)) when compiling for ILP32. */ |
| 3 |
/* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* microblaze-*-* mips*-*-* powerpc*-*-* sparc*-*-* x86_64-*-* } } */ |
| 4 |
/* { dg-require-effective-target ilp32 } */ |
| 5 |
/* { dg-options "-O2 -fdump-rtl-combine-all" } */ |
| 6 |
|
| 7 |
typedef long int32_t; |
| 8 |
|
| 9 |
int32_t |
| 10 |
foo (int32_t a) |
| 11 |
{ |
| 12 |
return (~a) >> 31; |
| 13 |
} |
| 14 |
|
| 15 |
/* The combine phase will try to combine not & ashiftrt, and |
| 16 |
combine_simplify_rtx should transform (ashiftrt (not x) 31) |
| 17 |
to (not (ashiftrt x 63)) and then to (neg (ge x 0)). We look for |
| 18 |
the *attempt* to match this RTL pattern, regardless of whether an |
| 19 |
actual insn may be found on the platform. */ |
| 20 |
/* { dg-final { scan-rtl-dump "\\(neg:SI \\(ge:SI" "combine" } } */ |