gcc:
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-and-rshift-2.c
blobf88d48dc34a26cbd8f422675269658f6155a0963
1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-original" } */
4 unsigned f(unsigned x)
6 return (x >> 29) & 32;
9 unsigned g(unsigned x)
11 return !!(x & 0x80000000) << 5;
14 unsigned j(unsigned x)
16 return ((x >> 31) & 1) ? 32 : 0;
19 unsigned k(unsigned x)
21 return (x & 0x80000000) ? 32 : 0;
24 /* { dg-final { scan-tree-dump-not " \\? " "original" } } */
25 /* { dg-final { scan-assembler-not "sall" { target i?86-*-* x86_64-*-* } } }" */