aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/divmod-5.c
blob: 8a8cee50ae2d4b05fcd682fd20e2aeca24455cf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-require-effective-target divmod_simode } */
/* { dg-options "-O2 -fdump-tree-widening_mul-details" } */
/* div and mod are not in same bb and
   bb's containing div and mod don't dominate each other.  */

int f(int x, int y)
{
  int q = 0;
  int r = 0;
  extern int cond;

  if (cond)
    q = x / y;

  r = x % y;
  return q + r;
}

/* { dg-final { scan-tree-dump-times "DIVMOD" 0 "widening_mul" } } */