1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc < %s -mtriple riscv32 | FileCheck %s -check-prefixes=CHECK-32
3 ; RUN: llc < %s -mtriple riscv64 | FileCheck %s -check-prefixes=CHECK-64
5 declare dso_local void @main()
7 define dso_local void @naked() naked "frame-pointer"="all" {
8 ; CHECK-32-LABEL: naked:
10 ; CHECK-32-NEXT: call main
12 ; CHECK-64-LABEL: naked:
14 ; CHECK-64-NEXT: call main
19 define dso_local void @normal() "frame-pointer"="all" {
20 ; CHECK-32-LABEL: normal:
22 ; CHECK-32-NEXT: addi sp, sp, -16
23 ; CHECK-32-NEXT: .cfi_def_cfa_offset 16
24 ; CHECK-32-NEXT: sw ra, 12(sp) # 4-byte Folded Spill
25 ; CHECK-32-NEXT: sw s0, 8(sp) # 4-byte Folded Spill
26 ; CHECK-32-NEXT: .cfi_offset ra, -4
27 ; CHECK-32-NEXT: .cfi_offset s0, -8
28 ; CHECK-32-NEXT: addi s0, sp, 16
29 ; CHECK-32-NEXT: .cfi_def_cfa s0, 0
30 ; CHECK-32-NEXT: call main
32 ; CHECK-64-LABEL: normal:
34 ; CHECK-64-NEXT: addi sp, sp, -16
35 ; CHECK-64-NEXT: .cfi_def_cfa_offset 16
36 ; CHECK-64-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
37 ; CHECK-64-NEXT: sd s0, 0(sp) # 8-byte Folded Spill
38 ; CHECK-64-NEXT: .cfi_offset ra, -8
39 ; CHECK-64-NEXT: .cfi_offset s0, -16
40 ; CHECK-64-NEXT: addi s0, sp, 16
41 ; CHECK-64-NEXT: .cfi_def_cfa s0, 0
42 ; CHECK-64-NEXT: call main