[llvm] [ISelDAG] Salvage debug info at isel by referring to frame indices. (PR #109126)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 08:43:53 PDT 2024


================
@@ -0,0 +1,85 @@
+; RUN: llc -march=sparc -O1 %s -o - | FileCheck %s
+
+; Debug info salvaging in isel means we should see a location for this variable.
+
+; CHECK-LABEL: a:
+; CHECK:    !DEBUG_VALUE: a:d <- [DW_OP_plus_uconst 98, DW_OP_plus_uconst 3, DW_OP_stack_value] $o6
+
+define dso_local zeroext i16 @a() local_unnamed_addr #0 !dbg !7 {
+entry:
+  %b = alloca [6 x i8], align 1, !DIAssignID !24
+    #dbg_assign(i1 undef, !14, !DIExpression(), !24, ptr %b, !DIExpression(), !25)
----------------
OCHyams wrote:

I think it improves clarity if we remove this DbgRecord since variable `b` isn't used in the test (the associated metadata and DIAssignID could be deleted too).

https://github.com/llvm/llvm-project/pull/109126


More information about the llvm-commits mailing list