File: make-compressible-zilsd.mir

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,245,064 kB
  • sloc: cpp: 7,619,731; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,676; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (354 lines) | stat: -rw-r--r-- 14,428 bytes parent folder | download | duplicates (3)
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
351
352
353
354
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
# RUN: llc -o - %s -mtriple=riscv32 -mattr=+zilsd,+zclsd,+zdinx -simplify-mir \
# RUN:   -run-pass=riscv-make-compressible | FileCheck --check-prefixes=RV32 %s
--- |
  define void @store_common_value_double(ptr %a, ptr %b, ptr %c, i32 %d, double %e, double %f) #0 {
  entry:
    store double %f, ptr %a, align 8
    store double %f, ptr %b, align 8
    store double %f, ptr %c, align 8
    ret void
  }

  define void @store_common_value_double_zero(ptr %a, ptr %b, ptr %c) #0 {
  entry:
    store double 0.0, ptr %a, align 8
    store double 0.0, ptr %b, align 8
    store double 0.0, ptr %c, align 8
    ret void
  }

  define void @store_common_ptr_double(double %a, double %b, double %d, ptr %p) #0 {
  entry:
    store volatile double %a, ptr %p, align 8
    store volatile double %b, ptr %p, align 8
    store volatile double %b, ptr %p, align 8
    ret void
  }

  define void @load_common_ptr_double(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, ptr %g) #0 {
  entry:
    %0 = load double, ptr %g, align 8
    %arrayidx1 = getelementptr inbounds { double, double, i32 }, ptr %g, i32 0, i32 1
    %1 = load double, ptr %arrayidx1, align 8
    %arrayidx2 = getelementptr inbounds { double, double, i32 }, ptr %g, i32 0, i32 2
    %2 = load i32, ptr %arrayidx2, align 8
    tail call void @load_common_ptr_double_1(double %0, double %1, i32 %2)
    ret void
  }

  declare void @load_common_ptr_double_1(double, double, double) #0

  define void @store_large_offset_double(ptr %p, i32 %dummy, double %a, double %b, double %c) #0 {
  entry:
    %0 = getelementptr inbounds double, ptr %p, i32 100
    store volatile double %a, ptr %0, align 8
    %1 = getelementptr inbounds double, ptr %p, i32 101
    store volatile double %b, ptr %1, align 8
    %2 = getelementptr inbounds double, ptr %p, i32 102
    store volatile double %b, ptr %2, align 8
    ret void
  }

  define void @load_large_offset_double(i32 %a, i32 %b, i32 %c, i32 %d, ptr %p) #0 {
  entry:
    %arrayidx = getelementptr inbounds { [102 x double], i32 }, ptr %p, i32 0, i32 0, i32 100
    %0 = load double, ptr %arrayidx, align 8
    %arrayidx1 = getelementptr inbounds { [102 x double], i32 }, ptr %p, i32 0, i32 0, i32 101
    %1 = load double, ptr %arrayidx1, align 8
    %arrayidx2 = getelementptr inbounds { [102 x double], i32 }, ptr %p, i32 0, i32 1
    %2 = load i32, ptr %arrayidx2, align 8
    tail call void @load_large_offset_double_1(double %0, double %1, i32 %2)
    ret void
  }

  declare void @load_large_offset_double_1(double, double) #0

  define void @store_common_value_double_no_opt(ptr %a, i32 %b, double %c, double %d, double %e) #0 {
  entry:
    store double %e, ptr %a, align 8
    ret void
  }

  define void @store_common_value_double_no_opt2(ptr %a, i32 %b, double %c, double %d, double %e) #0 {
  entry:
    store volatile double %e, ptr %a, align 8
    store volatile double %e, ptr %a, align 8
    ret void
  }

  define void @store_common_ptr_double_no_opt(double %a, i32 %b, i32 %c, i32 %d, i32 %e, ptr %p) #0 {
  entry:
    store volatile double %a, ptr %p, align 8
    ret void
  }

  define double @load_common_ptr_double_no_opt(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f, ptr %g) #0 {
  entry:
    %0 = load double, ptr %g, align 8
    ret double %0
  }

  define void @store_large_offset_double_no_opt(ptr %p, double %a, double %b) #0 {
  entry:
    %0 = getelementptr inbounds double, ptr %p, i32 100
    store volatile double %a, ptr %0, align 8
    %1 = getelementptr inbounds double, ptr %p, i32 101
    store volatile double %b, ptr %1, align 8
    ret void
  }

  define { double, double } @load_large_offset_double_no_opt(ptr %p) #0 {
  entry:
    %arrayidx = getelementptr inbounds double, ptr %p, i32 100
    %0 = load double, ptr %arrayidx, align 8
    %arrayidx1 = getelementptr inbounds double, ptr %p, i32 101
    %1 = load double, ptr %arrayidx1, align 8
    %2 = insertvalue { double, double } undef, double %0, 0
    %3 = insertvalue { double, double } %2, double %1, 1
    ret { double, double } %3
  }

  attributes #0 = { minsize "target-features"="+zilsd,+zdinx" }
...
---
name:            store_common_value_double
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11, $x12, $x16, $x17

    ; RV32-LABEL: name: store_common_value_double
    ; RV32: liveins: $x10, $x11, $x12, $x16, $x17
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x14 = ADDI $x16, 0
    ; RV32-NEXT: $x15 = ADDI $x17, 0
    ; RV32-NEXT: SD_RV32 $x14_x15, killed renamable $x10, 0 :: (store (s64) into %ir.a)
    ; RV32-NEXT: SD_RV32 $x14_x15, killed renamable $x11, 0 :: (store (s64) into %ir.b)
    ; RV32-NEXT: SD_RV32 killed $x14_x15, killed renamable $x12, 0 :: (store (s64) into %ir.c)
    ; RV32-NEXT: PseudoRET
    SD_RV32 renamable $x16_x17, killed renamable $x10, 0 :: (store (s64) into %ir.a)
    SD_RV32 renamable $x16_x17, killed renamable $x11, 0 :: (store (s64) into %ir.b)
    SD_RV32 killed renamable $x16_x17, killed renamable $x12, 0 :: (store (s64) into %ir.c)
    PseudoRET

...
---
name:            store_common_value_double_zero
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11, $x12

    ; RV32-LABEL: name: store_common_value_double_zero
    ; RV32: liveins: $x10, $x11, $x12
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x14 = ADDI $x0, 0
    ; RV32-NEXT: $x15 = ADDI $x0, 0
    ; RV32-NEXT: SD_RV32 $x14_x15, killed renamable $x10, 0 :: (store (s64) into %ir.a)
    ; RV32-NEXT: SD_RV32 $x14_x15, killed renamable $x11, 0 :: (store (s64) into %ir.b)
    ; RV32-NEXT: SD_RV32 $x14_x15, killed renamable $x12, 0 :: (store (s64) into %ir.c)
    ; RV32-NEXT: PseudoRET
    SD_RV32 $x0_pair, killed renamable $x10, 0 :: (store (s64) into %ir.a)
    SD_RV32 $x0_pair, killed renamable $x11, 0 :: (store (s64) into %ir.b)
    SD_RV32 $x0_pair, killed renamable $x12, 0 :: (store (s64) into %ir.c)
    PseudoRET

...
---
name:            store_common_ptr_double
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16

    ; RV32-LABEL: name: store_common_ptr_double
    ; RV32: liveins: $x10, $x11, $x12, $x13, $x14, $x15, $x16
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x14 = ADDI $x16, 0
    ; RV32-NEXT: SD_RV32 killed renamable $x10_x11, $x14, 0 :: (volatile store (s64) into %ir.p)
    ; RV32-NEXT: SD_RV32 renamable $x12_x13, $x14, 0 :: (volatile store (s64) into %ir.p)
    ; RV32-NEXT: SD_RV32 killed renamable $x12_x13, killed $x14, 0 :: (volatile store (s64) into %ir.p)
    ; RV32-NEXT: PseudoRET
    SD_RV32 killed renamable $x10_x11, renamable $x16, 0 :: (volatile store (s64) into %ir.p)
    SD_RV32 renamable $x12_x13, renamable $x16, 0 :: (volatile store (s64) into %ir.p)
    SD_RV32 killed renamable $x12_x13, killed renamable $x16, 0 :: (volatile store (s64) into %ir.p)
    PseudoRET

...
---
name:            load_common_ptr_double
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x16

    ; RV32-LABEL: name: load_common_ptr_double
    ; RV32: liveins: $x16
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x15 = ADDI $x16, 0
    ; RV32-NEXT: renamable $x10_x11 = LD_RV32 $x15, 0 :: (load (s64) from %ir.g)
    ; RV32-NEXT: renamable $x12_x13 = LD_RV32 $x15, 8 :: (load (s64) from %ir.arrayidx1)
    ; RV32-NEXT: renamable $x14 = LW killed $x15, 16 :: (load (s32) from %ir.arrayidx2, align 8)
    ; RV32-NEXT: PseudoTAIL target-flags(riscv-call) @load_common_ptr_double_1, csr_ilp32_lp64, implicit $x2, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit $x14
    renamable $x10_x11 = LD_RV32 renamable $x16, 0 :: (load (s64) from %ir.g)
    renamable $x12_x13 = LD_RV32 renamable $x16, 8 :: (load (s64) from %ir.arrayidx1)
    renamable $x14 = LW killed renamable $x16, 16 :: (load (s32) from %ir.arrayidx2, align 8)
    PseudoTAIL target-flags(riscv-call) @load_common_ptr_double_1, csr_ilp32_lp64, implicit $x2, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit $x14

...
---
name:            store_large_offset_double
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x12, $x13, $x14, $x15

    ; RV32-LABEL: name: store_large_offset_double
    ; RV32: liveins: $x10, $x12, $x13, $x14, $x15
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x11 = ADDI $x10, 768
    ; RV32-NEXT: SD_RV32 killed renamable $x12_x13, $x11, 32 :: (volatile store (s64) into %ir.0)
    ; RV32-NEXT: SD_RV32 renamable $x14_x15, $x11, 40 :: (volatile store (s64) into %ir.1)
    ; RV32-NEXT: SD_RV32 killed renamable $x14_x15, killed $x11, 48 :: (volatile store (s64) into %ir.2)
    ; RV32-NEXT: PseudoRET
    SD_RV32 killed renamable $x12_x13, renamable $x10, 800 :: (volatile store (s64) into %ir.0)
    SD_RV32 renamable $x14_x15, renamable $x10, 808 :: (volatile store (s64) into %ir.1)
    SD_RV32 killed renamable $x14_x15, killed renamable $x10, 816 :: (volatile store (s64) into %ir.2)
    PseudoRET

...
---
name:            load_large_offset_double
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x14

    ; RV32-LABEL: name: load_large_offset_double
    ; RV32: liveins: $x14
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x15 = ADDI $x14, 768
    ; RV32-NEXT: renamable $x10_x11 = LD_RV32 $x15, 32 :: (load (s64) from %ir.arrayidx)
    ; RV32-NEXT: renamable $x12_x13 = LD_RV32 $x15, 40 :: (load (s64) from %ir.arrayidx1)
    ; RV32-NEXT: renamable $x14 = LW killed $x15, 48 :: (load (s32) from %ir.arrayidx2, align 8)
    ; RV32-NEXT: PseudoTAIL target-flags(riscv-call) @load_large_offset_double_1, csr_ilp32_lp64, implicit $x2, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit $x14
    renamable $x10_x11 = LD_RV32 renamable $x14, 800 :: (load (s64) from %ir.arrayidx)
    renamable $x12_x13 = LD_RV32 renamable $x14, 808 :: (load (s64) from %ir.arrayidx1)
    renamable $x14 = LW killed renamable $x14, 816 :: (load (s32) from %ir.arrayidx2, align 8)
    PseudoTAIL target-flags(riscv-call) @load_large_offset_double_1, csr_ilp32_lp64, implicit $x2, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit $x14
...
---
name:            store_common_value_double_no_opt
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x16, $x17

    ; RV32-LABEL: name: store_common_value_double_no_opt
    ; RV32: liveins: $x10, $x16, $x17
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: SD_RV32 killed renamable $x16_x17, killed renamable $x10, 0 :: (store (s64) into %ir.a)
    ; RV32-NEXT: PseudoRET
    SD_RV32 killed renamable $x16_x17, killed renamable $x10, 0 :: (store (s64) into %ir.a)
    PseudoRET

...
---
name:            store_common_value_double_no_opt2
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x16, $x17

    ; RV32-LABEL: name: store_common_value_double_no_opt2
    ; RV32: liveins: $x10, $x16, $x17
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: SD_RV32 renamable $x16_x17, renamable $x10, 0 :: (volatile store (s64) into %ir.a)
    ; RV32-NEXT: SD_RV32 killed renamable $x16_x17, killed renamable $x10, 0 :: (volatile store (s64) into %ir.a)
    ; RV32-NEXT: PseudoRET
    SD_RV32 renamable $x16_x17, renamable $x10, 0 :: (volatile store (s64) into %ir.a)
    SD_RV32 killed renamable $x16_x17, killed renamable $x10, 0 :: (volatile store (s64) into %ir.a)
    PseudoRET

...
---
name:            store_common_ptr_double_no_opt
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11, $x16

    ; RV32-LABEL: name: store_common_ptr_double_no_opt
    ; RV32: liveins: $x10, $x11, $x16
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: SD_RV32 killed renamable $x10_x11, killed renamable $x16, 0 :: (volatile store (s64) into %ir.p)
    ; RV32-NEXT: PseudoRET
    SD_RV32 killed renamable $x10_x11, killed renamable $x16, 0 :: (volatile store (s64) into %ir.p)
    PseudoRET

...
---
name:            load_common_ptr_double_no_opt
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x16

    ; RV32-LABEL: name: load_common_ptr_double_no_opt
    ; RV32: liveins: $x16
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: renamable $x10_x11 = LD_RV32 killed renamable $x16, 0 :: (load (s64) from %ir.g)
    ; RV32-NEXT: PseudoRET implicit $x10, implicit $x11
    renamable $x10_x11 = LD_RV32 killed renamable $x16, 0 :: (load (s64) from %ir.g)
    PseudoRET implicit $x10, implicit $x11

...
---
name:            store_large_offset_double_no_opt
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10, $x11, $x12, $x13, $x14

    ; RV32-LABEL: name: store_large_offset_double_no_opt
    ; RV32: liveins: $x10, $x11, $x12, $x13, $x14
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: $x15 = ADDI $x14, 0
    ; RV32-NEXT: $x17 = ADDI $x12, 0
    ; RV32-NEXT: $x16 = ADDI $x11, 0
    ; RV32-NEXT: SD_RV32 killed renamable $x16_x17, renamable $x10, 800 :: (volatile store (s64) into %ir.0)
    ; RV32-NEXT: $x14 = ADDI $x13, 0
    ; RV32-NEXT: SD_RV32 killed renamable $x14_x15, killed renamable $x10, 808 :: (volatile store (s64) into %ir.1)
    ; RV32-NEXT: PseudoRET
    $x15 = ADDI $x14, 0
    $x17 = ADDI $x12, 0
    $x16 = ADDI $x11, 0
    SD_RV32 killed renamable $x16_x17, renamable $x10, 800 :: (volatile store (s64) into %ir.0)
    $x14 = ADDI $x13, 0
    SD_RV32 killed renamable $x14_x15, killed renamable $x10, 808 :: (volatile store (s64) into %ir.1)
    PseudoRET

...
---
name:            load_large_offset_double_no_opt
tracksRegLiveness: true
body:             |
  bb.0.entry:
    liveins: $x10

    ; RV32-LABEL: name: load_large_offset_double_no_opt
    ; RV32: liveins: $x10
    ; RV32-NEXT: {{  $}}
    ; RV32-NEXT: renamable $x14_x15 = LD_RV32 renamable $x10, 800 :: (load (s64) from %ir.arrayidx)
    ; RV32-NEXT: renamable $x12_x13 = LD_RV32 killed renamable $x10, 808 :: (load (s64) from %ir.arrayidx1)
    ; RV32-NEXT: $x10 = ADDI renamable $x14, 0
    ; RV32-NEXT: $x11 = ADDI killed renamable $x15, 0
    ; RV32-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12, implicit $x13
    renamable $x14_x15 = LD_RV32 renamable $x10, 800 :: (load (s64) from %ir.arrayidx)
    renamable $x12_x13 = LD_RV32 killed renamable $x10, 808 :: (load (s64) from %ir.arrayidx1)
    $x10 = ADDI renamable $x14, 0
    $x11 = ADDI killed renamable $x15, 0
    PseudoRET implicit $x10, implicit $x11, implicit $x12, implicit $x13

...