PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / combine_ashiftrt_2.c
blobb499544658f3911fd5e0013431cb889a5930e552
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" } */
7 typedef long int32_t;
9 int32_t
10 foo (int32_t a)
12 return (~a) >> 31;
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" } } */