[PATCH] D44431: [LICM] Salvage DI from dying Instructions
Anastasis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 13 08:08:30 PDT 2018
gramanas created this revision.
Herald added a subscriber: llvm-commits.
fix redundant debugify test
Repository:
rL LLVM
https://reviews.llvm.org/D44431
Files:
lib/Transforms/Scalar/LICM.cpp
test/Transforms/LICM/sinking.ll
Index: test/Transforms/LICM/sinking.ll
===================================================================
--- test/Transforms/LICM/sinking.ll
+++ test/Transforms/LICM/sinking.ll
@@ -1,4 +1,5 @@
; RUN: opt < %s -basicaa -licm -S | FileCheck %s
+; RUN: opt < %s -debugify -basicaa -licm -S | FileCheck %s -check-prefix=DEBUGIFY
declare i32 @strlen(i8*) readonly nounwind
@@ -249,6 +250,9 @@
; CHECK-LABEL: @test11(
; CHECK: Out:
; CHECK-NEXT: ret void
+
+; DEBUGIFY-LABEL: @PR18753(
+; DEBUGIFY: call void @llvm.dbg.value(metadata i32 %l.le, metadata {{.*}}, metadata !DIExpression())
}
@c = common global [1 x i32] zeroinitializer, align 4
Index: lib/Transforms/Scalar/LICM.cpp
===================================================================
--- lib/Transforms/Scalar/LICM.cpp
+++ lib/Transforms/Scalar/LICM.cpp
@@ -393,6 +393,7 @@
// used in the loop, instead, just delete it.
if (isInstructionTriviallyDead(&I, TLI)) {
DEBUG(dbgs() << "LICM deleting dead inst: " << I << '\n');
+ salvageDebugInfo(I);
++II;
CurAST->deleteValue(&I);
I.eraseFromParent();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44431.138196.patch
Type: text/x-patch
Size: 1137 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180313/a02e74ec/attachment.bin>
More information about the llvm-commits
mailing list