brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 655c3d1 Raw
58 lines · plain
1;; Check that every instruction inserted by -passes=deadargelim has a debug location.2;; The test was generated by using -passes=debugify option.3 4; RUN: opt < %s -passes=deadargelim -S 2>&1 | FileCheck %s5 6; CHECK-LABEL: fn7; CHECK: %oldret = extractvalue { i32, i32, i16 } %z, 0, !dbg ![[LOC:.*]]8; CHECK: %newret = insertvalue { i32, i32 } poison, i32 %oldret, 0, !dbg ![[LOC:.*]]9; CHECK: %oldret1 = extractvalue { i32, i32, i16 } %z, 1, !dbg ![[LOC:.*]]10; CHECK: %newret2 = insertvalue { i32, i32 } %newret, i32 %oldret1, 1, !dbg ![[LOC:.*]]11 12; CHECK-LABEL: fn113; CHECK: %newret = extractvalue { i32, i32 } %ret, 0, !dbg ![[LOC2:.*]]14; CHECK: %oldret = insertvalue { i32, i32, i16 } poison, i32 %newret, 0, !dbg ![[LOC2:.*]]15; CHECK: %newret1 = extractvalue { i32, i32 } %ret, 1, !dbg ![[LOC2:.*]]16; CHECK: %oldret2 = insertvalue { i32, i32, i16 } %oldret, i32 %newret1, 1, !dbg ![[LOC2:.*]]17 18; ModuleID = 'test.ll'19source_filename = "test.ll"20 21define internal { i32, i32, i16 } @fn() !dbg !6 {22  %x = insertvalue { i32, i32, i16 } poison, i32 1, 0, !dbg !823  %y = insertvalue { i32, i32, i16 } %x, i32 2, 1, !dbg !924  %z = insertvalue { i32, i32, i16 } %y, i16 3, 2, !dbg !1025  ret { i32, i32, i16 } %z, !dbg !1126}27 28define i32 @fn1() !dbg !12 {29  %ret = call { i32, i32, i16 } @fn(), !dbg !1330  %b = extractvalue { i32, i32, i16 } %ret, 0, !dbg !1431  %c = extractvalue { i32, i32, i16 } %ret, 1, !dbg !1532  %d = add i32 %b, %c, !dbg !1633  ret i32 %d, !dbg !1734}35 36!llvm.dbg.cu = !{!0}37!llvm.module.flags = !{!5}38 39!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)40!1 = !DIFile(filename: "test.ll", directory: "/")41!2 = !{}42!5 = !{i32 2, !"Debug Info Version", i32 3}43!6 = distinct !DISubprogram(name: "fn", linkageName: "fn", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)44!7 = !DISubroutineType(types: !2)45!8 = !DILocation(line: 1, column: 1, scope: !6)46!9 = !DILocation(line: 2, column: 1, scope: !6)47!10 = !DILocation(line: 3, column: 1, scope: !6)48!11 = !DILocation(line: 4, column: 1, scope: !6)49!12 = distinct !DISubprogram(name: "fn1", linkageName: "fn1", scope: null, file: !1, line: 5, type: !7, scopeLine: 5, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !2)50!13 = !DILocation(line: 5, column: 1, scope: !12)51!14 = !DILocation(line: 6, column: 1, scope: !12)52!15 = !DILocation(line: 7, column: 1, scope: !12)53!16 = !DILocation(line: 8, column: 1, scope: !12)54!17 = !DILocation(line: 9, column: 1, scope: !12)55 56; CHECK: ![[LOC]] = !DILocation(line: 457; CHECK: ![[LOC2]] = !DILocation(line: 558