modula2: M2MetaError.{def,mod} and P2SymBuild.mod further cleanup
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-ior-4.c
blob17a2a4dc4190ffae189c9d608474bba0d34014f0
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)
17 return i | (i<<8);
20 unsigned int test_ior_1u(unsigned char i)
22 unsigned int t = i;
23 return t | (t<<8);
26 unsigned int test_xor_1s(unsigned char i)
28 return i ^ (i<<8);
31 unsigned int test_xor_1u(unsigned char i)
33 unsigned int t = i;
34 return t ^ (t<<8);
37 unsigned int test_ior_2s(unsigned char i)
39 return (i<<8) | (i<<16);
42 unsigned int test_ior_2u(unsigned char i)
44 unsigned int t = 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)
55 unsigned int t = 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" } } */