aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/reassoc-25.c
blob: 4ff66ef8d05cdc5a014656189cf35b2baa2caa27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2 --param tree-reassoc-width=3 -fdump-tree-reassoc1-details" } */

unsigned int
foo (int a, int b, int c, int d)
{
  unsigned int s = 0;

  s += a;
  s += b;
  s += c;
  s += d;

  return s;
}

/* Verify reassociation width was chosen to be 2.  */
/* { dg-final { scan-tree-dump-times "Width = 2" 1 "reassoc1"} } */
/* { dg-final { cleanup-tree-dump "reassoc1" } } */