annotate gcc/testsuite/gcc.dg/divmod-3.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 /* { dg-require-effective-target divmod } */
kono
parents:
diff changeset
2 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
kono
parents:
diff changeset
3 /* div comes before mod in same bb. */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 typedef int SImode __attribute__((mode(SI)));
kono
parents:
diff changeset
6 typedef unsigned USImode __attribute__((mode(SI)));
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 typedef int DImode __attribute__((mode(DI)));
kono
parents:
diff changeset
9 typedef unsigned UDImode __attribute__((mode(DI)));
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 extern int cond;
kono
parents:
diff changeset
12 void foo(void);
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 #define FOO(smalltype, bigtype, no) \
kono
parents:
diff changeset
15 bigtype f_##no(smalltype x, bigtype y) \
kono
parents:
diff changeset
16 { \
kono
parents:
diff changeset
17 bigtype q = x / y; \
kono
parents:
diff changeset
18 bigtype r = x % y; \
kono
parents:
diff changeset
19 return q + r; \
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 FOO(SImode, DImode, 1)
kono
parents:
diff changeset
23 FOO(SImode, UDImode, 2)
kono
parents:
diff changeset
24 FOO(USImode, DImode, 3)
kono
parents:
diff changeset
25 FOO(USImode, UDImode, 4)
kono
parents:
diff changeset
26 FOO(DImode, DImode, 5)
kono
parents:
diff changeset
27 FOO(DImode, UDImode, 6)
kono
parents:
diff changeset
28 FOO(UDImode, UDImode, 7)
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* { dg-final { scan-tree-dump-times "DIVMOD" 7 "widening_mul" } } */