* gcc.target/powerpc/builtins-1-be.c <vclzb>: Rename duplicate test
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr54089-8.c
blob6af1750daf243e0f339f519d1f2cec6b249b71eb
1 /* Check that the rotcl instruction is generated. */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-final { scan-assembler-times "rotcl" 28 } } */
6 typedef char bool;
8 long long
9 test_00 (long long a)
11 return a << 1;
14 unsigned int
15 test_01 (unsigned int a, int b, int c)
17 bool r = b == c;
18 return ((a << 1) | r);
21 unsigned int
22 test_02 (unsigned int a, int b, int c)
24 bool r = b == c;
25 return ((a << 2) | r);
28 unsigned int
29 test_03 (unsigned int a, int b, int c)
31 bool r = b == c;
32 return ((a << 3) | r);
35 unsigned int
36 test_04 (unsigned int a, int b, int c)
38 bool r = b == c;
39 return ((a << 4) | r);
42 unsigned int
43 test_05 (unsigned int a, int b, int c)
45 bool r = b == c;
46 return ((a << 5) | r);
49 unsigned int
50 test_06 (unsigned int a, int b, int c)
52 bool r = b == c;
53 return ((a << 6) | r);
56 unsigned int
57 test_07 (unsigned int a, int b, int c)
59 bool r = b == c;
60 return ((a << 7) | r);
63 unsigned int
64 test_08 (unsigned int a, int b, int c)
66 bool r = b == c;
67 return ((a << 8) | r);
70 unsigned int
71 test_09 (unsigned int a, int b, int c)
73 bool r = b == c;
74 return ((a << 31) | r);
77 unsigned int
78 test_10 (unsigned int a, int b)
80 /* 1x shlr, 1x rotcl */
81 return (a << 1) | (b & 1);
84 unsigned int
85 test_11 (unsigned int a, int b)
87 /* 1x shlr, 1x rotcl (+1x add as shll) */
88 return (a << 2) | (b & 1);
91 unsigned int
92 test_12 (unsigned int a, int b)
94 /* 1x shlr, 1x shll2, 1x rotcl */
95 return (a << 3) | (b & 1);
98 unsigned int
99 test_13 (unsigned int a, int b)
101 /* 1x shll, 1x rotcl */
102 bool r = b < 0;
103 return (a << 1) | r;
106 unsigned int
107 test_14 (unsigned int a, int b, int c)
109 bool r = b != c;
110 return ((a << 1) | r);
113 unsigned int
114 test_15 (unsigned int a, int b, int c)
116 bool r = b != c;
117 return ((a << 11) | r);
120 unsigned int
121 test_16 (unsigned int a, int b, int c)
123 bool r = b != c;
124 return ((a << 3) | r);
127 unsigned int
128 test_17 (unsigned int a, int b, int c)
130 bool r = b != c;
131 return ((a << 4) | r);
134 unsigned int
135 test_18 (unsigned int a, int b, int c)
137 bool r = b != c;
138 return ((a << 5) | r);
141 unsigned int
142 test_19 (unsigned int a, int b, int c)
144 bool r = b != c;
145 return ((a << 6) | r);
148 unsigned int
149 test_20 (unsigned int a, int b, int c)
151 bool r = b != c;
152 return ((a << 7) | r);
155 unsigned int
156 test_21 (unsigned int a, int b, int c)
158 bool r = b != c;
159 return ((a << 8) | r);
162 unsigned int
163 test_22 (unsigned int a, int b, int c)
165 bool r = b != c;
166 return ((a << 31) | r);
169 unsigned int
170 test_23 (unsigned int a, int b, int c)
172 /* 1x shll, 1x rotcl */
173 return (a >> 31) | (b << 13);
176 unsigned int
177 test_24 (unsigned int a, unsigned int b)
179 /* 1x shll, 1x rotcl */
180 return (a >> 31) | (b << 1);
183 unsigned int
184 test_25 (unsigned int a, unsigned int b)
186 /* 1x shll, 1x rotcl */
187 return (a >> 31) | (b << 3);
190 unsigned int
191 test_26 (unsigned int a, unsigned int b)
193 /* 1x shll, 1x rotcl */
194 return (b << 3) | (a >> 31);
197 unsigned int
198 test_27 (unsigned int a, unsigned int b)
200 /* 1x shlr, 1x rotcl */
201 return (a << 1) | ((b >> 4) & 1);