brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 26537e7 Raw
50 lines · plain
1; RUN: opt -passes=instcombine -S %s -o -  \2; RUN: | FileCheck %s --implicit-check-not="#dbg_"3 4;; Based on the test remove-redundant-dbg.ll.5;;6;; Check that instcombine does not remove redundant debug intrinsics when7;; assignment tracking is turned off. This test is here to check the existing8;; behaviour is maintained. If it is discovered that it is profitable to remove9;; these intrinsics in instcombine then it's okay to remove this test.10 11; CHECK: #dbg_value(i32 undef12; CHECK: #dbg_value(i32 013; CHECK: #dbg_value(i32 114 15define dso_local void @_Z3funv() local_unnamed_addr !dbg !7 {16entry:17  call void @llvm.dbg.value(metadata i32 undef, metadata !11, metadata !DIExpression()), !dbg !1418  call void @_Z3extv(), !dbg !1519  call void @llvm.dbg.value(metadata i32 0, metadata !11, metadata !DIExpression()), !dbg !1420  call void @llvm.dbg.value(metadata i32 1, metadata !11, metadata !DIExpression()), !dbg !1421  ret void, !dbg !1622}23 24declare !dbg !17 dso_local void @_Z3extv() local_unnamed_addr25declare void @llvm.dbg.value(metadata, metadata, metadata)26 27!llvm.dbg.cu = !{!0}28!llvm.module.flags = !{!2, !3, !4, !5}29!llvm.ident = !{!6}30 31!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)32!1 = !DIFile(filename: "test.cpp", directory: "/")33!2 = !{i32 7, !"Dwarf Version", i32 5}34!3 = !{i32 2, !"Debug Info Version", i32 3}35!4 = !{i32 1, !"wchar_size", i32 4}36!5 = !{i32 7, !"uwtable", i32 1}37!6 = !{!"clang version 14.0.0)"}38!7 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funv", scope: !1, file: !1, line: 2, type: !8, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !10)39!8 = !DISubroutineType(types: !9)40!9 = !{null}41!10 = !{!11}42!11 = !DILocalVariable(name: "a", scope: !7, file: !1, line: 2, type: !12)43!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)44!13 = distinct !DIAssignID()45!14 = !DILocation(line: 0, scope: !7)46!15 = !DILocation(line: 2, column: 25, scope: !7)47!16 = !DILocation(line: 2, column: 32, scope: !7)48!17 = !DISubprogram(name: "ext", linkageName: "_Z3extv", scope: !1, file: !1, line: 1, type: !8, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !18)49!18 = !{}50