PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / reassoc-23.c
bloba5451ade6ef37fafdfe99d33bd50da13c75b5dbb
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-reassoc1" } */
4 unsigned int
5 foo(unsigned int a, unsigned int b, unsigned int c, unsigned int d,
6 unsigned int e, unsigned int f, unsigned int g, unsigned int h)
8 /* Should be transformed into e = 20 */
9 unsigned int i = (a + 9);
10 unsigned int j = (-c + 1);
11 i += (c + 8);
12 j += (-a + 2);
13 e = i + j;
14 return e;
17 /* { dg-final { scan-tree-dump-times "= 20" 1 "reassoc1"} } */