1
- # RUN: llc %s --start-before=branch-folder --stop-after=branch-folder -o - \
2
- # RUN: | FileCheck %s --implicit-check-not=DBG_PHI
1
+ # RUN: llc %s --start-before=branch-folder --stop-after=branch-folder -o - | FileCheck %s
3
2
4
3
# # Check that common instructions hoisted from `if.then` and `if.else` into
5
- # # common pred `entry` get merged debug locations. The debug instructions from
6
- # # both branches should get hoisted and killed.
7
- # #
8
- # # The MIR debug instructions have been modified by hand in order to check they
9
- # # can be killed.
10
- # #
11
- # # Check DBG_PHIs are deleted rather than hoisted (implicit-check-not).
4
+ # # common pred `entry` get merged debug locations.
5
+
6
+ # # FIXME: The debug instructions handling here is wrong.
12
7
13
8
# CHECK: bb.0
14
9
# CHECK: CALL64pcrel32 @f, csr_64, implicit $rsp, implicit $ssp, implicit-def $rsp, implicit-def $ssp, implicit-def $rax
15
- # # --- Start splice from bb.2.if.else (and debug instructions from bb.1.if.then) ---
16
- # CHECK-NEXT: DBG_VALUE $noreg, $noreg, ![[#]], !DIExpression(), debug-location ![[#]]
17
- # CHECK-NEXT: DBG_VALUE $noreg, $noreg, ![[#]], !DIExpression(), debug-location ![[#]]
18
- # CHECK-NEXT: $edi = MOV32r0 implicit-def dead $eflags, debug-instr-number 2, debug-location !DILocation(line: 0, scope: ![[#]])
19
- # CHECK-NEXT: DBG_VALUE $noreg, $noreg, ![[#]], !DIExpression(DW_OP_LLVM_arg, 0), debug-location ![[#]]
20
- # CHECK-NEXT: DBG_VALUE $noreg, $noreg, ![[#]], !DIExpression(DW_OP_LLVM_arg, 0), debug-location ![[#]]
21
- # # --- End splice ------------------------------------------------------------------
10
+ # # --- Start splice from bb.2.if.else ---
11
+ # CHECK-NEXT: DBG_VALUE 2, $noreg, ![[#]], !DIExpression(), debug-location ![[#]]
12
+ # CHECK-NEXT: $edi = MOV32r0 implicit-def dead $eflags, debug-location !DILocation(line: 0, scope: ![[#]])
13
+ # # --- End splice --------------
22
14
# CHECK-NEXT: TEST64rr killed renamable $rax, renamable $rax, implicit-def $eflags
23
15
# CHECK-NEXT: JCC_1 %bb.2, 9, implicit killed $eflags
24
16
# CHECK: bb.1
81
73
...
82
74
---
83
75
name : g
84
- tracksRegLiveness : true
85
- isSSA : false
86
76
body : |
87
77
bb.0 (%ir-block.0):
88
78
successors: %bb.1(0x40000000), %bb.2(0x40000000)
@@ -97,23 +87,21 @@ body: |
97
87
bb.1.if.then:
98
88
successors: %bb.3(0x80000000)
99
89
100
- DBG_PHI $esp, 3
101
- DBG_VALUE $esi, $noreg, !11, !DIExpression(), debug-location !13
102
- $edi = MOV32r0 implicit-def dead $eflags, debug-instr-number 1, debug-location !14
103
- DBG_INSTR_REF !11, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(1, 0), debug-location !13
90
+ DBG_VALUE 0, $noreg, !11, !DIExpression(), debug-location !13
91
+ $edi = MOV32r0 implicit-def dead $eflags, debug-location !14
104
92
$esi = MOV32r0 implicit-def dead $eflags, debug-location !14
105
93
CALL64pcrel32 target-flags(x86-plt) @_Z3fooii, csr_64, implicit $rsp, implicit $ssp, implicit killed $edi, implicit killed $esi, implicit-def $rsp, implicit-def $ssp, debug-location !14
94
+ DBG_VALUE 1, $noreg, !11, !DIExpression(), debug-location !13
106
95
JMP_1 %bb.3, debug-location !15
107
96
108
97
bb.2.if.else:
109
98
successors: %bb.3(0x80000000)
110
99
111
- DBG_PHI $esp, 4
112
- DBG_VALUE $esp, $noreg, !11, !DIExpression(), debug-location !13
113
- $edi = MOV32r0 implicit-def dead $eflags, debug-instr-number 2, debug-location !16
114
- DBG_INSTR_REF !11, !DIExpression(DW_OP_LLVM_arg, 0), dbg-instr-ref(2, 0), debug-location !13
100
+ DBG_VALUE 2, $noreg, !11, !DIExpression(), debug-location !13
101
+ $edi = MOV32r0 implicit-def dead $eflags, debug-location !16
115
102
$esi = MOV32ri 1, debug-location !16
116
103
CALL64pcrel32 target-flags(x86-plt) @_Z3barii, csr_64, implicit $rsp, implicit $ssp, implicit killed $edi, implicit killed $esi, implicit-def $rsp, implicit-def $ssp, debug-location !16
104
+ DBG_VALUE 3, $noreg, !11, !DIExpression(), debug-location !13
117
105
118
106
bb.3.if.end:
119
107
$eax = MOV32ri 2
0 commit comments