1
- # RUN: llc --run-pass=livedebugvalues -o - %s | FileCheck %s
1
+ # RUN: llc --run-pass=livedebugvalues -o - %s | FileCheck %s --implicit-check-not=DBG_VALUE
2
2
# REQUIRES: x86-registered-target
3
+
4
+ # This test covers the scenario where a DBG_VALUE created prior to LiveDebugValues has an entry-value expression.
5
+ # It ensures that a clobbered stack copy doesn't crash if used as an entry-value because entry-values can't be clobbered.
6
+
3
7
--- |
4
8
target triple = "x86_64-"
5
9
@@ -64,13 +68,13 @@ body: |
64
68
successors: %bb.2(0x40000000), %bb.1(0x40000000)
65
69
liveins: $r14, $edi, $edx, $esi
66
70
DBG_VALUE $r14, $noreg, !14, !DIExpression(DW_OP_LLVM_entry_value, 1), debug-location !19
67
- $r14 = MOV64ri 0, debug-location !20
68
71
CMP32ri killed renamable $edx, 0, implicit-def $eflags, debug-location !20
69
72
JCC_1 %bb.2, 4, implicit killed $eflags, debug-location !22
70
73
bb.1.if.then:
71
74
successors: %bb.3(0x80000000)
72
75
liveins: $edi, $r13
73
76
CALL64pcrel32 @foo, csr_64, implicit $rsp, implicit $ssp, implicit $edi, implicit-def $eax, debug-location !23
77
+ $r14 = MOV64ri 0, debug-location !20
74
78
JMP_1 %bb.3, debug-location !25
75
79
bb.2.if.else:
76
80
successors: %bb.3(0x80000000)
@@ -85,7 +89,10 @@ body: |
85
89
# CHECK: DBG_VALUE $r14, {{.*}}, !DIExpression(DW_OP_LLVM_entry_value, 1)
86
90
# CHECK-LABEL: bb.1.if.then:
87
91
# CHECK: DBG_VALUE $r14, {{.*}}, !DIExpression(DW_OP_LLVM_entry_value, 1)
92
+ # CHECK-NEXT: CALL64pcrel32 @foo
93
+ # CHECK-NEXT: $r14 = MOV64ri 0
94
+ # CHECK-NOT: DBG_VALUE $r14, {{.*}}, !DIExpression(DW_OP_LLVM_entry_value, 1)
88
95
# CHECK-LABEL: bb.2.if.else:
89
96
# CHECK: DBG_VALUE $r14, {{.*}}, !DIExpression(DW_OP_LLVM_entry_value, 1)
90
97
# CHECK-LABEL: bb.3.if.end:
91
- # CHECK: DBG_VALUE $r14, {{.*}}, !DIExpression(DW_OP_LLVM_entry_value, 1)
98
+ # CHECK: DBG_VALUE $r14, {{.*}}, !DIExpression(DW_OP_LLVM_entry_value, 1)
0 commit comments