1 /* PR tree-optimization/52267 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-O2 -fdump-tree-optimized" } */ 4 5 int foo(int a,int b)6foo (int a, int b) 7 { 8 if (a > 3 || a < 0) 9 return a; 10 a &= 3; 11 return a & 3; 12 } 13 14 int bar(int a)15bar (int a) 16 { 17 if (a & ~3) 18 return a; 19 return a & 3; 20 } 21 22 /* { dg-final { scan-tree-dump-not "& 3" "optimized" } } */ 23 /* { dg-final { scan-tree-dump-not "& -4" "optimized" } } */ 24