annotate gcc/testsuite/gcc.dg/combine_ashiftrt_1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Target architectures which have been found to produce the expected RTL
kono
parents:
diff changeset
2 (neg:DI (ge:DI ...)) when compiling for LP64. */
kono
parents:
diff changeset
3 /* { dg-do compile { target aarch64*-*-* arm*-*-* i?86-*-* ia64-*-* powerpc*-*-* sparc*-*-* x86_64-*-* } } */
kono
parents:
diff changeset
4 /* { dg-require-effective-target lp64 } */
kono
parents:
diff changeset
5 /* { dg-options "-O2 -fdump-rtl-combine-all" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 typedef long long int int64_t;
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 int64_t
kono
parents:
diff changeset
10 foo (int64_t a)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 return (~a) >> 63;
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) 63)
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:DI \\(ge:DI" "combine" } } */