gcc/testsuite/gcc.dg/divmod-7.c
raw| 1 | /* { dg-require-effective-target divmod_simode } */ |
| 2 | /* { dg-options "-O2 -fdump-tree-widening_mul-details" } */ |
| 3 | |
| 4 | int f(int x, int y) |
| 5 | { |
| 6 | int q = 0, r1 = 0, r2 = 0; |
| 7 | extern int cond; |
| 8 | |
| 9 | if (cond) |
| 10 | q = x / y; |
| 11 | else |
| 12 | { |
| 13 | r1 = x % y; |
| 14 | return q + r1; |
| 15 | } |
| 16 | |
| 17 | r2 = x % y; |
| 18 | return q + r2; |
| 19 | } |
| 20 | |
| 21 | /* { dg-final { scan-tree-dump-times "DIVMOD" 1 "widening_mul" } } */ |