annotate gcc/testsuite/gcc.dg/fold-mod-1.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-require-effective-target int32plus } */
kono
parents:
diff changeset
3 /* { dg-options "-fdump-tree-gimple -fstrict-overflow" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 #define ABS(x) (x > 0 ? x : -x)
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 unsigned int f (unsigned int a) {
kono
parents:
diff changeset
8 /* (unsigned)-8 is not a power of 2. */
kono
parents:
diff changeset
9 return a % -8;
kono
parents:
diff changeset
10 }
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 int g (int b) {
kono
parents:
diff changeset
13 return ABS (b) % -8;
kono
parents:
diff changeset
14 }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 int h (int c) {
kono
parents:
diff changeset
17 return ABS (c) % 8;
kono
parents:
diff changeset
18 }
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 unsigned int k (unsigned int d) {
kono
parents:
diff changeset
21 return d % 8;
kono
parents:
diff changeset
22 }
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 /* { dg-final { scan-tree-dump "a % (4294967288|0x0fffffff8)" "gimple" } } */
kono
parents:
diff changeset
25 /* { dg-final { scan-tree-dump-times " & 7" 3 "gimple" } } */