]>
Commit | Line | Data |
---|---|---|
96146e61 RS |
1 | /* { dg-do compile } */ |
2 | /* { dg-options "-O2 -fdump-tree-optimized" } */ | |
3 | ||
4 | unsigned int test_ior(unsigned char i) | |
5 | { | |
6 | return i | (i<<8) | (i<<16) | (i<<24); | |
7 | } | |
8 | ||
9 | unsigned int test_xor(unsigned char i) | |
10 | { | |
11 | return i ^ (i<<8) ^ (i<<16) ^ (i<<24); | |
12 | } | |
13 | ||
14 | unsigned int test_ior_1s(unsigned char i) | |
15 | { | |
16 | return i | (i<<8); | |
17 | } | |
18 | ||
19 | unsigned int test_ior_1u(unsigned char i) | |
20 | { | |
21 | unsigned int t = i; | |
22 | return t | (t<<8); | |
23 | } | |
24 | ||
25 | unsigned int test_xor_1s(unsigned char i) | |
26 | { | |
27 | return i ^ (i<<8); | |
28 | } | |
29 | ||
30 | unsigned int test_xor_1u(unsigned char i) | |
31 | { | |
32 | unsigned int t = i; | |
33 | return t ^ (t<<8); | |
34 | } | |
35 | ||
36 | unsigned int test_ior_2s(unsigned char i) | |
37 | { | |
38 | return (i<<8) | (i<<16); | |
39 | } | |
40 | ||
41 | unsigned int test_ior_2u(unsigned char i) | |
42 | { | |
43 | unsigned int t = i; | |
44 | return (t<<8) | (t<<16); | |
45 | } | |
46 | ||
47 | unsigned int test_xor_2s(unsigned char i) | |
48 | { | |
49 | return (i<<8) ^ (i<<16); | |
50 | } | |
51 | ||
52 | unsigned int test_xor_2u(unsigned char i) | |
53 | { | |
54 | unsigned int t = i; | |
55 | return (t<<8) ^ (t<<16); | |
56 | } | |
57 | ||
58 | /* { dg-final { scan-tree-dump-not " \\^ " "optimized" } } */ | |
59 | /* { dg-final { scan-tree-dump-not " \\| " "optimized" } } */ | |
60 | /* { dg-final { scan-tree-dump-times " \\* 16843009" 2 "optimized" } } */ | |
61 |