Debian Codegraph @

llvm/test/tools/llvm-reduce/mir/preserve-machine-function-info-riscv.mir

raw
1 # REQUIRES: riscv-registered-target
2 # RUN: llvm-reduce -abort-on-invalid-reduction -simplify-mir --delta-passes=instructions -mtriple=riscv64-- --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
3 # RUN: FileCheck --check-prefix=RESULT %s < %t
4
5 # CHECK-INTERESTINGNESS: ADDW
6
7 # RESULT: name: func
8 # RESULT: stack:
9 # RESULT-NEXT: - { id: 0, offset: 16, size: 16, alignment: 8 }
10
11 # RESULT: machineFunctionInfo:
12 # RESULT-NEXT: varArgsFrameIndex: 4
13 # RESULT-NEXT: varArgsSaveSize: 12
14
15 # RESULT: $x10 = ADDW %stack.0, renamable $x10
16 --- |
17 define i32 @func(i32 %arg) {
18 ret i32 undef
19 }
20
21 ...
22
23 # Note the frame index value changes during printing/parsing, not the
24 # clone.
25 ---
26 name: func
27 tracksRegLiveness: true
28 machineFunctionInfo:
29 varArgsFrameIndex: 4
30 varArgsSaveSize: 12
31 stack:
32 - { id: 4, offset: 16, size: 16, alignment: 8 }
33
34 body: |
35 bb.0:
36 liveins: $x10
37
38 renamable $x10 = ADDW %stack.4, renamable $x10
39 renamable $x10 = ADDIW killed renamable $x10, -4
40 PseudoRET implicit $x10
41
42 ...