[PATCH] D107448: {DebugInfo][LoopStrengthReduction] Don't cache dbg.value that are already undef
Chris Jackson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 11:17:37 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG113a06f7a500: {DebugInfo][LSR] Don't cache dbg.value that are already undef (authored by chrisjackson).
Changed prior to commit:
https://reviews.llvm.org/D107448?vs=364180&id=364559#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107448/new/
https://reviews.llvm.org/D107448
Files:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/test/Transforms/LoopStrengthReduce/pr51329.ll
Index: llvm/test/Transforms/LoopStrengthReduce/pr51329.ll
===================================================================
--- llvm/test/Transforms/LoopStrengthReduce/pr51329.ll
+++ llvm/test/Transforms/LoopStrengthReduce/pr51329.ll
@@ -2,7 +2,10 @@
;
; Test that LSR SCEV-based salvaging does not crash when translating SCEVs
; that contain integers with binary representations greater than 64-bits.
+; Also show that no salvaging attempt is made for dbg.value that are undef
+; pre-LSR.
;
+; CHECK: call void @llvm.dbg.value(metadata i64 undef, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_plus_uconst, 228, DW_OP_stack_value))
; CHECK: call void @llvm.dbg.value(metadata i64 %var2, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_plus_uconst, 228, DW_OP_stack_value))
@@ -23,6 +26,7 @@
Label_d0: ; preds = %Label_d0, %init
%var3 = phi i64 [ %var2, %init ], [ %var4, %Label_d0 ]
+ call void @llvm.dbg.value(metadata i64 undef, metadata !11, metadata !DIExpression(DW_OP_plus_uconst, 228, DW_OP_stack_value)), !dbg !12
call void @llvm.dbg.value(metadata i64 %var2, metadata !11, metadata !DIExpression(DW_OP_plus_uconst, 228, DW_OP_stack_value)), !dbg !12
%var4 = add i64 %var3, -1
%var5 = icmp eq i64 %var4, 0
@@ -47,4 +51,4 @@
!9 = !DIBasicType(name: "my_type", size: 64, encoding: DW_ATE_unsigned)
!10 = !{!11}
!11 = !DILocalVariable(name: "my_var", arg: 1, scope: !5, file: !1, line: 904320, type: !8)
-!12 = !DILocation(line: 904544, scope: !5)
+!12 = !DILocation(line: 904544, scope: !5)
\ No newline at end of file
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -6222,6 +6222,9 @@
if (!DVI)
continue;
+ if (DVI->isUndef())
+ continue;
+
if (DVI->hasArgList())
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107448.364559.patch
Type: text/x-patch
Size: 2017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210805/47aaf140/attachment.bin>
More information about the llvm-commits
mailing list