zhijian lin 2cd32132db
[PowerPC] Utilize getReservedRegs to find asm clobberable registers. (#107863)
This patch utilizes getReservedRegs() to find asm clobberable registers.
And to make the result of getReservedRegs() accurate, this patch
implements the todo, which is to make r2 allocatable on AIX for some
leaf functions.
2024-11-04 12:57:26 -05:00

39 lines
1.3 KiB
YAML

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple powerpc64-unknown-aix-xcoff -x mir \
# RUN: -stop-after=prologepilog --verify-machineinstrs < %s | \
# RUN: FileCheck %s --check-prefixes=CHECK
---
name: test_callee
frameInfo:
hasCalls: true
tracksRegLiveness: true
body: |
bb.0:
; CHECK-LABEL: name: test_callee
; CHECK: $x3 = LI8 10
; CHECK-NEXT: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
$x3 = LI8 10
BLR8 implicit $lr8, implicit $rm, implicit killed $x3
...
---
name: test
tracksRegLiveness: true
stack:
- { id: 0, size: 32704, alignment: 8 }
body: |
bb.0:
; CHECK-LABEL: name: test
; CHECK: $x0 = MFLR8 implicit $lr8
; CHECK-NEXT: STD killed $x0, 16, $x1
; CHECK-NEXT: $x1 = STDU $x1, -32752, $x1
; CHECK-NEXT: BL8 @test_callee, csr_ppc64_r2, implicit-def dead $lr8, implicit $rm, implicit-def $r1, implicit-def $x3
; CHECK-NEXT: $x1 = ADDI8 $x1, 32752
; CHECK-NEXT: $x0 = LD 16, $x1
; CHECK-NEXT: MTLR8 $x0, implicit-def $lr8
; CHECK-NEXT: BLR8 implicit $lr8, implicit $rm, implicit killed $x3
BL8 @test_callee, csr_ppc64_r2, implicit-def dead $lr8, implicit $rm, implicit-def $r1, implicit-def $x3
BLR8 implicit $lr8, implicit $rm, implicit $x3
...