annotate gcc/testsuite/gcc.dg/combine_ashiftrt_2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Target architectures where RTL has been found to produce the expected
kono
parents:
diff changeset
2 (neg:SI (ge:SI ...)) when compiling for ILP32. */
kono
parents:
diff changeset
3 /* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* microblaze-*-* mips*-*-* powerpc*-*-* sparc*-*-* x86_64-*-* } } */
kono
parents:
diff changeset
4 /* { dg-require-effective-target ilp32 } */
kono
parents:
diff changeset
5 /* { dg-options "-O2 -fdump-rtl-combine-all" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 typedef long int32_t;
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 int32_t
kono
parents:
diff changeset
10 foo (int32_t a)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 return (~a) >> 31;
kono
parents:
diff changeset
13 }
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 /* The combine phase will try to combine not & ashiftrt, and
kono
parents:
diff changeset
16 combine_simplify_rtx should transform (ashiftrt (not x) 31)
kono
parents:
diff changeset
17 to (not (ashiftrt x 63)) and then to (neg (ge x 0)). We look for
kono
parents:
diff changeset
18 the *attempt* to match this RTL pattern, regardless of whether an
kono
parents:
diff changeset
19 actual insn may be found on the platform. */
kono
parents:
diff changeset
20 /* { dg-final { scan-rtl-dump "\\(neg:SI \\(ge:SI" "combine" } } */