1 # RUN: llc -mtriple=riscv64 -run-pass none %s -o - | FileCheck %s
5 source_filename = "foo.ll"
6 target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
7 target triple = "riscv64"
9 define void @foo(i32 %0, ...) {
17 exposesReturnsTwice: false
19 regBankSelected: false
22 tracksRegLiveness: true
24 failsVerification: false
25 tracksDebugUserValues: false
27 - { id: 0, class: gpr, preferred-register: '' }
28 - { id: 1, class: gpr, preferred-register: '' }
29 - { id: 2, class: gpr, preferred-register: '' }
30 - { id: 3, class: gpr, preferred-register: '' }
31 - { id: 4, class: gpr, preferred-register: '' }
32 - { id: 5, class: gpr, preferred-register: '' }
33 - { id: 6, class: gpr, preferred-register: '' }
34 - { id: 7, class: gpr, preferred-register: '' }
36 - { reg: '$x11', virtual-reg: '%1' }
37 - { reg: '$x12', virtual-reg: '%2' }
38 - { reg: '$x13', virtual-reg: '%3' }
39 - { reg: '$x14', virtual-reg: '%4' }
40 - { reg: '$x15', virtual-reg: '%5' }
41 - { reg: '$x16', virtual-reg: '%6' }
42 - { reg: '$x17', virtual-reg: '%7' }
44 isFrameAddressTaken: false
45 isReturnAddressTaken: false
54 maxCallFrameSize: 4294967295
55 cvBytesOfCalleeSavedRegisters: 0
56 hasOpaqueSPAdjustment: false
58 hasMustTailInVarArgFunc: false
64 - { id: 0, type: default, offset: -8, size: 8, alignment: 8, stack-id: default,
65 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
66 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
67 - { id: 1, type: default, offset: -16, size: 8, alignment: 16, stack-id: default,
68 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
69 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
70 - { id: 2, type: default, offset: -24, size: 8, alignment: 8, stack-id: default,
71 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
72 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
73 - { id: 3, type: default, offset: -32, size: 8, alignment: 16, stack-id: default,
74 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
75 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
76 - { id: 4, type: default, offset: -40, size: 8, alignment: 8, stack-id: default,
77 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
78 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
79 - { id: 5, type: default, offset: -48, size: 8, alignment: 16, stack-id: default,
80 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
81 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
82 - { id: 6, type: default, offset: -56, size: 8, alignment: 8, stack-id: default,
83 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
84 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
85 - { id: 7, type: default, offset: -64, size: 8, alignment: 16, stack-id: default,
86 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
87 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
88 - { id: 8, type: default, offset: -56, size: 8, alignment: 8, stack-id: default,
89 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
90 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
93 debugValueSubstitutions: []
100 liveins: $x11, $x12, $x13, $x14, $x15, $x16, $x17
101 ; CHECK-LABEL: name: foo
102 ; CHECK: machineFunctionInfo:
103 ; CHECK-NEXT: varArgsFrameIndex: -1
104 ; CHECK-NEXT: varArgsSaveSize: 64
105 ; CHECK: liveins: $x11, $x12, $x13, $x14, $x15, $x16, $x17
107 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x17
108 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x16
109 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x15
110 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr = COPY $x14
111 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr = COPY $x13
112 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr = COPY $x12
113 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr = COPY $x11
114 ; CHECK-NEXT: SD [[COPY]], %fixed-stack.8, 0 :: (store (s64))
115 ; CHECK-NEXT: SD [[COPY1]], %fixed-stack.7, 0 :: (store (s64) into %fixed-stack.7, align 16)
116 ; CHECK-NEXT: SD [[COPY2]], %fixed-stack.6, 0 :: (store (s64))
117 ; CHECK-NEXT: SD [[COPY3]], %fixed-stack.5, 0 :: (store (s64) into %fixed-stack.5, align 16)
118 ; CHECK-NEXT: SD [[COPY4]], %fixed-stack.4, 0 :: (store (s64))
119 ; CHECK-NEXT: SD [[COPY5]], %fixed-stack.3, 0 :: (store (s64) into %fixed-stack.3, align 16)
120 ; CHECK-NEXT: SD [[COPY6]], %fixed-stack.2, 0 :: (store (s64))
121 ; CHECK-NEXT: PseudoRET
129 SD %7, %fixed-stack.0, 0 :: (store (s64))
130 SD %6, %fixed-stack.1, 0 :: (store (s64) into %fixed-stack.1, align 16)
131 SD %5, %fixed-stack.2, 0 :: (store (s64))
132 SD %4, %fixed-stack.3, 0 :: (store (s64) into %fixed-stack.3, align 16)
133 SD %3, %fixed-stack.4, 0 :: (store (s64))
134 SD %2, %fixed-stack.5, 0 :: (store (s64) into %fixed-stack.5, align 16)
135 SD %1, %fixed-stack.6, 0 :: (store (s64))