• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -run-pass ppc-pre-emit-peephole %s -o - | FileCheck %s
3
4---
5name:            t1
6alignment:       16
7tracksRegLiveness: true
8machineFunctionInfo: {}
9body:             |
10  bb.0.entry:
11    liveins: $x1
12
13    ; CHECK-LABEL: name: t1
14    ; CHECK: liveins: $x1
15    ; CHECK: renamable $x3 = LI8 0
16    ; CHECK: STD renamable $x3, 16, $x1
17    ; CHECK: STD killed renamable $x3, 8, $x1
18    ; CHECK: BLR8 implicit $lr8, implicit $rm
19    renamable $x3 = LI8 0
20    STD killed renamable $x3, 16, $x1
21    renamable $x3 = LI8 0
22    STD killed renamable $x3, 8, $x1
23    BLR8 implicit $lr8, implicit $rm
24
25...
26---
27name:            t2
28alignment:       16
29tracksRegLiveness: true
30machineFunctionInfo: {}
31body:             |
32  bb.0.entry:
33    liveins: $x1
34
35    ; CHECK-LABEL: name: t2
36    ; CHECK: liveins: $x1
37    ; CHECK: renamable $x3 = LI8 0
38    ; CHECK: STD renamable $x3, 32, $x1
39    ; CHECK: STD renamable $x3, 24, $x1
40    ; CHECK: STD renamable $x3, 16, $x1
41    ; CHECK: STD killed renamable $x3, 8, $x1
42    ; CHECK: BLR8 implicit $lr8, implicit $rm
43    renamable $x3 = LI8 0
44    STD killed renamable $x3, 32, $x1
45    renamable $x3 = LI8 0
46    STD killed renamable $x3, 24, $x1
47    renamable $x3 = LI8 0
48    STD killed renamable $x3, 16, $x1
49    renamable $x3 = LI8 0
50    STD killed renamable $x3, 8, $x1
51    BLR8 implicit $lr8, implicit $rm
52
53...
54---
55name:            t3
56alignment:       16
57tracksRegLiveness: true
58machineFunctionInfo: {}
59body:             |
60  bb.0.entry:
61    liveins: $x1
62
63    ; CHECK-LABEL: name: t3
64    ; CHECK: liveins: $x1
65    ; CHECK: renamable $x3 = LI8 0
66    ; CHECK: STD renamable $x3, 32, $x1
67    ; CHECK: STD renamable $x3, 24, $x1
68    ; CHECK: BLR8 implicit $lr8, implicit $rm
69    renamable $x3 = LI8 0
70    STD killed renamable $x3, 32, $x1
71    renamable $x3 = LI8 0
72    STD renamable $x3, 24, $x1
73    BLR8 implicit $lr8, implicit $rm
74
75...
76---
77name:            t4
78alignment:       16
79tracksRegLiveness: true
80machineFunctionInfo: {}
81body:             |
82  bb.0.entry:
83    liveins: $x1
84
85    ; CHECK-LABEL: name: t4
86    ; CHECK: liveins: $x1
87    ; CHECK: renamable $x3 = LI8 0
88    ; CHECK: STD renamable $x3, 16, $x1
89    ; CHECK: renamable $x4 = ADDI8 renamable $x3, 8
90    ; CHECK: STD killed renamable $x3, 8, $x1
91    ; CHECK: BLR8 implicit $lr8, implicit $rm
92    renamable $x3 = LI8 0
93    STD killed renamable $x3, 16, $x1
94    renamable $x3 = LI8 0
95    renamable $x4 = ADDI8 killed renamable $x3, 8
96    renamable $x3 = LI8 0
97    STD killed renamable $x3, 8, $x1
98    BLR8 implicit $lr8, implicit $rm
99
100...
101---
102name:            t5
103alignment:       16
104tracksRegLiveness: true
105machineFunctionInfo: {}
106body:             |
107  bb.0.entry:
108    liveins: $x1
109
110    ; CHECK-LABEL: name: t5
111    ; CHECK: liveins: $x1
112    ; CHECK: renamable $r3 = LI 0
113    ; CHECK: STW renamable $r3, 16, $x1
114    ; CHECK: STW killed renamable $r3, 12, $x1
115    ; CHECK: renamable $r3 = LI 1
116    ; CHECK: BLR8 implicit $lr8, implicit $rm
117    renamable $r3 = LI 0
118    STW killed renamable $r3, 16, $x1
119    renamable $r3 = LI 0
120    STW killed renamable $r3, 12, $x1
121    renamable $r3 = LI 1
122    BLR8 implicit $lr8, implicit $rm
123
124...
125---
126name:            t6
127alignment:       16
128tracksRegLiveness: true
129machineFunctionInfo: {}
130body:             |
131  bb.0.entry:
132    liveins: $x1
133
134    ; CHECK-LABEL: name: t6
135    ; CHECK: liveins: $x1
136    ; CHECK: renamable $x3 = LI8 0
137    ; CHECK: renamable $x4 = LI8 1
138    ; CHECK: STD renamable $x3, 32, $x1
139    ; CHECK: STD renamable $x4, 24, $x1
140    ; CHECK: STD killed renamable $x3, 16, $x1
141    ; CHECK: STD killed renamable $x4, 8, $x1
142    ; CHECK: BLR8 implicit $lr8, implicit $rm
143    renamable $x3 = LI8 0
144    renamable $x4 = LI8 1
145    STD killed renamable $x3, 32, $x1
146    STD killed renamable $x4, 24, $x1
147    renamable $x3 = LI8 0
148    renamable $x4 = LI8 1
149    STD killed renamable $x3, 16, $x1
150    STD killed renamable $x4, 8, $x1
151    BLR8 implicit $lr8, implicit $rm
152
153...
154---
155name:            t7
156alignment:       16
157tracksRegLiveness: true
158machineFunctionInfo: {}
159body:             |
160  bb.0.entry:
161    liveins: $x1, $x4
162
163    ; CHECK-LABEL: name: t7
164    ; CHECK: liveins: $x1, $x4
165    ; CHECK: renamable $x3 = LI8 0
166    ; CHECK: STD killed renamable $x3, 32, $x1
167    ; CHECK: renamable $x3 = ADDI8 $x4, 6
168    ; CHECK: BLR8 implicit $lr8, implicit $rm
169    renamable $x3 = LI8 0
170    STD killed renamable $x3, 32, $x1
171    renamable $x3 = ADDI8 $x4, 6
172    BLR8 implicit $lr8, implicit $rm
173
174...
175---
176name:            t8
177alignment:       16
178tracksRegLiveness: true
179machineFunctionInfo: {}
180body:             |
181  bb.0.entry:
182    liveins: $x1
183
184    ; CHECK-LABEL: name: t8
185    ; CHECK: liveins: $x1
186    ; CHECK: renamable $x3 = LI8 0
187    ; CHECK: STD renamable $x3, 32, $x1
188    ; CHECK: BLR8 implicit $lr8, implicit $rm
189    renamable $x3 = LI8 0
190    STD killed renamable $x3, 32, $x1
191    renamable $x3 = LI8 0
192    BLR8 implicit $lr8, implicit $rm
193
194...
195---
196name:            t9
197alignment:       16
198tracksRegLiveness: true
199machineFunctionInfo: {}
200body:             |
201  ; CHECK-LABEL: name: t9
202  ; CHECK: bb.0.entry:
203  ; CHECK:   successors: %bb.2(0x40000000), %bb.1(0x40000000)
204  ; CHECK:   liveins: $x3
205  ; CHECK:   renamable $r4 = LI 0, implicit-def $x4
206  ; CHECK:   renamable $x24 = RLDICL renamable $x4, 0, 32
207  ; CHECK:   renamable $cr0 = CMPLDI renamable $x3, 0
208  ; CHECK:   BCC 68, killed renamable $cr0, %bb.1
209  ; CHECK:   B %bb.2
210  ; CHECK: bb.1:
211  ; CHECK:   liveins: $r4, $x1
212  ; CHECK:   STW killed renamable $r4, 16, $x1
213  ; CHECK:   BLR8 implicit $lr8, implicit $rm
214  ; CHECK: bb.2:
215  ; CHECK:   liveins: $r4, $x1
216  ; CHECK:   STW killed renamable $r4, 32, $x1
217  ; CHECK:   BLR8 implicit $lr8, implicit $rm
218  bb.0.entry:
219    liveins: $x3
220    successors: %bb.8, %bb.7
221
222    renamable $r4 = LI 0, implicit-def $x4
223    renamable $x24 = RLDICL killed renamable $x4, 0 , 32
224    renamable $cr0 = CMPLDI renamable $x3, 0
225    renamable $r4 = LI 0
226    BCC 68, killed renamable $cr0, %bb.7
227    B %bb.8
228
229  bb.7:
230    liveins: $r4, $x1
231    STW killed renamable $r4, 16, $x1
232    BLR8 implicit $lr8, implicit $rm
233
234  bb.8:
235    liveins: $r4, $x1
236    STW killed renamable $r4, 32, $x1
237    BLR8 implicit $lr8, implicit $rm
238
239...
240---
241name:            t10
242alignment:       16
243tracksRegLiveness: true
244machineFunctionInfo: {}
245body:             |
246  bb.0.entry:
247    liveins: $x1
248
249    ; CHECK-LABEL: name: t10
250    ; CHECK: liveins: $x1
251    ; CHECK: renamable $x3 = LI8 24
252    ; CHECK: STD killed renamable $x3, 16, $x1
253    ; CHECK: renamable $r3 = LI 0
254    ; CHECK: STW killed renamable $r3, 26, $x1
255    ; CHECK: BLR8 implicit $lr8, implicit $rm
256    renamable $x3 = LI8 24
257    STD killed renamable $x3, 16, $x1
258    renamable $r3 = LI 0
259    STW killed renamable $r3, 26, $x1
260    BLR8 implicit $lr8, implicit $rm
261
262...
263---
264name:            LIS8
265alignment:       16
266tracksRegLiveness: true
267machineFunctionInfo: {}
268body:             |
269  bb.0.entry:
270    liveins: $x1
271
272    ; CHECK-LABEL: name: LIS8
273    ; CHECK: liveins: $x1
274    ; CHECK: renamable $x3 = LIS8 0
275    ; CHECK: STD renamable $x3, 16, $x1
276    ; CHECK: STD killed renamable $x3, 8, $x1
277    ; CHECK: BLR8 implicit $lr8, implicit $rm
278    renamable $x3 = LIS8 0
279    STD killed renamable $x3, 16, $x1
280    renamable $x3 = LIS8 0
281    STD killed renamable $x3, 8, $x1
282    BLR8 implicit $lr8, implicit $rm
283
284...
285---
286name:            LIS
287alignment:       16
288tracksRegLiveness: true
289machineFunctionInfo: {}
290body:             |
291  bb.0.entry:
292    liveins: $x1
293
294    ; CHECK-LABEL: name: LIS
295    ; CHECK: liveins: $x1
296    ; CHECK: renamable $r3 = LIS 0
297    ; CHECK: STW renamable $r3, 16, $x1
298    ; CHECK: STW killed renamable $r3, 12, $x1
299    ; CHECK: BLR8 implicit $lr8, implicit $rm
300    renamable $r3 = LIS 0
301    STW killed renamable $r3, 16, $x1
302    renamable $r3 = LIS 0
303    STW killed renamable $r3, 12, $x1
304    BLR8 implicit $lr8, implicit $rm
305
306...
307---
308name:            modify_and_kill_the_reg_in_the_same_inst
309alignment:       16
310tracksRegLiveness: true
311machineFunctionInfo: {}
312body:             |
313  bb.0.entry:
314
315    ; CHECK-LABEL: name: modify_and_kill_the_reg_in_the_same_inst
316    ; CHECK: renamable $x6 = LI8 1
317    ; CHECK: renamable $x6 = RLDICR killed renamable $x6, 44, 19
318    ; CHECK: BLR8 implicit $lr8, implicit $rm
319    renamable $x6 = LI8 1
320    renamable $x6 = RLDICR killed renamable $x6, 44, 19
321    BLR8 implicit $lr8, implicit $rm
322
323...
324---
325name:            dead_load_immediate_followed_by_a_redundancy
326alignment:       16
327tracksRegLiveness: true
328machineFunctionInfo: {}
329body:             |
330  bb.0.entry:
331    liveins: $x1
332
333    ; CHECK-LABEL: name: dead_load_immediate_followed_by_a_redundancy
334    ; CHECK: liveins: $x1
335    ; CHECK: renamable $r3 = LI 128
336    ; CHECK: renamable $x4 = ADDI8 $x1, -128
337    ; CHECK: renamable $x5 = ADDI8 $x1, -128
338    ; CHECK: STW killed renamable $r3, 16, $x4
339    ; CHECK: BLR8 implicit $lr8, implicit $rm
340    dead renamable $r3 = LI 128
341    renamable $x4 = ADDI8 $x1, -128
342    dead renamable $r3 = LI 128
343    renamable $x5 = ADDI8 $x1, -128
344    renamable $r3 = LI 128
345    STW killed renamable $r3, 16, $x4
346    BLR8 implicit $lr8, implicit $rm
347
348...
349---
350name:            overwrite_reg_before_killed
351alignment:       16
352tracksRegLiveness: true
353machineFunctionInfo: {}
354body:             |
355  bb.0.entry:
356    liveins: $x1
357
358    ; CHECK-LABEL: name: overwrite_reg_before_killed
359    ; CHECK: liveins: $x1
360    ; CHECK: renamable $x3 = LI8 0
361    ; CHECK: STD renamable $x3, 16, $x1
362    ; CHECK: STD killed renamable $x3, 8, $x1
363    ; CHECK: BLR8 implicit $lr8, implicit $rm
364    renamable $x3 = LI8 0
365    STD renamable $x3, 16, $x1
366    renamable $x3 = LI8 0
367    STD killed renamable $x3, 8, $x1
368    BLR8 implicit $lr8, implicit $rm
369
370...
371