[llvm] [PromoteMemToReg] Insert store undef when removing lifetime markers (PR #191909)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 13:50:25 PDT 2026


================
@@ -21,8 +21,8 @@
 ; CHECK: %call = call
 ; CHECK-NEXT: %0 = extractvalue { <2 x float>, <2 x float> } %call, 0
 ; CHECK-NEXT: %1 = extractvalue { <2 x float>, <2 x float> } %call, 1
-; CHECK-NEXT: #dbg_value(<2 x float> %0, ![[var:[0-9]+]], !DIExpression(DW_OP_LLVM_fragment, 256, 64),
-; CHECK-NEXT: #dbg_value(<2 x float> %1, ![[var]], !DIExpression(DW_OP_LLVM_fragment, 320, 64),
+; CHECK-NEXT: #dbg_value(<2 x float> undef, ![[var:[0-9]+]], !DIExpression(DW_OP_LLVM_fragment, 256, 64),
+; CHECK-NEXT: #dbg_value(<2 x float> undef, ![[var]], !DIExpression(DW_OP_LLVM_fragment, 320, 64),
----------------
nikic wrote:

The replacement with undef here looks like a regression. Did the previous dbg_values really become undef, or are there just additional ones with undef now and you're matching those? I would not expect the old dbg_values to disappear.

It would probably make sense to just skip these undef stores in whatever code generates these dbg_values. I don't think there is value in explicitly marking these as undef.

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


More information about the llvm-commits mailing list