100 lines · plain
1# RUN: %llc_dwarf %s -o - -mtriple=x86_64-unknown-unknown --start-after=livedebugvalues | FileCheck %s2 3## Check the line number from the ret above `.LBB0_2` doesn't leak onto the4## frame setup instructions in the `.LBB0_2` block; `pushq %rax` should5## explicitly get set to line zero.6 7# CHECK: loop:8# CHECK-NEXT: .Lfunc_begin0:9# CHECK-NEXT: .cfi_startproc10# CHECK-NEXT: # %bb.0:11# CHECK-NEXT: .file 1 "/" "test.c"12# CHECK-NEXT: .loc 1 5 16 prologue_end # test.c:5:1613# CHECK-NEXT: testq %rax, %rax14# CHECK-NEXT: je .LBB0_215# CHECK-NEXT: # %bb.1:16# CHECK-NEXT: .loc 1 5 16 # test.c:5:1617# CHECK-NEXT: retq18# CHECK-NEXT: .LBB0_2:19# -- Check the .loc below sets the current location to line 0.20# CHECK-NEXT: .loc 1 0 16 is_stmt 0 # test.c:0:1621# CHECK-NEXT: pushq %rax22# CHECK-NEXT: .cfi_def_cfa_offset 1623# CHECK-NEXT: addq $8, %rsp24# CHECK-NEXT: .cfi_def_cfa_offset 825# CHECK-NEXT: .loc 1 5 16 is_stmt 1 # test.c:5:1626# CHECK-NEXT: retq27 28--- |29 source_filename = "reduced.ll"30 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"31 target triple = "x86_64-unknown-unknown"32 33 define void @loop(i64 %i) !dbg !4 {34 entry:35 %cmp.not = icmp eq i64 %i, 0, !dbg !736 br i1 %cmp.not, label %for.body, label %for.end37 38 for.body: ; preds = %entry39 %puts10 = tail call i32 null(ptr null)40 %inc = add i64 0, 041 br label %for.end42 43 for.end: ; preds = %for.body, %entry44 ret void45 }46 47 !llvm.dbg.cu = !{!0}48 !llvm.module.flags = !{!3}49 50 !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 22.0.0git", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !2, splitDebugInlining: false, nameTableKind: None)51 !1 = !DIFile(filename: "test.c", directory: "/")52 !2 = !{}53 !3 = !{i32 2, !"Debug Info Version", i32 3}54 !4 = distinct !DISubprogram(name: "loop", scope: !1, file: !1, line: 4, type: !5, scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2, keyInstructions: true)55 !5 = !DISubroutineType(types: !6)56 !6 = !{null}57 !7 = !DILocation(line: 5, column: 16, scope: !8, atomGroup: 720, atomRank: 2)58 !8 = distinct !DILexicalBlock(scope: !4, file: !1, line: 5, column: 9)59...60---61name: loop62alignment: 1663tracksRegLiveness: true64noPhis: true65isSSA: false66noVRegs: true67hasFakeUses: false68debugInstrRef: true69tracksDebugUserValues: true70liveins:71 - { reg: '$rdi' }72frameInfo:73 stackSize: 874 offsetAdjustment: -875 maxAlignment: 176 adjustsStack: true77 hasCalls: true78 maxCallFrameSize: 079 isCalleeSavedInfoValid: true80machineFunctionInfo:81 amxProgModel: None82body: |83 bb.0:84 successors: %bb.1(0x30000000), %bb.2(0x50000000)85 liveins: $rdi86 87 TEST64rr undef renamable $rax, undef renamable $rax, implicit-def $eflags, debug-location !788 JCC_1 %bb.1, 4, implicit $eflags89 90 bb.2:91 RET64 debug-location !792 93 bb.1:94 frame-setup PUSH64r undef $rax, implicit-def $rsp, implicit $rsp95 frame-setup CFI_INSTRUCTION def_cfa_offset 1696 $rsp = frame-destroy ADD64ri32 $rsp, 8, implicit-def dead $eflags97 frame-destroy CFI_INSTRUCTION def_cfa_offset 898 RET64 debug-location !799...100