Relax check against commuting XOR and ASHIFTRT in combine.c
[official-gcc.git] / gcc / testsuite / gcc.dg / combine_ashiftrt_2.c
blobfd6827caed230ea5dd2d6ec4431b11bf826531ea
1 /* { dg-do compile {target arm*-*-* i?86-*-* powerpc-*-* sparc-*-*} } */
2 /* { dg-options "-O2 -fdump-rtl-combine-all" } */
4 typedef long int32_t;
6 int32_t
7 foo (int32_t a)
9 return (~a) >> 31;
12 /* The combine phase will try to combine not & ashiftrt, and
13 combine_simplify_rtx should transform (ashiftrt (not x) 31)
14 to (not (ashiftrt x 63)) and then to (neg (ge x 0)). We look for
15 the *attempt* to match this RTL pattern, regardless of whether an
16 actual insn may be found on the platform. */
17 /* { dg-final { scan-rtl-dump "\\(neg:SI \\(ge:SI" "combine" } } */
18 /* { dg-final { cleanup-rtl-dump "combine" } } */