brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.3 KiB · 89ead4d Raw
76 lines · plain
1; RUN: llc -filetype=obj -mtriple=riscv32 -mattr=+relax %s -o - \2; RUN:     | llvm-readobj -r - | FileCheck -check-prefix=RELAX %s3;4; RELAX: .rela.debug_line {5; RELAX: R_RISCV_ADD166; RELAX: R_RISCV_SUB167source_filename = "line.c"8 9; Function Attrs: noinline nounwind optnone10define i32 @init() !dbg !7 {11entry:12  ret i32 0, !dbg !1113}14 15; Function Attrs: noinline nounwind optnone16define i32 @foo(i32 signext %value) !dbg !12 {17entry:18  %value.addr = alloca i32, align 419  store i32 %value, ptr %value.addr, align 420  call void @llvm.dbg.declare(metadata ptr %value.addr, metadata !15, metadata !DIExpression()), !dbg !1621  %0 = load i32, ptr %value.addr, align 4, !dbg !1722  ret i32 %0, !dbg !1823}24 25; Function Attrs: nounwind readnone speculatable26declare void @llvm.dbg.declare(metadata, metadata, metadata)27 28; Function Attrs: noinline nounwind optnone29define i32 @bar() !dbg !19 {30entry:31  %result = alloca i32, align 432  %v = alloca i32, align 433  call void @llvm.dbg.declare(metadata ptr %result, metadata !20, metadata !DIExpression()), !dbg !2134  call void @llvm.dbg.declare(metadata ptr %v, metadata !22, metadata !DIExpression()), !dbg !2335  %call = call i32 @init(), !dbg !2436  store i32 %call, ptr %v, align 4, !dbg !2337  %0 = load i32, ptr %v, align 4, !dbg !2538  %call1 = call i32 @foo(i32 signext %0), !dbg !2639  store i32 %call1, ptr %result, align 4, !dbg !2740  %1 = load i32, ptr %result, align 4, !dbg !2841  ret i32 %1, !dbg !2942}43 44!llvm.dbg.cu = !{!0}45!llvm.module.flags = !{!3, !4, !5}46 47!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)48!1 = !DIFile(filename: "line.c", directory: "./")49!2 = !{}50!3 = !{i32 2, !"Dwarf Version", i32 4}51!4 = !{i32 2, !"Debug Info Version", i32 3}52!5 = !{i32 1, !"wchar_size", i32 4}53!7 = distinct !DISubprogram(name: "init", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2)54!8 = !DISubroutineType(types: !9)55!9 = !{!10}56!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)57!11 = !DILocation(line: 3, column: 3, scope: !7)58!12 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 6, type: !13, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)59!13 = !DISubroutineType(types: !14)60!14 = !{!10, !10}61!15 = !DILocalVariable(name: "value", arg: 1, scope: !12, file: !1, line: 6, type: !10)62!16 = !DILocation(line: 6, column: 13, scope: !12)63!17 = !DILocation(line: 8, column: 10, scope: !12)64!18 = !DILocation(line: 8, column: 3, scope: !12)65!19 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 11, type: !8, isLocal: false, isDefinition: true, scopeLine: 12, isOptimized: false, unit: !0, retainedNodes: !2)66!20 = !DILocalVariable(name: "result", scope: !19, file: !1, line: 13, type: !10)67!21 = !DILocation(line: 13, column: 7, scope: !19)68!22 = !DILocalVariable(name: "v", scope: !19, file: !1, line: 14, type: !10)69!23 = !DILocation(line: 14, column: 7, scope: !19)70!24 = !DILocation(line: 14, column: 11, scope: !19)71!25 = !DILocation(line: 16, column: 16, scope: !19)72!26 = !DILocation(line: 16, column: 12, scope: !19)73!27 = !DILocation(line: 16, column: 10, scope: !19)74!28 = !DILocation(line: 18, column: 10, scope: !19)75!29 = !DILocation(line: 18, column: 3, scope: !19)76