Skip to content

Commit def72c5

Browse files
committed
Use isDbgAssign, remove test cruft
1 parent 1c00708 commit def72c5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4488,8 +4488,8 @@ void InstCombinerImpl::tryToSinkInstructionDPValues(
44884488
if (!SunkVariables.insert(DbgUserVariable).second)
44894489
continue;
44904490

4491-
// FIXME: dbg.assign equivalence. dbg.assigns here enter the SunkVariables
4492-
// map, but don't actually get sunk.
4491+
if (DPV->isDbgAssign())
4492+
continue;
44934493

44944494
DPVClones.emplace_back(DPV->clone());
44954495
LLVM_DEBUG(dbgs() << "CLONE: " << *DPVClones.back() << '\n');

llvm/test/DebugInfo/instcombine-sink-latest-assignment.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,18 @@ declare i64 @_ZNK4llvm25SmallVectorTemplateCommonINS_9MCOperandEvE4sizeEv()
5454
!llvm.module.flags = !{!3}
5555

5656
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, splitDebugInlining: false, nameTableKind: None)
57-
!1 = !DIFile(filename: "/fast/fs/llvm34/lib/MC/MCObjectStreamer.cpp", directory: "/fast/fs/build34llvmstage", checksumkind: CSK_MD5, checksum: "43f3adff5ece50116e446307bd92824d")
57+
!1 = !DIFile(filename: "foo.cpp", directory: ".")
5858
!2 = !{}
5959
!3 = !{i32 2, !"Debug Info Version", i32 3}
6060
!4 = !DILocation(line: 197, column: 26, scope: !5)
6161
!5 = distinct !DILexicalBlock(scope: !7, file: !6, line: 197, column: 3)
62-
!6 = !DIFile(filename: "llvm34/lib/MC/MCObjectStreamer.cpp", directory: "/fast/fs", checksumkind: CSK_MD5, checksum: "43f3adff5ece50116e446307bd92824d")
62+
!6 = !DIFile(filename: "foo.cpp", directory: ".")
6363
!7 = distinct !DISubprogram(name: "EmitInstruction", linkageName: "_ZN4llvm16MCObjectStreamer15EmitInstructionERKNS_6MCInstE", scope: !8, file: !6, line: 195, type: !13, scopeLine: 195, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !15, retainedNodes: !2)
6464
!8 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "MCObjectStreamer", scope: !10, file: !9, line: 33, size: 2432, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !11)
65-
!9 = !DIFile(filename: "llvm34/include/llvm/MC/MCObjectStreamer.h", directory: "/fast/fs", checksumkind: CSK_MD5, checksum: "364947c58883b0a72d98313c0775422d")
65+
!9 = !DIFile(filename: "bar.h", directory: ".")
6666
!10 = !DINamespace(name: "llvm", scope: null)
6767
!11 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "MCStreamer", scope: !10, file: !12, line: 108, size: 2240, flags: DIFlagFwdDecl | DIFlagNonTrivial, identifier: "_ZTSN4llvm10MCStreamerE")
68-
!12 = !DIFile(filename: "llvm34/include/llvm/MC/MCStreamer.h", directory: "/fast/fs", checksumkind: CSK_MD5, checksum: "1fdd4f3a9a6a2340c2ba553eefe0e90b")
68+
!12 = !DIFile(filename: "baz.h", directory: ".")
6969
!13 = distinct !DISubroutineType(types: !14)
7070
!14 = !{null}
7171
!15 = !DISubprogram(name: "EmitInstruction", linkageName: "_ZN4llvm16MCObjectStreamer15EmitInstructionERKNS_6MCInstE", scope: !8, file: !9, line: 88, type: !13, scopeLine: 88, containingType: !8, virtualIndex: 86, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagVirtual | DISPFlagOptimized)

0 commit comments

Comments
 (0)