59 lines · plain
1; RUN: llc %s -o - -stop-after=finalize-isel \2; RUN: | FileCheck %s --implicit-check-not=DBG3 4;; Hand written. Check that we fall back to emitting a list of defs for5;; variables with split allocas (i.e. we want to see DBG_VALUEs and no6;; debug-info-variable entry in the stack slot table).7 8; CHECK: stack:9; CHECK: - { id: 0, name: a, type: default, offset: 0, size: 4, alignment: 4, 10; CHECK: stack-id: default, callee-saved-register: '', callee-saved-restored: true, 11; CHECK: debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }12; CHECK: - { id: 1, name: c, type: default, offset: 0, size: 4, alignment: 4, 13; CHECK: stack-id: default, callee-saved-register: '', callee-saved-restored: true, 14; CHECK: debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }15; CHECK: DBG_VALUE %stack.0.a, $noreg, !{{.*}}, !DIExpression(DW_OP_deref, DW_OP_LLVM_fragment, 0, 32) 16; CHECK: DBG_VALUE %stack.1.c, $noreg, !{{.*}}, !DIExpression(DW_OP_deref, DW_OP_LLVM_fragment, 64, 32)17 18target triple = "x86_64-unknown-linux-gnu"19 20define dso_local void @fun() !dbg !7 {21entry:22 %a = alloca i32, align 4, !DIAssignID !1623 call void @llvm.dbg.assign(metadata i1 undef, metadata !11, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32), metadata !16, metadata ptr %a, metadata !DIExpression()), !dbg !1724 %c = alloca i32, align 4, !DIAssignID !2025 call void @llvm.dbg.assign(metadata i1 undef, metadata !11, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 32), metadata !20, metadata ptr %c, metadata !DIExpression()), !dbg !1726 store i32 5, ptr %a, !DIAssignID !2127 ret void, !dbg !1928}29 30declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata)31 32!llvm.dbg.cu = !{!0}33!llvm.module.flags = !{!2, !3, !4, !5, !1000}34!llvm.ident = !{!6}35 36!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)37!1 = !DIFile(filename: "test.c", directory: "/")38!2 = !{i32 7, !"Dwarf Version", i32 5}39!3 = !{i32 2, !"Debug Info Version", i32 3}40!4 = !{i32 1, !"wchar_size", i32 4}41!5 = !{i32 7, !"uwtable", i32 1}42!6 = !{!"clang version 14.0.0"}43!7 = distinct !DISubprogram(name: "fun", scope: !1, file: !1, line: 1, type: !8, scopeLine: 1, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !10)44!8 = !DISubroutineType(types: !9)45!9 = !{null}46!10 = !{!11}47!11 = !DILocalVariable(name: "local", scope: !7, file: !1, line: 2, type: !12)48!12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 96, elements: !14)49!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)50!14 = !{!15}51!15 = !DISubrange(count: 3)52!16 = distinct !DIAssignID()53!17 = !DILocation(line: 0, scope: !7)54!18 = !DILocation(line: 2, column: 3, scope: !7)55!19 = !DILocation(line: 3, column: 1, scope: !7)56!20 = distinct !DIAssignID()57!21 = distinct !DIAssignID()58!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true}59