Debian Codegraph @

llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-lshr-rv64.mir

raw
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \
3 # RUN: | FileCheck %s
4 ---
5 name: lshr_i8
6 body: |
7 bb.0.entry:
8 ; CHECK-LABEL: name: lshr_i8
9 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
10 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
11 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
12 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
13 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
14 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[AND1]], [[AND]](s64)
15 ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
16 ; CHECK-NEXT: PseudoRET implicit $x10
17 %0:_(s64) = COPY $x10
18 %1:_(s64) = COPY $x11
19 %2:_(s8) = G_TRUNC %0(s64)
20 %3:_(s8) = G_TRUNC %1(s64)
21 %4:_(s8) = G_LSHR %2, %3
22 %5:_(s64) = G_ANYEXT %4(s8)
23 $x10 = COPY %5(s64)
24 PseudoRET implicit $x10
25
26 ...
27 ---
28 name: lshr_i15
29 body: |
30 bb.0.entry:
31 ; CHECK-LABEL: name: lshr_i15
32 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
33 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
34 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 32767
35 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
36 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
37 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[AND1]], [[AND]](s64)
38 ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
39 ; CHECK-NEXT: PseudoRET implicit $x10
40 %0:_(s64) = COPY $x10
41 %1:_(s64) = COPY $x11
42 %2:_(s15) = G_TRUNC %0(s64)
43 %3:_(s15) = G_TRUNC %1(s64)
44 %4:_(s15) = G_LSHR %2, %3
45 %5:_(s64) = G_ANYEXT %4(s15)
46 $x10 = COPY %5(s64)
47 PseudoRET implicit $x10
48
49 ...
50 ---
51 name: lshr_i16
52 body: |
53 bb.0.entry:
54 ; CHECK-LABEL: name: lshr_i16
55 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
56 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
57 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 65535
58 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
59 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
60 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[AND1]], [[AND]](s64)
61 ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
62 ; CHECK-NEXT: PseudoRET implicit $x10
63 %0:_(s64) = COPY $x10
64 %1:_(s64) = COPY $x11
65 %2:_(s16) = G_TRUNC %0(s64)
66 %3:_(s16) = G_TRUNC %1(s64)
67 %4:_(s16) = G_LSHR %2, %3
68 %5:_(s64) = G_ANYEXT %4(s16)
69 $x10 = COPY %5(s64)
70 PseudoRET implicit $x10
71
72 ...
73 ---
74 name: lshr_i32
75 body: |
76 bb.0.entry:
77 ; CHECK-LABEL: name: lshr_i32
78 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
79 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
80 ; CHECK-NEXT: [[SRLW:%[0-9]+]]:_(s64) = G_SRLW [[COPY]], [[COPY1]]
81 ; CHECK-NEXT: $x10 = COPY [[SRLW]](s64)
82 ; CHECK-NEXT: PseudoRET implicit $x10
83 %0:_(s64) = COPY $x10
84 %1:_(s64) = COPY $x11
85 %2:_(s32) = G_TRUNC %0(s64)
86 %3:_(s32) = G_TRUNC %1(s64)
87 %4:_(s32) = G_LSHR %2, %3
88 %5:_(s64) = G_ANYEXT %4(s32)
89 $x10 = COPY %5(s64)
90 PseudoRET implicit $x10
91
92 ...
93 ---
94 name: lshr_i64
95 body: |
96 bb.0.entry:
97 ; CHECK-LABEL: name: lshr_i64
98 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
99 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
100 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[COPY]], [[COPY1]](s64)
101 ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
102 ; CHECK-NEXT: PseudoRET implicit $x10
103 %0:_(s64) = COPY $x10
104 %1:_(s64) = COPY $x11
105 %2:_(s64) = G_LSHR %0, %1
106 $x10 = COPY %2(s64)
107 PseudoRET implicit $x10
108
109 ...
110 ---
111 name: lshr_i72
112 body: |
113 bb.0.entry:
114 ; CHECK-LABEL: name: lshr_i72
115 ; CHECK: %x00:_(s64) = COPY $x10
116 ; CHECK-NEXT: %x01:_(s64) = COPY $x11
117 ; CHECK-NEXT: %y00:_(s64) = COPY $x12
118 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
119 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 255
120 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %x00, [[C]]
121 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %x01, [[C1]]
122 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 64
123 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB %y00, [[C2]]
124 ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s64) = G_SUB [[C2]], %y00
125 ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
126 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), %y00(s64), [[C2]]
127 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %y00(s64), [[C3]]
128 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[AND1]], %y00(s64)
129 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s64) = G_LSHR [[AND]], %y00(s64)
130 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[AND1]], [[SUB1]](s64)
131 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[LSHR1]], [[SHL]]
132 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s64) = G_LSHR [[AND1]], [[SUB]](s64)
133 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[OR]], [[LSHR2]]
134 ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP1]](s64), [[AND]], [[SELECT]]
135 ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[LSHR]], [[C3]]
136 ; CHECK-NEXT: $x10 = COPY [[SELECT1]](s64)
137 ; CHECK-NEXT: $x11 = COPY [[SELECT2]](s64)
138 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
139 %x00:_(s64) = COPY $x10
140 %x01:_(s64) = COPY $x11
141 %y00:_(s64) = COPY $x12
142 %y01:_(s64) = COPY $x13
143 %x0:_(s128) = G_MERGE_VALUES %x00(s64), %x01
144 %y0:_(s128) = G_MERGE_VALUES %y00(s64), %y01
145 %x:_(s72) = G_TRUNC %x0(s128)
146 %y:_(s72) = G_TRUNC %y0(s128)
147 %z:_(s72) = G_LSHR %x, %y
148 %z0:_(s128) = G_ANYEXT %z(s72)
149 %z00:_(s64), %z01:_(s64) = G_UNMERGE_VALUES %z0(s128)
150 $x10 = COPY %z00(s64)
151 $x11 = COPY %z01(s64)
152 PseudoRET implicit $x10, implicit $x11
153
154 ...
155 ---
156 name: lshr_i128
157 body: |
158 bb.0.entry:
159 ; CHECK-LABEL: name: lshr_i128
160 ; CHECK: %lo1:_(s64) = COPY $x10
161 ; CHECK-NEXT: %hi1:_(s64) = COPY $x11
162 ; CHECK-NEXT: %lo2:_(s64) = COPY $x12
163 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 64
164 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB %lo2, [[C]]
165 ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s64) = G_SUB [[C]], %lo2
166 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
167 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), %lo2(s64), [[C]]
168 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %lo2(s64), [[C1]]
169 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR %hi1, %lo2(s64)
170 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s64) = G_LSHR %lo1, %lo2(s64)
171 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL %hi1, [[SUB1]](s64)
172 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[LSHR1]], [[SHL]]
173 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s64) = G_LSHR %hi1, [[SUB]](s64)
174 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[OR]], [[LSHR2]]
175 ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP1]](s64), %lo1, [[SELECT]]
176 ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[LSHR]], [[C1]]
177 ; CHECK-NEXT: $x10 = COPY [[SELECT1]](s64)
178 ; CHECK-NEXT: $x11 = COPY [[SELECT2]](s64)
179 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11
180 %lo1:_(s64) = COPY $x10
181 %hi1:_(s64) = COPY $x11
182 %lo2:_(s64) = COPY $x12
183 %hi2:_(s64) = COPY $x13
184 %x1:_(s128) = G_MERGE_VALUES %lo1(s64), %hi1(s64)
185 %x2:_(s128) = G_MERGE_VALUES %lo2(s64), %hi2(s64)
186 %y:_(s128) = G_LSHR %x1, %x2
187 %loy:_(s64), %hiy:_(s64) = G_UNMERGE_VALUES %y(s128)
188 $x10 = COPY %loy(s64)
189 $x11 = COPY %hiy(s64)
190 PseudoRET implicit $x10, implicit $x11
191
192 ...
193 ---
194 name: lshr_i192
195 body: |
196 bb.0.entry:
197 ; CHECK-LABEL: name: lshr_i192
198 ; CHECK: %lo1:_(s64) = COPY $x10
199 ; CHECK-NEXT: %mid1:_(s64) = COPY $x11
200 ; CHECK-NEXT: %hi1:_(s64) = COPY $x12
201 ; CHECK-NEXT: %lo2:_(s64) = COPY $x13
202 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 0
203 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 128
204 ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s64) = G_SUB %lo2, [[C1]]
205 ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s64) = G_SUB [[C1]], %lo2
206 ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), %lo2(s64), [[C1]]
207 ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %lo2(s64), [[C]]
208 ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 64
209 ; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s64) = G_SUB %lo2, [[C2]]
210 ; CHECK-NEXT: [[SUB3:%[0-9]+]]:_(s64) = G_SUB [[C2]], %lo2
211 ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), %lo2(s64), [[C2]]
212 ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %lo2(s64), [[C]]
213 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR %hi1, %lo2(s64)
214 ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL [[C]], [[SUB3]](s64)
215 ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s64) = G_OR [[LSHR]], [[SHL]]
216 ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s64) = G_LSHR [[C]], [[SUB2]](s64)
217 ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ICMP2]](s64), [[OR]], [[LSHR1]]
218 ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[ICMP3]](s64), %hi1, [[SELECT]]
219 ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), %lo2(s64), [[C2]]
220 ; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), %lo2(s64), [[C]]
221 ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s64) = G_LSHR %mid1, %lo2(s64)
222 ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s64) = G_LSHR %lo1, %lo2(s64)
223 ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s64) = G_SHL %mid1, [[SUB3]](s64)
224 ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s64) = G_OR [[LSHR3]], [[SHL1]]
225 ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s64) = G_LSHR %mid1, [[SUB2]](s64)
226 ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s64) = G_SELECT [[ICMP4]](s64), [[OR1]], [[LSHR4]]
227 ; CHECK-NEXT: [[SELECT3:%[0-9]+]]:_(s64) = G_SELECT [[ICMP5]](s64), %lo1, [[SELECT2]]
228 ; CHECK-NEXT: [[SELECT4:%[0-9]+]]:_(s64) = G_SELECT [[ICMP4]](s64), [[LSHR2]], [[C]]
229 ; CHECK-NEXT: [[SUB4:%[0-9]+]]:_(s64) = G_SUB [[SUB1]], [[C2]]
230 ; CHECK-NEXT: [[SUB5:%[0-9]+]]:_(s64) = G_SUB [[C2]], [[SUB1]]
231 ; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[SUB1]](s64), [[C2]]
232 ; CHECK-NEXT: [[ICMP7:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[SUB1]](s64), [[C]]
233 ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s64) = G_SHL %hi1, [[SUB1]](s64)
234 ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s64) = G_LSHR %hi1, [[SUB5]](s64)
235 ; CHECK-NEXT: [[SHL3:%[0-9]+]]:_(s64) = G_SHL [[C]], [[SUB1]](s64)
236 ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s64) = G_OR [[LSHR5]], [[SHL3]]
237 ; CHECK-NEXT: [[SHL4:%[0-9]+]]:_(s64) = G_SHL %hi1, [[SUB4]](s64)
238 ; CHECK-NEXT: [[SELECT5:%[0-9]+]]:_(s64) = G_SELECT [[ICMP6]](s64), [[SHL2]], [[C]]
239 ; CHECK-NEXT: [[SELECT6:%[0-9]+]]:_(s64) = G_SELECT [[ICMP6]](s64), [[OR2]], [[SHL4]]
240 ; CHECK-NEXT: [[SELECT7:%[0-9]+]]:_(s64) = G_SELECT [[ICMP7]](s64), [[C]], [[SELECT6]]
241 ; CHECK-NEXT: [[OR3:%[0-9]+]]:_(s64) = G_OR [[SELECT3]], [[SELECT5]]
242 ; CHECK-NEXT: [[OR4:%[0-9]+]]:_(s64) = G_OR [[SELECT4]], [[SELECT7]]
243 ; CHECK-NEXT: [[SUB6:%[0-9]+]]:_(s64) = G_SUB [[SUB]], [[C2]]
244 ; CHECK-NEXT: [[SUB7:%[0-9]+]]:_(s64) = G_SUB [[C2]], [[SUB]]
245 ; CHECK-NEXT: [[ICMP8:%[0-9]+]]:_(s64) = G_ICMP intpred(ult), [[SUB]](s64), [[C2]]
246 ; CHECK-NEXT: [[ICMP9:%[0-9]+]]:_(s64) = G_ICMP intpred(eq), [[SUB]](s64), [[C]]
247 ; CHECK-NEXT: [[LSHR6:%[0-9]+]]:_(s64) = G_LSHR [[C]], [[SUB]](s64)
248 ; CHECK-NEXT: [[LSHR7:%[0-9]+]]:_(s64) = G_LSHR %hi1, [[SUB]](s64)
249 ; CHECK-NEXT: [[SHL5:%[0-9]+]]:_(s64) = G_SHL [[C]], [[SUB7]](s64)
250 ; CHECK-NEXT: [[OR5:%[0-9]+]]:_(s64) = G_OR [[LSHR7]], [[SHL5]]
251 ; CHECK-NEXT: [[LSHR8:%[0-9]+]]:_(s64) = G_LSHR [[C]], [[SUB6]](s64)
252 ; CHECK-NEXT: [[SELECT8:%[0-9]+]]:_(s64) = G_SELECT [[ICMP8]](s64), [[OR5]], [[LSHR8]]
253 ; CHECK-NEXT: [[SELECT9:%[0-9]+]]:_(s64) = G_SELECT [[ICMP9]](s64), %hi1, [[SELECT8]]
254 ; CHECK-NEXT: [[SELECT10:%[0-9]+]]:_(s64) = G_SELECT [[ICMP8]](s64), [[LSHR6]], [[C]]
255 ; CHECK-NEXT: [[SELECT11:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[OR3]], [[SELECT9]]
256 ; CHECK-NEXT: [[SELECT12:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[OR4]], [[SELECT10]]
257 ; CHECK-NEXT: [[SELECT13:%[0-9]+]]:_(s64) = G_SELECT [[ICMP1]](s64), %lo1, [[SELECT11]]
258 ; CHECK-NEXT: [[SELECT14:%[0-9]+]]:_(s64) = G_SELECT [[ICMP1]](s64), %mid1, [[SELECT12]]
259 ; CHECK-NEXT: [[SELECT15:%[0-9]+]]:_(s64) = G_SELECT [[ICMP]](s64), [[SELECT1]], [[C]]
260 ; CHECK-NEXT: $x10 = COPY [[SELECT13]](s64)
261 ; CHECK-NEXT: $x11 = COPY [[SELECT14]](s64)
262 ; CHECK-NEXT: $x12 = COPY [[SELECT15]](s64)
263 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12
264 %lo1:_(s64) = COPY $x10
265 %mid1:_(s64) = COPY $x11
266 %hi1:_(s64) = COPY $x12
267 %lo2:_(s64) = COPY $x13
268 %mid2:_(s64) = COPY $x14
269 %hi2:_(s64) = COPY $x15
270 %x1:_(s192) = G_MERGE_VALUES %lo1(s64), %mid1(s64), %hi1(s64)
271 %x2:_(s192) = G_MERGE_VALUES %lo2(s64), %mid2(s64), %hi2(s64)
272 %y:_(s192) = G_LSHR %x1, %x2
273 %lo:_(s64), %mid:_(s64), %hi:_(s64) = G_UNMERGE_VALUES %y(s192)
274 $x10 = COPY %lo(s64)
275 $x11 = COPY %mid(s64)
276 $x12 = COPY %hi(s64)
277 PseudoRET implicit $x10, implicit $x11, implicit $x12
278
279 ...
280 ---
281 name: lshr_i48
282 body: |
283 bb.0:
284 liveins: $x10, $x11
285
286 ; CHECK-LABEL: name: lshr_i48
287 ; CHECK: liveins: $x10, $x11
288 ; CHECK-NEXT: {{ $}}
289 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
290 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11
291 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 281474976710655
292 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C]]
293 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND [[COPY1]], [[C]]
294 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[AND]], [[AND1]](s64)
295 ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
296 ; CHECK-NEXT: PseudoRET implicit $x10
297 %2:_(s64) = COPY $x10
298 %0:_(s48) = G_TRUNC %2(s64)
299 %3:_(s64) = COPY $x11
300 %1:_(s48) = G_TRUNC %3(s64)
301 %4:_(s48) = G_LSHR %0, %1(s48)
302 %5:_(s64) = G_ANYEXT %4(s48)
303 $x10 = COPY %5(s64)
304 PseudoRET implicit $x10
305
306 ...
307 ---
308 name: lshr_i32_i48
309 body: |
310 bb.1:
311 liveins: $x10
312
313 ; CHECK-LABEL: name: lshr_i32_i48
314 ; CHECK: liveins: $x10
315 ; CHECK-NEXT: {{ $}}
316 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
317 ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 16
318 ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 4294967295
319 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[C1]]
320 ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR [[AND]], [[C]](s64)
321 ; CHECK-NEXT: $x10 = COPY [[LSHR]](s64)
322 ; CHECK-NEXT: PseudoRET implicit $x10
323 %1:_(s64) = COPY $x10
324 %0:_(s48) = G_TRUNC %1(s64)
325 %2:_(s48) = G_CONSTANT i48 16
326 %6:_(s32) = G_TRUNC %0(s48)
327 %7:_(s32) = G_LSHR %6, %2(s48)
328 %5:_(s64) = G_ANYEXT %7(s32)
329 $x10 = COPY %5(s64)
330 PseudoRET implicit $x10
331
332 ...