66 lines · plain
1# RUN: llc -run-pass machineverifier -o - %s | FileCheck %s2# RUN: llc --passes='machine-function(verify)' -o - %s | FileCheck %s3# Simple round-trip test for DBG_VALUE_LIST.4# CHECK: [[VAR_C:![0-9]+]] = !DILocalVariable(name: "c"5# CHECK: DBG_VALUE_LIST [[VAR_C]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), $edi, $esi, debug-location6--- |7 ; ModuleID = 'test.cpp'8 source_filename = "test.cpp"9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"10 target triple = "x86_64-unknown-linux-gnu"11 12 ; Function Attrs: norecurse nounwind readnone uwtable13 define dso_local i32 @_Z3fooii(i32 %a, i32 %b) local_unnamed_addr !dbg !7 {14 entry:15 call void @llvm.dbg.value(metadata i32 %a, metadata !12, metadata !DIExpression()), !dbg !1516 call void @llvm.dbg.value(metadata i32 %b, metadata !13, metadata !DIExpression()), !dbg !1517 call void @llvm.dbg.value(metadata i32 poison, metadata !14, metadata !DIExpression()), !dbg !1518 %mul = mul nsw i32 %b, %a, !dbg !1619 ret i32 %mul, !dbg !1720 }21 22 ; Function Attrs: nounwind readnone speculatable willreturn23 declare void @llvm.dbg.value(metadata, metadata, metadata)24 25 !llvm.dbg.cu = !{!0}26 !llvm.module.flags = !{!3, !4, !5}27 !llvm.ident = !{!6}28 29 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)30 !1 = !DIFile(filename: "test.cpp", directory: "/")31 !2 = !{}32 !3 = !{i32 7, !"Dwarf Version", i32 4}33 !4 = !{i32 2, !"Debug Info Version", i32 3}34 !5 = !{i32 1, !"wchar_size", i32 4}35 !6 = !{!"clang version 11.0.0"}36 !7 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooii", scope: !1, file: !1, line: 2, type: !8, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)37 !8 = !DISubroutineType(types: !9)38 !9 = !{!10, !10, !10}39 !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)40 !11 = !{!12, !13, !14}41 !12 = !DILocalVariable(name: "a", arg: 1, scope: !7, file: !1, line: 2, type: !10)42 !13 = !DILocalVariable(name: "b", arg: 2, scope: !7, file: !1, line: 2, type: !10)43 !14 = !DILocalVariable(name: "c", scope: !7, file: !1, line: 3, type: !10)44 !15 = !DILocation(line: 0, scope: !7)45 !16 = !DILocation(line: 4, column: 12, scope: !7)46 !17 = !DILocation(line: 4, column: 3, scope: !7)47 48...49---50name: _Z3fooii51body: |52 bb.0.entry:53 liveins: $edi, $esi54 55 DBG_VALUE $edi, $noreg, !12, !DIExpression(), debug-location !1556 DBG_VALUE $esi, $noreg, !13, !DIExpression(), debug-location !1557 $eax = MOV32rr $edi58 DBG_VALUE_LIST !14, !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), $edi, $esi, debug-location !1559 DBG_VALUE $esi, $noreg, !13, !DIExpression(), debug-location !1560 DBG_VALUE $eax, $noreg, !12, !DIExpression(), debug-location !1561 renamable $eax = nsw IMUL32rr killed renamable $eax, killed renamable $esi, implicit-def dead $eflags, debug-location !1662 RET64 $eax, debug-location !1763 64...65 66