1 /* Check rotate pattern detection. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-not "r\[<>]\[<>]" "optimized" } } */
5
6 unsigned short int
7 f5 (unsigned short int x, unsigned int y)
8 {
9 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
10 }
11
12 unsigned short int
13 f6 (unsigned short int x, unsigned long int y)
14 {
15 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
16 }
17
18 unsigned char
19 f7 (unsigned char x, unsigned int y)
20 {
21 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ - 1)));
22 }
23
24 unsigned char
25 f8 (unsigned char x, unsigned long int y)
26 {
27 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ - 1)));
28 }
29
30 unsigned short int
31 f13 (unsigned short int x, unsigned int y)
32 {
33 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
34 }
35
36 unsigned short int
37 f14 (unsigned short int x, unsigned long int y)
38 {
39 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
40 }
41
42 unsigned char
43 f15 (unsigned char x, unsigned int y)
44 {
45 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
46 }
47
48 unsigned char
49 f16 (unsigned char x, unsigned long int y)
50 {
51 return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
52 }
53
54 unsigned short int
55 f37 (unsigned short int x, unsigned int y)
56 {
57 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
58 }
59
60 unsigned short int
61 f38 (unsigned short int x, unsigned long int y)
62 {
63 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
64 }
65
66 unsigned char
67 f39 (unsigned char x, unsigned int y)
68 {
69 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ - 1)));
70 }
71
72 unsigned char
73 f40 (unsigned char x, unsigned long int y)
74 {
75 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ - 1)));
76 }
77
78 unsigned short int
79 f45 (unsigned short int x, unsigned int y)
80 {
81 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
82 }
83
84 unsigned short int
85 f46 (unsigned short int x, unsigned long int y)
86 {
87 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
88 }
89
90 unsigned char
91 f47 (unsigned char x, unsigned int y)
92 {
93 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
94 }
95
96 unsigned char
97 f48 (unsigned char x, unsigned long int y)
98 {
99 return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
100 }