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