re PR tree-optimization/33291 (a+=2; a+=2 not simplified to a+=4; with -O3 ...
[gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr19055.c
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-gimple" } */
3 int f1(int a,int b)
4 {
5 return (a|b) ^ b;
6 }
7 int f2(int a,int b)
8 {
9 return (b|a) ^ b;
10 }
11 int f3(int a,int b)
12 {
13 return b^(a|b);
14 }
15 int f4(int a,int b)
16 {
17 return b^(b|a);
18 }
19 /* There should be no ^, 4 ~ and 4 &. */
20 /* { dg-final { scan-tree-dump-times "\\^" 0 "gimple"} } */
21 /* { dg-final { scan-tree-dump-times "~" 4 "gimple"} } */
22 /* { dg-final { scan-tree-dump-times "&" 4 "gimple"} } */
23 /* { dg-final { cleanup-tree-dump "gimple" } } */