brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 723bd26 Raw
65 lines · plain
1; RUN: llc -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \2; RUN:    -stop-before finalize-isel %s -o -  \3; RUN:    -experimental-debug-variable-locations=false \4; RUN: | FileCheck %s --check-prefixes=CHECK,DBGVALUE5; RUN: llc -mtriple=x86_64-unknown-unknown -start-after=codegenprepare \6; RUN:    -stop-before finalize-isel %s -o -  \7; RUN:    -experimental-debug-variable-locations=true \8; RUN: | FileCheck %s --check-prefixes=CHECK,INSTRREF9 10; Test that the dbg.value for %baz, which doesn't exist in the 'next' bb,11; can be salvaged back to the underlying argument vreg.12 13; CHECK:       ![[AAAVAR:.*]] = !DILocalVariable(name: "aaa",14; CHECK-LABEL: bb.0.entry:15; INSTRREF:    DBG_PHI $rdi, 116; CHECK-LABEL: bb.1.next:17; INSTRREF:    DBG_INSTR_REF ![[AAAVAR]], {{.+}}, dbg-instr-ref(1, 0)18; DBGVALUE:    DBG_VALUE %{{[0-9]+}}, $noreg, ![[AAAVAR]]19 20target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"21target triple = "x86_64-linux-gnu"22 23define i8 @f(ptr %foo) local_unnamed_addr !dbg !6 {24entry:25  %bar = getelementptr i32, ptr %foo, i32 426  %quux = load i8, ptr %bar27  br label %next28 29next:                                             ; preds = %entry30  tail call void @llvm.dbg.value(metadata ptr %bar, metadata !15, metadata !DIExpression()), !dbg !3031  %xyzzy = add i8 %quux, 12332  br label %fin33 34fin:                                              ; preds = %next35  %trains = getelementptr i32, ptr %foo, i32 336  %cars = load i8, ptr %trains37  %ret = add i8 %xyzzy, %cars38  ret i8 %ret39}40 41; Function Attrs: nounwind readnone speculatable42declare void @llvm.dbg.value(metadata, metadata, metadata) #043 44attributes #0 = { nounwind readnone speculatable }45 46!llvm.dbg.cu = !{!0}47!llvm.module.flags = !{!25, !26, !27, !28}48!llvm.ident = !{!29}49 50!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)51!1 = !DIFile(filename: "test.c", directory: ".")52!2 = !{}53!6 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 18, type: !7, scopeLine: 19, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !14)54!7 = !DISubroutineType(types: !8)55!8 = !{!13}56!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_unsigned)57!14 = !{!15}58!15 = !DILocalVariable(name: "aaa", scope: !6, file: !1, line: 18, type: !13)59!25 = !{i32 2, !"Dwarf Version", i32 4}60!26 = !{i32 2, !"Debug Info Version", i32 3}61!27 = !{i32 1, !"wchar_size", i32 4}62!28 = !{i32 7, !"PIC Level", i32 2}63!29 = !{!"clang"}64!30 = !DILocation(line: 18, column: 14, scope: !6)65