]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/divmod-4-simode.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / divmod-4-simode.c
1 /* { dg-require-effective-target divmod_simode } */
2 /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
3 /* mod comes before div in same bb. */
4
5 typedef int SImode __attribute__((mode(SI)));
6 typedef unsigned USImode __attribute__((mode(SI)));
7
8 extern int cond;
9 void foo(void);
10
11 #define FOO(smalltype, bigtype, no) \
12 bigtype f_##no(smalltype x, bigtype y) \
13 { \
14 bigtype r = x % y; \
15 bigtype q = x / y; \
16 return q + r; \
17 }
18
19 FOO(SImode, SImode, 1)
20 FOO(SImode, USImode, 2)
21 FOO(USImode, USImode, 3)
22
23 /* { dg-final { scan-tree-dump-times "DIVMOD" 3 "widening_mul" } } */