re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / reassoc-7.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-reassoc1" } */
3 int main(int a, int b, int c, int d, int e, int f, int g, int h)
4 {
5 /* Should be transformed into a + c + d + e + g + 15 */
6 int i = (a + 9) + (c + d);
7 int j = (e + 4) + (2 + g);
8 e = i + j;
9 return e;
10 }
11 /* { dg-final { scan-tree-dump-times "\\\+ 15" 1 "reassoc1"} } */
12 /* { dg-final { cleanup-tree-dump "reassoc1" } } */