Revert r354244 "[DAGCombiner] Eliminate dead stores to stack."
[llvm-complete.git] / test / MC / COFF / cv-loc-unreachable-2.s
blob15b3038001e62786e53d6368aea8b23ccb38db60
1 # RUN: llvm-mc < %s -triple=i686-pc-win32 -filetype=obj | llvm-readobj - -codeview | FileCheck %s
3 # Based on the other cv-loc-unreachable-2.s, but with other code in the same
4 # section afterwards. We had negative label difference assertions when .cv_loc
5 # bound tightly to the next instruction.
7 # CHECK-LABEL: InlineeSourceLine {
8 # CHECK: Inlinee: do_exit (0x1002)
9 # CHECK: FileID: C:\src\llvm-project\build\t.cpp (0x0)
10 # CHECK: SourceLineNum: 3
11 # CHECK: }
13 # CHECK-LABEL: InlineSiteSym {
14 # CHECK: Kind: S_INLINESITE (0x114D)
15 # CHECK: Inlinee: do_exit (0x1002)
16 # CHECK: BinaryAnnotations [
17 # CHECK-NEXT: ChangeLineOffset: 1
18 # CHECK-NEXT: ChangeCodeLength: 0x9
19 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x1, LineOffset: 1}
20 # CHECK-NEXT: ChangeCodeOffsetAndLineOffset: {CodeOffset: 0x8, LineOffset: 1}
21 # CHECK-NEXT: ChangeCodeLength: 0x0
22 # CHECK-NEXT: ]
23 # CHECK: }
25 .text
26 .def _callit; .scl 2; .type 32; .endef
27 .globl _callit # -- Begin function callit
28 _callit: # @callit
29 Lfunc_begin0:
30 .cv_func_id 0
31 .cv_fpo_proc _callit 0
32 # %bb.0: # %entry
33 .cv_file 1 "C:\\src\\llvm-project\\build\\t.cpp" "0BC092F354CE14FDC2FA78F8EDE7426E" 1
34 .cv_inline_site_id 1 within 0 inlined_at 1 9 0
35 .cv_loc 1 1 4 0 is_stmt 0 # t.cpp:4:0
36 calll _unlikely
37 testl %eax, %eax
38 jne LBB0_1
39 Ltmp0:
40 # %bb.2: # %do_exit.exit
41 .cv_loc 0 1 10 0 # t.cpp:10:0
42 retl
43 LBB0_1: # %if.then.i
44 Ltmp1:
45 .cv_loc 1 1 5 0 # t.cpp:5:0
46 pushl $32
47 calll *__imp__exit
48 # EXTRA
49 .cv_loc 1 1 6 0 # t.cpp:6:0
50 Ltmp2:
51 .cv_fpo_endproc
52 Lfunc_end0:
53 # -- End function
55 .text
56 .align 32
57 retl
59 .section .debug$S,"dr"
60 .p2align 2
61 .long 4 # Debug section magic
62 .long 241
63 .long Ltmp4-Ltmp3 # Subsection size
64 Ltmp3:
65 .short Ltmp6-Ltmp5 # Record length
66 Ltmp5:
67 .short 4412 # Record kind: S_COMPILE3
68 .long 0 # Flags and language
69 .short 7 # CPUType
70 .short 7 # Frontend version
71 .short 0
72 .short 0
73 .short 0
74 .short 7000 # Backend version
75 .short 0
76 .short 0
77 .short 0
78 .asciz "clang version 7.0.0 " # Null-terminated compiler version string
79 Ltmp6:
80 Ltmp4:
81 .p2align 2
82 .long 246 # Inlinee lines subsection
83 .long Ltmp8-Ltmp7 # Subsection size
84 Ltmp7:
85 .long 0 # Inlinee lines signature
87 # Inlined function do_exit starts at t.cpp:3
88 .long 4098 # Type index of inlined function
89 .cv_filechecksumoffset 1 # Offset into filechecksum table
90 .long 3 # Starting line number
91 Ltmp8:
92 .p2align 2
93 .cv_fpo_data _callit
94 .long 241 # Symbol subsection for callit
95 .long Ltmp10-Ltmp9 # Subsection size
96 Ltmp9:
97 .short Ltmp12-Ltmp11 # Record length
98 Ltmp11:
99 .short 4423 # Record kind: S_GPROC32_ID
100 .long 0 # PtrParent
101 .long 0 # PtrEnd
102 .long 0 # PtrNext
103 .long Lfunc_end0-_callit # Code size
104 .long 0 # Offset after prologue
105 .long 0 # Offset before epilogue
106 .long 4099 # Function type index
107 .secrel32 _callit # Function section relative address
108 .secidx _callit # Function section index
109 .byte 0 # Flags
110 .asciz "callit" # Function name
111 Ltmp12:
112 .short Ltmp14-Ltmp13 # Record length
113 Ltmp13:
114 .short 4429 # Record kind: S_INLINESITE
115 .long 0 # PtrParent
116 .long 0 # PtrEnd
117 .long 4098 # Inlinee type index
118 .cv_inline_linetable 1 1 3 Lfunc_begin0 Lfunc_end0
119 Ltmp14:
120 .short 2 # Record length
121 .short 4430 # Record kind: S_INLINESITE_END
122 .short 2 # Record length
123 .short 4431 # Record kind: S_PROC_ID_END
124 Ltmp10:
125 .p2align 2
126 .cv_linetable 0, _callit, Lfunc_end0
127 .cv_filechecksums # File index to string table offset subsection
128 .cv_stringtable # String table
129 .section .debug$T,"dr"
130 .p2align 2
131 .long 4 # Debug section magic
132 # ArgList (0x1000) {
133 # TypeLeafKind: LF_ARGLIST (0x1201)
134 # NumArgs: 0
135 # Arguments [
138 .byte 0x06, 0x00, 0x01, 0x12
139 .byte 0x00, 0x00, 0x00, 0x00
140 # Procedure (0x1001) {
141 # TypeLeafKind: LF_PROCEDURE (0x1008)
142 # ReturnType: void (0x3)
143 # CallingConvention: NearC (0x0)
144 # FunctionOptions [ (0x0)
146 # NumParameters: 0
147 # ArgListType: () (0x1000)
149 .byte 0x0e, 0x00, 0x08, 0x10
150 .byte 0x03, 0x00, 0x00, 0x00
151 .byte 0x00, 0x00, 0x00, 0x00
152 .byte 0x00, 0x10, 0x00, 0x00
153 # FuncId (0x1002) {
154 # TypeLeafKind: LF_FUNC_ID (0x1601)
155 # ParentScope: 0x0
156 # FunctionType: void () (0x1001)
157 # Name: do_exit
159 .byte 0x12, 0x00, 0x01, 0x16
160 .byte 0x00, 0x00, 0x00, 0x00
161 .byte 0x01, 0x10, 0x00, 0x00
162 .byte 0x64, 0x6f, 0x5f, 0x65
163 .byte 0x78, 0x69, 0x74, 0x00
164 # FuncId (0x1003) {
165 # TypeLeafKind: LF_FUNC_ID (0x1601)
166 # ParentScope: 0x0
167 # FunctionType: void () (0x1001)
168 # Name: callit
170 .byte 0x12, 0x00, 0x01, 0x16
171 .byte 0x00, 0x00, 0x00, 0x00
172 .byte 0x01, 0x10, 0x00, 0x00
173 .byte 0x63, 0x61, 0x6c, 0x6c
174 .byte 0x69, 0x74, 0x00, 0xf1