llvm/llvm/test/CodeGen/RISCV/stack-inst-compress.mir

# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
# RUN: llc -mtriple=riscv32  -x mir -run-pass=prologepilog  -verify-machineinstrs < %s \
# RUN: | FileCheck -check-prefixes=CHECK-RV32-NO-COM %s
# RUN: llc -mtriple=riscv32  -mattr=+c -x mir -run-pass=prologepilog \
# RUN: -verify-machineinstrs < %s | FileCheck -check-prefixes=CHECK-RV32-COM %s
# RUN: llc -mtriple=riscv64 -x mir -run-pass=prologepilog  -verify-machineinstrs < %s \
# RUN: | FileCheck -check-prefixes=CHECK-RV64-NO-COM %s
# RUN: llc -mtriple=riscv64 -mattr=+c -x mir -run-pass=prologepilog \
# RUN: -verify-machineinstrs < %s | FileCheck -check-prefixes=CHECK-RV64-COM %s
--- |
  define dso_local void @_Z15stack_size_2048v() {
  entry:
    ret void
  }

  declare dso_local void @_Z6calleePi(ptr noundef)

  define dso_local void @_Z15stack_size_4096v() {
  entry:
    ret void
  }

  define dso_local void @_Z15stack_size_8192v() {
  entry:
    ret void
  }

...
---
name:            _Z15stack_size_2048v
alignment:       2
tracksRegLiveness: true
frameInfo:
  maxAlignment:    4
  adjustsStack:    true
  hasCalls:        true
  localFrameSize:  2048
stack:
  - { id: 0, size: 2048, alignment: 4, local-offset: -2048 }
machineFunctionInfo:
  varArgsFrameIndex: 0
  varArgsSaveSize: 0
body:             |
  bb.0.entry:
    ; CHECK-RV32-NO-COM-LABEL: name: _Z15stack_size_2048v
    ; CHECK-RV32-NO-COM: liveins: $x1
    ; CHECK-RV32-NO-COM-NEXT: {{  $}}
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
    ; CHECK-RV32-NO-COM-NEXT: SW killed $x1, $x2, 2028 :: (store (s32) into %stack.1)
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -32
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
    ; CHECK-RV32-NO-COM-NEXT: renamable $x10 = ADDI $x2, 12
    ; CHECK-RV32-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 32
    ; CHECK-RV32-NO-COM-NEXT: $x1 = LW $x2, 2028 :: (load (s32) from %stack.1)
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV32-NO-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV32-COM-LABEL: name: _Z15stack_size_2048v
    ; CHECK-RV32-COM: liveins: $x1
    ; CHECK-RV32-COM-NEXT: {{  $}}
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -256
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 256
    ; CHECK-RV32-COM-NEXT: SW killed $x1, $x2, 252 :: (store (s32) into %stack.1)
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -1808
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
    ; CHECK-RV32-COM-NEXT: renamable $x10 = ADDI $x2, 12
    ; CHECK-RV32-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 1808
    ; CHECK-RV32-COM-NEXT: $x1 = LW $x2, 252 :: (load (s32) from %stack.1)
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 256
    ; CHECK-RV32-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV64-NO-COM-LABEL: name: _Z15stack_size_2048v
    ; CHECK-RV64-NO-COM: liveins: $x1
    ; CHECK-RV64-NO-COM-NEXT: {{  $}}
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
    ; CHECK-RV64-NO-COM-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.1)
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -32
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
    ; CHECK-RV64-NO-COM-NEXT: renamable $x10 = ADDI $x2, 8
    ; CHECK-RV64-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 32
    ; CHECK-RV64-NO-COM-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.1)
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV64-NO-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV64-COM-LABEL: name: _Z15stack_size_2048v
    ; CHECK-RV64-COM: liveins: $x1
    ; CHECK-RV64-COM-NEXT: {{  $}}
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -496
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 496
    ; CHECK-RV64-COM-NEXT: SD killed $x1, $x2, 488 :: (store (s64) into %stack.1)
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -1568
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2064
    ; CHECK-RV64-COM-NEXT: renamable $x10 = ADDI $x2, 8
    ; CHECK-RV64-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 1568
    ; CHECK-RV64-COM-NEXT: $x1 = LD $x2, 488 :: (load (s64) from %stack.1)
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 496
    ; CHECK-RV64-COM-NEXT: PseudoRET
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
    renamable $x10 = ADDI %stack.0, 0
    PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2
    PseudoRET

...
---
name:            _Z15stack_size_4096v
alignment:       2
tracksRegLiveness: true
frameInfo:
  maxAlignment:    4
  adjustsStack:    true
  hasCalls:        true
  localFrameSize:  4096
stack:
  - { id: 0, size: 4096, alignment: 4, local-offset: -4096 }
machineFunctionInfo:
  varArgsFrameIndex: 0
  varArgsSaveSize: 0
body:             |
  bb.0.entry:
    ; CHECK-RV32-NO-COM-LABEL: name: _Z15stack_size_4096v
    ; CHECK-RV32-NO-COM: liveins: $x1
    ; CHECK-RV32-NO-COM-NEXT: {{  $}}
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
    ; CHECK-RV32-NO-COM-NEXT: SW killed $x1, $x2, 2028 :: (store (s32) into %stack.1)
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -32
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
    ; CHECK-RV32-NO-COM-NEXT: renamable $x10 = ADDI $x2, 12
    ; CHECK-RV32-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 48
    ; CHECK-RV32-NO-COM-NEXT: $x1 = LW $x2, 2028 :: (load (s32) from %stack.1)
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV32-NO-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV32-COM-LABEL: name: _Z15stack_size_4096v
    ; CHECK-RV32-COM: liveins: $x1
    ; CHECK-RV32-COM-NEXT: {{  $}}
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -256
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 256
    ; CHECK-RV32-COM-NEXT: SW killed $x1, $x2, 252 :: (store (s32) into %stack.1)
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -1808
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
    ; CHECK-RV32-COM-NEXT: renamable $x10 = ADDI $x2, 12
    ; CHECK-RV32-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 1824
    ; CHECK-RV32-COM-NEXT: $x1 = LW $x2, 252 :: (load (s32) from %stack.1)
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 256
    ; CHECK-RV32-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV64-NO-COM-LABEL: name: _Z15stack_size_4096v
    ; CHECK-RV64-NO-COM: liveins: $x1
    ; CHECK-RV64-NO-COM-NEXT: {{  $}}
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
    ; CHECK-RV64-NO-COM-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.1)
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -32
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
    ; CHECK-RV64-NO-COM-NEXT: renamable $x10 = ADDI $x2, 8
    ; CHECK-RV64-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 48
    ; CHECK-RV64-NO-COM-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.1)
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV64-NO-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV64-COM-LABEL: name: _Z15stack_size_4096v
    ; CHECK-RV64-COM: liveins: $x1
    ; CHECK-RV64-COM-NEXT: {{  $}}
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -496
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 496
    ; CHECK-RV64-COM-NEXT: SD killed $x1, $x2, 488 :: (store (s64) into %stack.1)
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -2048
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI killed $x2, -1568
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 4112
    ; CHECK-RV64-COM-NEXT: renamable $x10 = ADDI $x2, 8
    ; CHECK-RV64-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI killed $x2, 1584
    ; CHECK-RV64-COM-NEXT: $x1 = LD $x2, 488 :: (load (s64) from %stack.1)
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 496
    ; CHECK-RV64-COM-NEXT: PseudoRET
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
    renamable $x10 = ADDI %stack.0, 0
    PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2
    PseudoRET

...
---
name:            _Z15stack_size_8192v
alignment:       2
tracksRegLiveness: true
frameInfo:
  maxAlignment:    4
  adjustsStack:    true
  hasCalls:        true
  localFrameSize:  8192
stack:
  - { id: 0, size: 8192, alignment: 4, local-offset: -8192 }
machineFunctionInfo:
  varArgsFrameIndex: 0
  varArgsSaveSize: 0
body:             |
  bb.0.entry:
    ; CHECK-RV32-NO-COM-LABEL: name: _Z15stack_size_8192v
    ; CHECK-RV32-NO-COM: liveins: $x1
    ; CHECK-RV32-NO-COM-NEXT: {{  $}}
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
    ; CHECK-RV32-NO-COM-NEXT: SW killed $x1, $x2, 2028 :: (store (s32) into %stack.1)
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
    ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-setup LUI 2
    ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-setup ADDI killed $x10, -2016
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
    ; CHECK-RV32-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
    ; CHECK-RV32-NO-COM-NEXT: renamable $x10 = ADDI $x2, 12
    ; CHECK-RV32-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-destroy LUI 2
    ; CHECK-RV32-NO-COM-NEXT: $x10 = frame-destroy ADDI killed $x10, -2016
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
    ; CHECK-RV32-NO-COM-NEXT: $x1 = LW $x2, 2028 :: (load (s32) from %stack.1)
    ; CHECK-RV32-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV32-NO-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV32-COM-LABEL: name: _Z15stack_size_8192v
    ; CHECK-RV32-COM: liveins: $x1
    ; CHECK-RV32-COM-NEXT: {{  $}}
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup ADDI $x2, -256
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 256
    ; CHECK-RV32-COM-NEXT: SW killed $x1, $x2, 252 :: (store (s32) into %stack.1)
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -4
    ; CHECK-RV32-COM-NEXT: $x10 = frame-setup LUI 2
    ; CHECK-RV32-COM-NEXT: $x10 = frame-setup ADDI killed $x10, -240
    ; CHECK-RV32-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
    ; CHECK-RV32-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
    ; CHECK-RV32-COM-NEXT: renamable $x10 = ADDI $x2, 12
    ; CHECK-RV32-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV32-COM-NEXT: $x10 = frame-destroy LUI 2
    ; CHECK-RV32-COM-NEXT: $x10 = frame-destroy ADDI killed $x10, -240
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
    ; CHECK-RV32-COM-NEXT: $x1 = LW $x2, 252 :: (load (s32) from %stack.1)
    ; CHECK-RV32-COM-NEXT: $x2 = frame-destroy ADDI $x2, 256
    ; CHECK-RV32-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV64-NO-COM-LABEL: name: _Z15stack_size_8192v
    ; CHECK-RV64-NO-COM: liveins: $x1
    ; CHECK-RV64-NO-COM-NEXT: {{  $}}
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup ADDI $x2, -2032
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 2032
    ; CHECK-RV64-NO-COM-NEXT: SD killed $x1, $x2, 2024 :: (store (s64) into %stack.1)
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
    ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-setup LUI 2
    ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-setup ADDIW killed $x10, -2016
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
    ; CHECK-RV64-NO-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
    ; CHECK-RV64-NO-COM-NEXT: renamable $x10 = ADDI $x2, 8
    ; CHECK-RV64-NO-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-destroy LUI 2
    ; CHECK-RV64-NO-COM-NEXT: $x10 = frame-destroy ADDIW killed $x10, -2016
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
    ; CHECK-RV64-NO-COM-NEXT: $x1 = LD $x2, 2024 :: (load (s64) from %stack.1)
    ; CHECK-RV64-NO-COM-NEXT: $x2 = frame-destroy ADDI $x2, 2032
    ; CHECK-RV64-NO-COM-NEXT: PseudoRET
    ;
    ; CHECK-RV64-COM-LABEL: name: _Z15stack_size_8192v
    ; CHECK-RV64-COM: liveins: $x1
    ; CHECK-RV64-COM-NEXT: {{  $}}
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup ADDI $x2, -496
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 496
    ; CHECK-RV64-COM-NEXT: SD killed $x1, $x2, 488 :: (store (s64) into %stack.1)
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION offset $x1, -8
    ; CHECK-RV64-COM-NEXT: $x10 = frame-setup LUI 2
    ; CHECK-RV64-COM-NEXT: $x10 = frame-setup ADDIW killed $x10, -480
    ; CHECK-RV64-COM-NEXT: $x2 = frame-setup SUB $x2, killed $x10
    ; CHECK-RV64-COM-NEXT: frame-setup CFI_INSTRUCTION def_cfa_offset 8208
    ; CHECK-RV64-COM-NEXT: renamable $x10 = ADDI $x2, 8
    ; CHECK-RV64-COM-NEXT: PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ; CHECK-RV64-COM-NEXT: $x10 = frame-destroy LUI 2
    ; CHECK-RV64-COM-NEXT: $x10 = frame-destroy ADDIW killed $x10, -480
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADD $x2, killed $x10
    ; CHECK-RV64-COM-NEXT: $x1 = LD $x2, 488 :: (load (s64) from %stack.1)
    ; CHECK-RV64-COM-NEXT: $x2 = frame-destroy ADDI $x2, 496
    ; CHECK-RV64-COM-NEXT: PseudoRET
    ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
    renamable $x10 = ADDI %stack.0, 0
    PseudoCALL target-flags(riscv-call) @_Z6calleePi, csr_ilp32_lp64, implicit-def dead $x1, implicit killed $x10, implicit-def $x2
    ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2
    PseudoRET

...