annotate gcc/testsuite/gcc.dg/divmod-3-simode.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 /* { dg-require-effective-target divmod_simode } */
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 extern int cond;
kono
parents:
diff changeset
9 void foo(void);
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 #define FOO(smalltype, bigtype, no) \
kono
parents:
diff changeset
12 bigtype f_##no(smalltype x, bigtype y) \
kono
parents:
diff changeset
13 { \
kono
parents:
diff changeset
14 bigtype q = x / y; \
kono
parents:
diff changeset
15 bigtype r = x % y; \
kono
parents:
diff changeset
16 return q + r; \
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 FOO(SImode, SImode, 1)
kono
parents:
diff changeset
20 FOO(SImode, USImode, 2)
kono
parents:
diff changeset
21 FOO(USImode, USImode, 3)
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* { dg-final { scan-tree-dump-times "DIVMOD" 3 "widening_mul" } } */