1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 /* { dg-require-effective-target int32plus } */
5 unsigned int test_ior(unsigned char i
)
7 return i
| (i
<<8) | (i
<<16) | (i
<<24);
10 unsigned int test_xor(unsigned char i
)
12 return i
^ (i
<<8) ^ (i
<<16) ^ (i
<<24);
15 unsigned int test_ior_1s(unsigned char i
)
20 unsigned int test_ior_1u(unsigned char i
)
26 unsigned int test_xor_1s(unsigned char i
)
31 unsigned int test_xor_1u(unsigned char i
)
37 unsigned int test_ior_2s(unsigned char i
)
39 return (i
<<8) | (i
<<16);
42 unsigned int test_ior_2u(unsigned char i
)
45 return (t
<<8) | (t
<<16);
48 unsigned int test_xor_2s(unsigned char i
)
50 return (i
<<8) ^ (i
<<16);
53 unsigned int test_xor_2u(unsigned char i
)
56 return (t
<<8) ^ (t
<<16);
59 /* { dg-final { scan-tree-dump-not " \\^ " "optimized" } } */
60 /* { dg-final { scan-tree-dump-not " \\| " "optimized" } } */
61 /* { dg-final { scan-tree-dump-times " \\* 16843009" 2 "optimized" } } */