1 ; RUN: llc -filetype=obj -mtriple=riscv32 -mattr=+relax %s -o - \
2 ; RUN: | llvm-readobj -r | FileCheck -check-prefix=RELAX %s
3 ; RUN: llc -filetype=obj -mtriple=riscv32 -mattr=+relax %s -o - \
4 ; RUN: | llvm-dwarfdump --debug-frame - \
5 ; RUN: | FileCheck -check-prefix=RELAX-DWARFDUMP %s
7 ; RELAX: Section{{.*}}.rela.{{eh|debug}}_frame {
9 ; RELAX-NOT: 0x0 R_RISCV_ADD32
10 ; RELAX-NOT: 0x0 R_RISCV_SUB32
12 ; RELAX: 0x20 R_RISCV_ADD32
13 ; RELAX: 0x20 R_RISCV_SUB32
15 ; RELAX: 0x25 R_RISCV_SET6
16 ; RELAX: 0x25 R_RISCV_SUB6
18 ; RELAX-DWARFDUMP: CIE
19 ; RELAX-DWARFDUMP: DW_CFA_advance_loc
20 ; RELAX-DWARFDUMP: DW_CFA_def_cfa_offset
21 ; RELAX-DWARFDUMP: DW_CFA_offset
22 ; RELAX-DWARFDUMP: DW_CFA_restore
23 source_filename = "frame.c"
25 ; Function Attrs: noinline nounwind optnone
31 ; Function Attrs: noinline nounwind optnone
32 define i32 @foo(i32 signext %value) {
34 %value.addr = alloca i32, align 4
35 store i32 %value, i32* %value.addr, align 4
36 %0 = load i32, i32* %value.addr, align 4
40 ; Function Attrs: noinline nounwind optnone
43 %result = alloca i32, align 4
44 %v = alloca i32, align 4
45 %call = call i32 @init()
46 store i32 %call, i32* %v, align 4
47 %0 = load i32, i32* %v, align 4
48 %call1 = call i32 @foo(i32 signext %0)
49 store i32 %call1, i32* %result, align 4
50 %1 = load i32, i32* %result, align 4
55 !llvm.module.flags = !{!3, !4, !5}
57 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
58 !1 = !DIFile(filename: "line.c", directory: "./")
60 !3 = !{i32 2, !"Dwarf Version", i32 4}
61 !4 = !{i32 2, !"Debug Info Version", i32 3}
62 !5 = !{i32 1, !"wchar_size", i32 4}