[llvm] [PromoteMemToReg] Insert store undef when removing lifetime markers (PR #191909)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 23 03:20:26 PDT 2026
================
@@ -42,6 +45,9 @@
; CHECK-NEXT: #dbg_value(i32 %To.sroa.3.0.copyload, ![[TO]], !DIExpression(DW_OP_LLVM_fragment, 96, 32),
; CHECK-NEXT: #dbg_assign({{.+}} undef, ![[TO]], !DIExpression(DW_OP_LLVM_fragment, 128, 96), ![[ID_6]], ptr %To.sroa.4, !DIExpression(),
+;; lifetime.end also makes the middle slice undef.
+; CHECK: #dbg_value(i32 undef, ![[TO]], !DIExpression(DW_OP_LLVM_fragment, 96, 32),
----------------
OCHyams wrote:
Similarly to the point above, this is redundant because it's just closing the last possible variable location range, which would either otherwise extend to the end of the variable's scope or get closed by register clobber etc later.
https://github.com/llvm/llvm-project/pull/191909
More information about the llvm-commits
mailing list