1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
|
; Test spills of zero extensions when high GR32s are available.
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
; Test a case where we spill the source of at least one LLCRMux. We want
; to use LLC(H) if possible.
define void @f1(i32 *%ptr) {
; CHECK-LABEL: f1:
; CHECK: llc{{h?}} {{%r[0-9]+}}, 16{{[37]}}(%r15)
; CHECK: br %r14
%val0 = load volatile i32 *%ptr
%val1 = load volatile i32 *%ptr
%val2 = load volatile i32 *%ptr
%val3 = load volatile i32 *%ptr
%val4 = load volatile i32 *%ptr
%val5 = load volatile i32 *%ptr
%val6 = load volatile i32 *%ptr
%val7 = load volatile i32 *%ptr
%val8 = load volatile i32 *%ptr
%val9 = load volatile i32 *%ptr
%val10 = load volatile i32 *%ptr
%val11 = load volatile i32 *%ptr
%val12 = load volatile i32 *%ptr
%val13 = load volatile i32 *%ptr
%val14 = load volatile i32 *%ptr
%val15 = load volatile i32 *%ptr
%val16 = load volatile i32 *%ptr
%val17 = load volatile i32 *%ptr
%val18 = load volatile i32 *%ptr
%val19 = load volatile i32 *%ptr
%val20 = load volatile i32 *%ptr
%val21 = load volatile i32 *%ptr
%val22 = load volatile i32 *%ptr
%val23 = load volatile i32 *%ptr
%val24 = load volatile i32 *%ptr
%val25 = load volatile i32 *%ptr
%val26 = load volatile i32 *%ptr
%val27 = load volatile i32 *%ptr
%val28 = load volatile i32 *%ptr
%val29 = load volatile i32 *%ptr
%val30 = load volatile i32 *%ptr
%val31 = load volatile i32 *%ptr
%trunc0 = trunc i32 %val0 to i8
%trunc1 = trunc i32 %val1 to i8
%trunc2 = trunc i32 %val2 to i8
%trunc3 = trunc i32 %val3 to i8
%trunc4 = trunc i32 %val4 to i8
%trunc5 = trunc i32 %val5 to i8
%trunc6 = trunc i32 %val6 to i8
%trunc7 = trunc i32 %val7 to i8
%trunc8 = trunc i32 %val8 to i8
%trunc9 = trunc i32 %val9 to i8
%trunc10 = trunc i32 %val10 to i8
%trunc11 = trunc i32 %val11 to i8
%trunc12 = trunc i32 %val12 to i8
%trunc13 = trunc i32 %val13 to i8
%trunc14 = trunc i32 %val14 to i8
%trunc15 = trunc i32 %val15 to i8
%trunc16 = trunc i32 %val16 to i8
%trunc17 = trunc i32 %val17 to i8
%trunc18 = trunc i32 %val18 to i8
%trunc19 = trunc i32 %val19 to i8
%trunc20 = trunc i32 %val20 to i8
%trunc21 = trunc i32 %val21 to i8
%trunc22 = trunc i32 %val22 to i8
%trunc23 = trunc i32 %val23 to i8
%trunc24 = trunc i32 %val24 to i8
%trunc25 = trunc i32 %val25 to i8
%trunc26 = trunc i32 %val26 to i8
%trunc27 = trunc i32 %val27 to i8
%trunc28 = trunc i32 %val28 to i8
%trunc29 = trunc i32 %val29 to i8
%trunc30 = trunc i32 %val30 to i8
%trunc31 = trunc i32 %val31 to i8
%ext0 = zext i8 %trunc0 to i32
%ext1 = zext i8 %trunc1 to i32
%ext2 = zext i8 %trunc2 to i32
%ext3 = zext i8 %trunc3 to i32
%ext4 = zext i8 %trunc4 to i32
%ext5 = zext i8 %trunc5 to i32
%ext6 = zext i8 %trunc6 to i32
%ext7 = zext i8 %trunc7 to i32
%ext8 = zext i8 %trunc8 to i32
%ext9 = zext i8 %trunc9 to i32
%ext10 = zext i8 %trunc10 to i32
%ext11 = zext i8 %trunc11 to i32
%ext12 = zext i8 %trunc12 to i32
%ext13 = zext i8 %trunc13 to i32
%ext14 = zext i8 %trunc14 to i32
%ext15 = zext i8 %trunc15 to i32
%ext16 = zext i8 %trunc16 to i32
%ext17 = zext i8 %trunc17 to i32
%ext18 = zext i8 %trunc18 to i32
%ext19 = zext i8 %trunc19 to i32
%ext20 = zext i8 %trunc20 to i32
%ext21 = zext i8 %trunc21 to i32
%ext22 = zext i8 %trunc22 to i32
%ext23 = zext i8 %trunc23 to i32
%ext24 = zext i8 %trunc24 to i32
%ext25 = zext i8 %trunc25 to i32
%ext26 = zext i8 %trunc26 to i32
%ext27 = zext i8 %trunc27 to i32
%ext28 = zext i8 %trunc28 to i32
%ext29 = zext i8 %trunc29 to i32
%ext30 = zext i8 %trunc30 to i32
%ext31 = zext i8 %trunc31 to i32
store volatile i32 %val0, i32 *%ptr
store volatile i32 %val1, i32 *%ptr
store volatile i32 %val2, i32 *%ptr
store volatile i32 %val3, i32 *%ptr
store volatile i32 %val4, i32 *%ptr
store volatile i32 %val5, i32 *%ptr
store volatile i32 %val6, i32 *%ptr
store volatile i32 %val7, i32 *%ptr
store volatile i32 %val8, i32 *%ptr
store volatile i32 %val9, i32 *%ptr
store volatile i32 %val10, i32 *%ptr
store volatile i32 %val11, i32 *%ptr
store volatile i32 %val12, i32 *%ptr
store volatile i32 %val13, i32 *%ptr
store volatile i32 %val14, i32 *%ptr
store volatile i32 %val15, i32 *%ptr
store volatile i32 %val16, i32 *%ptr
store volatile i32 %val17, i32 *%ptr
store volatile i32 %val18, i32 *%ptr
store volatile i32 %val19, i32 *%ptr
store volatile i32 %val20, i32 *%ptr
store volatile i32 %val21, i32 *%ptr
store volatile i32 %val22, i32 *%ptr
store volatile i32 %val23, i32 *%ptr
store volatile i32 %val24, i32 *%ptr
store volatile i32 %val25, i32 *%ptr
store volatile i32 %val26, i32 *%ptr
store volatile i32 %val27, i32 *%ptr
store volatile i32 %val28, i32 *%ptr
store volatile i32 %val29, i32 *%ptr
store volatile i32 %val30, i32 *%ptr
store volatile i32 %val31, i32 *%ptr
store volatile i32 %ext0, i32 *%ptr
store volatile i32 %ext1, i32 *%ptr
store volatile i32 %ext2, i32 *%ptr
store volatile i32 %ext3, i32 *%ptr
store volatile i32 %ext4, i32 *%ptr
store volatile i32 %ext5, i32 *%ptr
store volatile i32 %ext6, i32 *%ptr
store volatile i32 %ext7, i32 *%ptr
store volatile i32 %ext8, i32 *%ptr
store volatile i32 %ext9, i32 *%ptr
store volatile i32 %ext10, i32 *%ptr
store volatile i32 %ext11, i32 *%ptr
store volatile i32 %ext12, i32 *%ptr
store volatile i32 %ext13, i32 *%ptr
store volatile i32 %ext14, i32 *%ptr
store volatile i32 %ext15, i32 *%ptr
store volatile i32 %ext16, i32 *%ptr
store volatile i32 %ext17, i32 *%ptr
store volatile i32 %ext18, i32 *%ptr
store volatile i32 %ext19, i32 *%ptr
store volatile i32 %ext20, i32 *%ptr
store volatile i32 %ext21, i32 *%ptr
store volatile i32 %ext22, i32 *%ptr
store volatile i32 %ext23, i32 *%ptr
store volatile i32 %ext24, i32 *%ptr
store volatile i32 %ext25, i32 *%ptr
store volatile i32 %ext26, i32 *%ptr
store volatile i32 %ext27, i32 *%ptr
store volatile i32 %ext28, i32 *%ptr
store volatile i32 %ext29, i32 *%ptr
store volatile i32 %ext30, i32 *%ptr
store volatile i32 %ext31, i32 *%ptr
ret void
}
; Same again with i16, which should use LLH(H).
define void @f2(i32 *%ptr) {
; CHECK-LABEL: f2:
; CHECK: llh{{h?}} {{%r[0-9]+}}, 16{{[26]}}(%r15)
; CHECK: br %r14
%val0 = load volatile i32 *%ptr
%val1 = load volatile i32 *%ptr
%val2 = load volatile i32 *%ptr
%val3 = load volatile i32 *%ptr
%val4 = load volatile i32 *%ptr
%val5 = load volatile i32 *%ptr
%val6 = load volatile i32 *%ptr
%val7 = load volatile i32 *%ptr
%val8 = load volatile i32 *%ptr
%val9 = load volatile i32 *%ptr
%val10 = load volatile i32 *%ptr
%val11 = load volatile i32 *%ptr
%val12 = load volatile i32 *%ptr
%val13 = load volatile i32 *%ptr
%val14 = load volatile i32 *%ptr
%val15 = load volatile i32 *%ptr
%val16 = load volatile i32 *%ptr
%val17 = load volatile i32 *%ptr
%val18 = load volatile i32 *%ptr
%val19 = load volatile i32 *%ptr
%val20 = load volatile i32 *%ptr
%val21 = load volatile i32 *%ptr
%val22 = load volatile i32 *%ptr
%val23 = load volatile i32 *%ptr
%val24 = load volatile i32 *%ptr
%val25 = load volatile i32 *%ptr
%val26 = load volatile i32 *%ptr
%val27 = load volatile i32 *%ptr
%val28 = load volatile i32 *%ptr
%val29 = load volatile i32 *%ptr
%val30 = load volatile i32 *%ptr
%val31 = load volatile i32 *%ptr
%trunc0 = trunc i32 %val0 to i16
%trunc1 = trunc i32 %val1 to i16
%trunc2 = trunc i32 %val2 to i16
%trunc3 = trunc i32 %val3 to i16
%trunc4 = trunc i32 %val4 to i16
%trunc5 = trunc i32 %val5 to i16
%trunc6 = trunc i32 %val6 to i16
%trunc7 = trunc i32 %val7 to i16
%trunc8 = trunc i32 %val8 to i16
%trunc9 = trunc i32 %val9 to i16
%trunc10 = trunc i32 %val10 to i16
%trunc11 = trunc i32 %val11 to i16
%trunc12 = trunc i32 %val12 to i16
%trunc13 = trunc i32 %val13 to i16
%trunc14 = trunc i32 %val14 to i16
%trunc15 = trunc i32 %val15 to i16
%trunc16 = trunc i32 %val16 to i16
%trunc17 = trunc i32 %val17 to i16
%trunc18 = trunc i32 %val18 to i16
%trunc19 = trunc i32 %val19 to i16
%trunc20 = trunc i32 %val20 to i16
%trunc21 = trunc i32 %val21 to i16
%trunc22 = trunc i32 %val22 to i16
%trunc23 = trunc i32 %val23 to i16
%trunc24 = trunc i32 %val24 to i16
%trunc25 = trunc i32 %val25 to i16
%trunc26 = trunc i32 %val26 to i16
%trunc27 = trunc i32 %val27 to i16
%trunc28 = trunc i32 %val28 to i16
%trunc29 = trunc i32 %val29 to i16
%trunc30 = trunc i32 %val30 to i16
%trunc31 = trunc i32 %val31 to i16
%ext0 = zext i16 %trunc0 to i32
%ext1 = zext i16 %trunc1 to i32
%ext2 = zext i16 %trunc2 to i32
%ext3 = zext i16 %trunc3 to i32
%ext4 = zext i16 %trunc4 to i32
%ext5 = zext i16 %trunc5 to i32
%ext6 = zext i16 %trunc6 to i32
%ext7 = zext i16 %trunc7 to i32
%ext8 = zext i16 %trunc8 to i32
%ext9 = zext i16 %trunc9 to i32
%ext10 = zext i16 %trunc10 to i32
%ext11 = zext i16 %trunc11 to i32
%ext12 = zext i16 %trunc12 to i32
%ext13 = zext i16 %trunc13 to i32
%ext14 = zext i16 %trunc14 to i32
%ext15 = zext i16 %trunc15 to i32
%ext16 = zext i16 %trunc16 to i32
%ext17 = zext i16 %trunc17 to i32
%ext18 = zext i16 %trunc18 to i32
%ext19 = zext i16 %trunc19 to i32
%ext20 = zext i16 %trunc20 to i32
%ext21 = zext i16 %trunc21 to i32
%ext22 = zext i16 %trunc22 to i32
%ext23 = zext i16 %trunc23 to i32
%ext24 = zext i16 %trunc24 to i32
%ext25 = zext i16 %trunc25 to i32
%ext26 = zext i16 %trunc26 to i32
%ext27 = zext i16 %trunc27 to i32
%ext28 = zext i16 %trunc28 to i32
%ext29 = zext i16 %trunc29 to i32
%ext30 = zext i16 %trunc30 to i32
%ext31 = zext i16 %trunc31 to i32
store volatile i32 %val0, i32 *%ptr
store volatile i32 %val1, i32 *%ptr
store volatile i32 %val2, i32 *%ptr
store volatile i32 %val3, i32 *%ptr
store volatile i32 %val4, i32 *%ptr
store volatile i32 %val5, i32 *%ptr
store volatile i32 %val6, i32 *%ptr
store volatile i32 %val7, i32 *%ptr
store volatile i32 %val8, i32 *%ptr
store volatile i32 %val9, i32 *%ptr
store volatile i32 %val10, i32 *%ptr
store volatile i32 %val11, i32 *%ptr
store volatile i32 %val12, i32 *%ptr
store volatile i32 %val13, i32 *%ptr
store volatile i32 %val14, i32 *%ptr
store volatile i32 %val15, i32 *%ptr
store volatile i32 %val16, i32 *%ptr
store volatile i32 %val17, i32 *%ptr
store volatile i32 %val18, i32 *%ptr
store volatile i32 %val19, i32 *%ptr
store volatile i32 %val20, i32 *%ptr
store volatile i32 %val21, i32 *%ptr
store volatile i32 %val22, i32 *%ptr
store volatile i32 %val23, i32 *%ptr
store volatile i32 %val24, i32 *%ptr
store volatile i32 %val25, i32 *%ptr
store volatile i32 %val26, i32 *%ptr
store volatile i32 %val27, i32 *%ptr
store volatile i32 %val28, i32 *%ptr
store volatile i32 %val29, i32 *%ptr
store volatile i32 %val30, i32 *%ptr
store volatile i32 %val31, i32 *%ptr
store volatile i32 %ext0, i32 *%ptr
store volatile i32 %ext1, i32 *%ptr
store volatile i32 %ext2, i32 *%ptr
store volatile i32 %ext3, i32 *%ptr
store volatile i32 %ext4, i32 *%ptr
store volatile i32 %ext5, i32 *%ptr
store volatile i32 %ext6, i32 *%ptr
store volatile i32 %ext7, i32 *%ptr
store volatile i32 %ext8, i32 *%ptr
store volatile i32 %ext9, i32 *%ptr
store volatile i32 %ext10, i32 *%ptr
store volatile i32 %ext11, i32 *%ptr
store volatile i32 %ext12, i32 *%ptr
store volatile i32 %ext13, i32 *%ptr
store volatile i32 %ext14, i32 *%ptr
store volatile i32 %ext15, i32 *%ptr
store volatile i32 %ext16, i32 *%ptr
store volatile i32 %ext17, i32 *%ptr
store volatile i32 %ext18, i32 *%ptr
store volatile i32 %ext19, i32 *%ptr
store volatile i32 %ext20, i32 *%ptr
store volatile i32 %ext21, i32 *%ptr
store volatile i32 %ext22, i32 *%ptr
store volatile i32 %ext23, i32 *%ptr
store volatile i32 %ext24, i32 *%ptr
store volatile i32 %ext25, i32 *%ptr
store volatile i32 %ext26, i32 *%ptr
store volatile i32 %ext27, i32 *%ptr
store volatile i32 %ext28, i32 *%ptr
store volatile i32 %ext29, i32 *%ptr
store volatile i32 %ext30, i32 *%ptr
store volatile i32 %ext31, i32 *%ptr
ret void
}
|