1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
8 foo(unsigned int abc123
)
10 unsigned int xyzpdq
= (1 << abc123
);
11 if ((xyzpdq
& 0x800) != 0)
16 baz(unsigned int abc123
)
18 unsigned int xyzpdq
= (1 << abc123
);
19 if ((xyzpdq
& 0x800) == 0)
23 /* What we want to verify is that the bit test against xyzpdq is
24 replaced with a test against abc123 which avoids the shifting
26 /* { dg-final { scan-tree-dump-not "xyzpdq" "optimized"} } */
27 /* { dg-final { scan-tree-dump-times "if .abc123" 2 "optimized"} } */