|
26 | 26 | ret void
|
27 | 27 | }
|
28 | 28 |
|
29 |
| - declare ptr @g(ptr) |
| 29 | + define ptr @g(ptr) { |
| 30 | + entry: |
| 31 | + br label %if.then |
| 32 | + if.then: |
| 33 | + br label %if.end |
| 34 | + if.end: |
| 35 | + br label %exit |
| 36 | + exit: |
| 37 | + ret ptr null |
| 38 | + } |
30 | 39 |
|
31 | 40 | declare void @llvm.dbg.value(metadata, metadata, metadata) #0
|
32 | 41 |
|
@@ -170,3 +179,126 @@ body: |
|
170 | 179 | RET_ReallyLR
|
171 | 180 |
|
172 | 181 | ...
|
| 182 | +--- |
| 183 | +name: g |
| 184 | +alignment: 4 |
| 185 | +exposesReturnsTwice: false |
| 186 | +legalized: false |
| 187 | +regBankSelected: false |
| 188 | +selected: false |
| 189 | +failedISel: false |
| 190 | +tracksRegLiveness: true |
| 191 | +hasWinCFI: false |
| 192 | +callsEHReturn: false |
| 193 | +callsUnwindInit: false |
| 194 | +hasEHCatchret: false |
| 195 | +hasEHScopes: false |
| 196 | +hasEHFunclets: false |
| 197 | +isOutlined: false |
| 198 | +debugInstrRef: false |
| 199 | +failsVerification: false |
| 200 | +tracksDebugUserValues: false |
| 201 | +registers: |
| 202 | + - { id: 0, class: gpr64all, preferred-register: '' } |
| 203 | + - { id: 1, class: gpr64common, preferred-register: '' } |
| 204 | + - { id: 2, class: gpr32, preferred-register: '' } |
| 205 | + - { id: 3, class: gpr32, preferred-register: '' } |
| 206 | + - { id: 4, class: gpr32, preferred-register: '' } |
| 207 | + - { id: 5, class: gpr64sp, preferred-register: '' } |
| 208 | + - { id: 6, class: gpr64all, preferred-register: '' } |
| 209 | +liveins: |
| 210 | + - { reg: '$x0', virtual-reg: '%1' } |
| 211 | + - { reg: '$w1', virtual-reg: '%2' } |
| 212 | + - { reg: '$w2', virtual-reg: '%3' } |
| 213 | +frameInfo: |
| 214 | + isFrameAddressTaken: false |
| 215 | + isReturnAddressTaken: false |
| 216 | + hasStackMap: false |
| 217 | + hasPatchPoint: false |
| 218 | + stackSize: 0 |
| 219 | + offsetAdjustment: 0 |
| 220 | + maxAlignment: 1 |
| 221 | + adjustsStack: true |
| 222 | + hasCalls: true |
| 223 | + stackProtector: '' |
| 224 | + functionContext: '' |
| 225 | + maxCallFrameSize: 0 |
| 226 | + cvBytesOfCalleeSavedRegisters: 0 |
| 227 | + hasOpaqueSPAdjustment: false |
| 228 | + hasVAStart: false |
| 229 | + hasMustTailInVarArgFunc: false |
| 230 | + hasTailCall: false |
| 231 | + localFrameSize: 0 |
| 232 | + savePoint: '' |
| 233 | + restorePoint: '' |
| 234 | +fixedStack: [] |
| 235 | +stack: [] |
| 236 | +entry_values: [] |
| 237 | +callSites: [] |
| 238 | +debugValueSubstitutions: [] |
| 239 | +constants: [] |
| 240 | +machineFunctionInfo: {} |
| 241 | +body: | |
| 242 | + ; CHECK-LABEL: name: g |
| 243 | + ; CHECK: bb.0.entry: |
| 244 | + ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000) |
| 245 | + ; CHECK-NEXT: liveins: $x0, $w1, $w2 |
| 246 | + ; CHECK-NEXT: {{ $}} |
| 247 | + ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w2 |
| 248 | + ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w1 |
| 249 | + ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY $x0 |
| 250 | + ; CHECK-NEXT: DBG_VALUE_LIST !4, !DIExpression(), [[COPY]], $noreg, debug-location !10 |
| 251 | + ; CHECK-NEXT: TBZW [[COPY1]], 0, %bb.2 |
| 252 | + ; CHECK-NEXT: B %bb.1 |
| 253 | + ; CHECK-NEXT: {{ $}} |
| 254 | + ; CHECK-NEXT: bb.1.if.then: |
| 255 | + ; CHECK-NEXT: successors: %bb.3(0x40000000), %bb.2(0x40000000) |
| 256 | + ; CHECK-NEXT: {{ $}} |
| 257 | + ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32 = COPY [[COPY]] |
| 258 | + ; CHECK-NEXT: DBG_VALUE_LIST !4, !DIExpression(), [[COPY3]], $noreg, debug-location !10 |
| 259 | + ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp |
| 260 | + ; CHECK-NEXT: $x0 = ADDXri [[COPY2]], 8, 0 |
| 261 | + ; CHECK-NEXT: DBG_VALUE_LIST !4, !DIExpression(), [[COPY3]], $x0, debug-location !10 |
| 262 | + ; CHECK-NEXT: BL @g, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp, implicit-def $x0 |
| 263 | + ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp |
| 264 | + ; CHECK-NEXT: TBNZW [[COPY3]], 0, %bb.3 |
| 265 | + ; CHECK-NEXT: B %bb.2 |
| 266 | + ; CHECK-NEXT: {{ $}} |
| 267 | + ; CHECK-NEXT: bb.2.if.end: |
| 268 | + ; CHECK-NEXT: successors: %bb.3(0x80000000) |
| 269 | + ; CHECK-NEXT: {{ $}} |
| 270 | + ; CHECK-NEXT: {{ $}} |
| 271 | + ; CHECK-NEXT: bb.3.exit: |
| 272 | + ; CHECK-NEXT: RET_ReallyLR |
| 273 | + bb.0.entry: |
| 274 | + successors: %bb.1(0x40000000), %bb.2(0x40000000) |
| 275 | + liveins: $x0, $w1, $w2 |
| 276 | +
|
| 277 | + %3:gpr32 = COPY $w2 |
| 278 | + %2:gpr32 = COPY $w1 |
| 279 | + %1:gpr64common = COPY $x0 |
| 280 | + %4:gpr32 = COPY %3 |
| 281 | + %5:gpr64sp = ADDXri %1, 8, 0 |
| 282 | + DBG_VALUE_LIST !4, !DIExpression(), %4:gpr32, %5:gpr64sp, debug-location !10 |
| 283 | + %0:gpr64all = COPY %5 |
| 284 | + TBZW %2, 0, %bb.2 |
| 285 | + B %bb.1 |
| 286 | +
|
| 287 | + bb.1.if.then: |
| 288 | + successors: %bb.3(0x40000000), %bb.2(0x40000000) |
| 289 | +
|
| 290 | + ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp |
| 291 | + $x0 = COPY %0 |
| 292 | + BL @g, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp, implicit-def $x0 |
| 293 | + ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp |
| 294 | + TBNZW %4, 0, %bb.3 |
| 295 | + B %bb.2 |
| 296 | +
|
| 297 | + bb.2.if.end: |
| 298 | + successors: %bb.3(0x80000000) |
| 299 | +
|
| 300 | +
|
| 301 | + bb.3.exit: |
| 302 | + RET_ReallyLR |
| 303 | +
|
| 304 | +... |
0 commit comments