60 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 42# RUN: llc %s -mtriple=riscv64 -run-pass=riscv-opt-w-instrs -o - | FileCheck %s3 4--- |5 define void @foo(i32 signext %a, i32 signext %b, ptr %c) !dbg !5 {6 entry:7 %add = add nsw i32 %b, %a, !dbg !118 tail call void @llvm.dbg.value(metadata i32 %add, metadata !9, metadata !DIExpression()), !dbg !119 store i32 %add, ptr %c, align 4, !dbg !1210 ret void, !dbg !1311 }12 13 14 !llvm.dbg.cu = !{!0}15 !llvm.debugify = !{!2, !3}16 !llvm.module.flags = !{!4}17 18 !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)19 !1 = !DIFile(filename: "test.ll", directory: "/")20 !2 = !{i32 3}21 !3 = !{i32 1}22 !4 = !{i32 2, !"Debug Info Version", i32 3}23 !5 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8)24 !6 = !DISubroutineType(types: !7)25 !7 = !{}26 !8 = !{!9}27 !9 = !DILocalVariable(name: "1", scope: !5, file: !1, line: 1, type: !10)28 !10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)29 !11 = !DILocation(line: 1, column: 1, scope: !5)30 !12 = !DILocation(line: 2, column: 1, scope: !5)31 !13 = !DILocation(line: 3, column: 1, scope: !5)32 33...34---35name: foo36tracksRegLiveness: true37body: |38 bb.0.entry:39 liveins: $x10, $x11, $x1240 41 ; CHECK-LABEL: name: foo42 ; CHECK: liveins: $x10, $x11, $x1243 ; CHECK-NEXT: {{ $}}44 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x1245 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x1146 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x1047 ; CHECK-NEXT: [[ADD:%[0-9]+]]:gpr = ADD [[COPY1]], [[COPY2]], debug-location !1148 ; CHECK-NEXT: DBG_VALUE [[ADD]], $noreg, !9, !DIExpression(), debug-location !1149 ; CHECK-NEXT: SW killed [[ADD]], [[COPY]], 0, debug-location !12 :: (store (s32) into %ir.c)50 ; CHECK-NEXT: PseudoRET debug-location !1351 %2:gpr = COPY $x1252 %1:gpr = COPY $x1153 %0:gpr = COPY $x1054 %3:gpr = ADDW %1, %0, debug-location !1155 DBG_VALUE %3, $noreg, !9, !DIExpression(), debug-location !1156 SW killed %3, %2, 0, debug-location !12 :: (store (s32) into %ir.c)57 PseudoRET debug-location !1358 59...60