[IRBuilder] Add Align argument for CreateMaskedExpandLoad and CreateMaskedCompressSto...
[llvm-project.git] / llvm / test / DebugInfo / XCOFF / function-sections.ll
blob6a86ae6796fbc3a140827201613fddaa28cc1be8
2 ; RUN: llc -debugger-tune=gdb -mcpu=ppc -mtriple powerpc-ibm-aix-xcoff -function-sections \
3 ; RUN:   < %s | FileCheck %s
5 source_filename = "1.c"
6 target datalayout = "E-m:a-p:32:32-i64:64-n32"
8 ; Function Attrs: noinline nounwind optnone
9 define i32 @foo() #0 !dbg !8 {
10 entry:
11   ret i32 0, !dbg !12
14 ; Function Attrs: noinline nounwind optnone
15 define i32 @bar() #0 !dbg !13 {
16 entry:
17   ret i32 1, !dbg !14
20 !llvm.dbg.cu = !{!0}
21 !llvm.module.flags = !{!3, !4, !5, !6}
22 !llvm.ident = !{!7}
24 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 13.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
25 !1 = !DIFile(filename: "1.c", directory: "debug")
26 !2 = !{}
27 !3 = !{i32 7, !"Dwarf Version", i32 3}
28 !4 = !{i32 2, !"Debug Info Version", i32 3}
29 !5 = !{i32 1, !"wchar_size", i32 2}
30 !6 = !{i32 7, !"PIC Level", i32 2}
31 !7 = !{!"clang version 13.0.0"}
32 !8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !9, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
33 !9 = !DISubroutineType(types: !10)
34 !10 = !{!11}
35 !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
36 !12 = !DILocation(line: 3, column: 3, scope: !8)
37 !13 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 6, type: !9, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
38 !14 = !DILocation(line: 8, column: 3, scope: !13)
40 ; CHECK:               .file   "1.c"
41 ; CHECK-NEXT:          .csect ..text..[PR],5
42 ; CHECK-NEXT:          .rename ..text..[PR],""
43 ; CHECK-NEXT:          .machine "COM"
44 ; CHECK-NEXT:          .csect .foo[PR],5
45 ; CHECK-NEXT:          .globl  foo[DS]                         # -- Begin function foo
46 ; CHECK-NEXT:          .globl  .foo[PR]
47 ; CHECK-NEXT:          .align  2
48 ; CHECK-NEXT:          .csect foo[DS],2
49 ; CHECK-NEXT:          .vbyte  4, .foo[PR]                     # @foo
50 ; CHECK-NEXT:          .vbyte  4, TOC[TC0]
51 ; CHECK-NEXT:          .vbyte  4, 0
52 ; CHECK-NEXT:          .csect .foo[PR],5
53 ; CHECK-NEXT:  L..func_begin0:
54 ; CHECK-NEXT:  # %bb.0:                                # %entry
55 ; CHECK-NEXT:  L..tmp0:
56 ; CHECK-NEXT:          li 3, 0
57 ; CHECK-NEXT:          blr
58 ; CHECK-NEXT:  L..tmp1:
59 ; CHECK-NEXT:  L..foo0:
60 ; CHECK-NEXT:          .vbyte  4, 0x00000000                   # Traceback table begin
61 ; CHECK-NEXT:          .byte   0x00                            # Version = 0
62 ; CHECK-NEXT:          .byte   0x09                            # Language = CPlusPlus
63 ; CHECK-NEXT:          .byte   0x20                            # -IsGlobaLinkage, -IsOutOfLineEpilogOrPrologue
64 ; CHECK-NEXT:                                          # +HasTraceBackTableOffset, -IsInternalProcedure
65 ; CHECK-NEXT:                                          # -HasControlledStorage, -IsTOCless
66 ; CHECK-NEXT:                                          # -IsFloatingPointPresent
67 ; CHECK-NEXT:                                          # -IsFloatingPointOperationLogOrAbortEnabled
68 ; CHECK-NEXT:          .byte   0x40                            # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed
69 ; CHECK-NEXT:                                          # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved
70 ; CHECK-NEXT:          .byte   0x00                            # -IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0
71 ; CHECK-NEXT:          .byte   0x00                            # -HasExtensionTable, -HasVectorInfo, NumOfGPRsSaved = 0
72 ; CHECK-NEXT:          .byte   0x00                            # NumberOfFixedParms = 0
73 ; CHECK-NEXT:          .byte   0x01                            # NumberOfFPParms = 0, +HasParmsOnStack
74 ; CHECK-NEXT:          .vbyte  4, L..foo0-.foo[PR]             # Function size
75 ; CHECK-NEXT:          .vbyte  2, 0x0003                       # Function name len = 3
76 ; CHECK-NEXT:          .byte   "foo"                           # Function Name
77 ; CHECK-NEXT:  L..func_end0:
78 ; CHECK-NEXT:                                          # -- End function
79 ; CHECK-NEXT:          .csect .bar[PR],5
80 ; CHECK-NEXT:          .globl  bar[DS]                         # -- Begin function bar
81 ; CHECK-NEXT:          .globl  .bar[PR]
82 ; CHECK-NEXT:          .align  2
83 ; CHECK-NEXT:          .csect bar[DS],2
84 ; CHECK-NEXT:          .vbyte  4, .bar[PR]                     # @bar
85 ; CHECK-NEXT:          .vbyte  4, TOC[TC0]
86 ; CHECK-NEXT:          .vbyte  4, 0
87 ; CHECK-NEXT:          .csect .bar[PR],5
88 ; CHECK-NEXT:  L..func_begin1:
89 ; CHECK-NEXT:  # %bb.0:                                # %entry
90 ; CHECK-NEXT:  L..tmp2:
91 ; CHECK-NEXT:          li 3, 1
92 ; CHECK-NEXT:          blr
93 ; CHECK-NEXT:  L..tmp3:
94 ; CHECK-NEXT:  L..bar0:
95 ; CHECK-NEXT:          .vbyte  4, 0x00000000                   # Traceback table begin
96 ; CHECK-NEXT:          .byte   0x00                            # Version = 0
97 ; CHECK-NEXT:          .byte   0x09                            # Language = CPlusPlus
98 ; CHECK-NEXT:          .byte   0x20                            # -IsGlobaLinkage, -IsOutOfLineEpilogOrPrologue
99 ; CHECK-NEXT:                                          # +HasTraceBackTableOffset, -IsInternalProcedure
100 ; CHECK-NEXT:                                          # -HasControlledStorage, -IsTOCless
101 ; CHECK-NEXT:                                          # -IsFloatingPointPresent
102 ; CHECK-NEXT:                                          # -IsFloatingPointOperationLogOrAbortEnabled
103 ; CHECK-NEXT:          .byte   0x40                            # -IsInterruptHandler, +IsFunctionNamePresent, -IsAllocaUsed
104 ; CHECK-NEXT:                                          # OnConditionDirective = 0, -IsCRSaved, -IsLRSaved
105 ; CHECK-NEXT:          .byte   0x00                            # -IsBackChainStored, -IsFixup, NumOfFPRsSaved = 0
106 ; CHECK-NEXT:          .byte   0x00                            # -HasExtensionTable, -HasVectorInfo, NumOfGPRsSaved = 0
107 ; CHECK-NEXT:          .byte   0x00                            # NumberOfFixedParms = 0
108 ; CHECK-NEXT:          .byte   0x01                            # NumberOfFPParms = 0, +HasParmsOnStack
109 ; CHECK-NEXT:          .vbyte  4, L..bar0-.bar[PR]             # Function size
110 ; CHECK-NEXT:          .vbyte  2, 0x0003                       # Function name len = 3
111 ; CHECK-NEXT:          .byte   "bar"                           # Function Name
112 ; CHECK-NEXT:  L..func_end1:
113 ; CHECK-NEXT:                                          # -- End function
114 ; CHECK-NEXT:  L..sec_end0:
115 ; CHECK:               .dwsect 0x60000
116 ; CHECK-NEXT:  .dwabrev:
117 ; CHECK-NEXT:          .byte   1                               # Abbreviation Code
118 ; CHECK-NEXT:          .byte   17                              # DW_TAG_compile_unit
119 ; CHECK-NEXT:          .byte   1                               # DW_CHILDREN_yes
120 ; CHECK-NEXT:          .byte   37                              # DW_AT_producer
121 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
122 ; CHECK-NEXT:          .byte   19                              # DW_AT_language
123 ; CHECK-NEXT:          .byte   5                               # DW_FORM_data2
124 ; CHECK-NEXT:          .byte   3                               # DW_AT_name
125 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
126 ; CHECK-NEXT:          .byte   16                              # DW_AT_stmt_list
127 ; CHECK-NEXT:          .byte   6                               # DW_FORM_data4
128 ; CHECK-NEXT:          .byte   27                              # DW_AT_comp_dir
129 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
130 ; CHECK-NEXT:          .byte   17                              # DW_AT_low_pc
131 ; CHECK-NEXT:          .byte   1                               # DW_FORM_addr
132 ; CHECK-NEXT:          .byte   85                              # DW_AT_ranges
133 ; CHECK-NEXT:          .byte   6                               # DW_FORM_data4
134 ; CHECK-NEXT:          .byte   0                               # EOM(1)
135 ; CHECK-NEXT:          .byte   0                               # EOM(2)
136 ; CHECK-NEXT:          .byte   2                               # Abbreviation Code
137 ; CHECK-NEXT:          .byte   46                              # DW_TAG_subprogram
138 ; CHECK-NEXT:          .byte   0                               # DW_CHILDREN_no
139 ; CHECK-NEXT:          .byte   17                              # DW_AT_low_pc
140 ; CHECK-NEXT:          .byte   1                               # DW_FORM_addr
141 ; CHECK-NEXT:          .byte   18                              # DW_AT_high_pc
142 ; CHECK-NEXT:          .byte   1                               # DW_FORM_addr
143 ; CHECK-NEXT:          .byte   64                              # DW_AT_frame_base
144 ; CHECK-NEXT:          .byte   10                              # DW_FORM_block1
145 ; CHECK-NEXT:          .byte   3                               # DW_AT_name
146 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
147 ; CHECK-NEXT:          .byte   58                              # DW_AT_decl_file
148 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
149 ; CHECK-NEXT:          .byte   59                              # DW_AT_decl_line
150 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
151 ; CHECK-NEXT:          .byte   39                              # DW_AT_prototyped
152 ; CHECK-NEXT:          .byte   12                              # DW_FORM_flag
153 ; CHECK-NEXT:          .byte   73                              # DW_AT_type
154 ; CHECK-NEXT:          .byte   19                              # DW_FORM_ref4
155 ; CHECK-NEXT:          .byte   63                              # DW_AT_external
156 ; CHECK-NEXT:          .byte   12                              # DW_FORM_flag
157 ; CHECK-NEXT:          .byte   0                               # EOM(1)
158 ; CHECK-NEXT:          .byte   0                               # EOM(2)
159 ; CHECK-NEXT:          .byte   3                               # Abbreviation Code
160 ; CHECK-NEXT:          .byte   36                              # DW_TAG_base_type
161 ; CHECK-NEXT:          .byte   0                               # DW_CHILDREN_no
162 ; CHECK-NEXT:          .byte   3                               # DW_AT_name
163 ; CHECK-NEXT:          .byte   14                              # DW_FORM_strp
164 ; CHECK-NEXT:          .byte   62                              # DW_AT_encoding
165 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
166 ; CHECK-NEXT:          .byte   11                              # DW_AT_byte_size
167 ; CHECK-NEXT:          .byte   11                              # DW_FORM_data1
168 ; CHECK-NEXT:          .byte   0                               # EOM(1)
169 ; CHECK-NEXT:          .byte   0                               # EOM(2)
170 ; CHECK-NEXT:          .byte   0                               # EOM(3)
171 ; CHECK:               .dwsect 0x10000
172 ; CHECK-NEXT:  .dwinfo:
173 ; CHECK-NEXT:  L..cu_begin0:
174 ; CHECK-NEXT:          .vbyte  2, 3                            # DWARF version number
175 ; CHECK-NEXT:          .vbyte  4, .dwabrev                  # Offset Into Abbrev. Section
176 ; CHECK-NEXT:          .byte   4                               # Address Size (in bytes)
177 ; CHECK-NEXT:          .byte   1                               # Abbrev [1] 0xb:0x51 DW_TAG_compile_unit
178 ; CHECK-NEXT:          .vbyte  4, L..info_string0              # DW_AT_producer
179 ; CHECK-NEXT:          .vbyte  2, 12                           # DW_AT_language
180 ; CHECK-NEXT:          .vbyte  4, L..info_string1              # DW_AT_name
181 ; CHECK-NEXT:          .vbyte  4, L..line_table_start0         # DW_AT_stmt_list
182 ; CHECK-NEXT:          .vbyte  4, L..info_string2              # DW_AT_comp_dir
183 ; CHECK-NEXT:          .vbyte  4, 0                            # DW_AT_low_pc
184 ; CHECK-NEXT:          .vbyte  4, L..debug_ranges0             # DW_AT_ranges
185 ; CHECK-NEXT:          .byte   2                               # Abbrev [2] 0x26:0x17 DW_TAG_subprogram
186 ; CHECK-NEXT:          .vbyte  4, L..func_begin0               # DW_AT_low_pc
187 ; CHECK-NEXT:          .vbyte  4, L..func_end0                 # DW_AT_high_pc
188 ; CHECK-NEXT:          .byte   1                               # DW_AT_frame_base
189 ; CHECK-NEXT:          .byte   81
190 ; CHECK-NEXT:          .vbyte  4, L..info_string3              # DW_AT_name
191 ; CHECK-NEXT:          .byte   1                               # DW_AT_decl_file
192 ; CHECK-NEXT:          .byte   1                               # DW_AT_decl_line
193 ; CHECK-NEXT:          .byte   1                               # DW_AT_prototyped
194 ; CHECK-NEXT:          .vbyte  4, 84                           # DW_AT_type
195 ; CHECK-NEXT:          .byte   1                               # DW_AT_external
196 ; CHECK-NEXT:          .byte   2                               # Abbrev [2] 0x3d:0x17 DW_TAG_subprogram
197 ; CHECK-NEXT:          .vbyte  4, L..func_begin1               # DW_AT_low_pc
198 ; CHECK-NEXT:          .vbyte  4, L..func_end1                 # DW_AT_high_pc
199 ; CHECK-NEXT:          .byte   1                               # DW_AT_frame_base
200 ; CHECK-NEXT:          .byte   81
201 ; CHECK-NEXT:          .vbyte  4, L..info_string5              # DW_AT_name
202 ; CHECK-NEXT:          .byte   1                               # DW_AT_decl_file
203 ; CHECK-NEXT:          .byte   6                               # DW_AT_decl_line
204 ; CHECK-NEXT:          .byte   1                               # DW_AT_prototyped
205 ; CHECK-NEXT:          .vbyte  4, 84                           # DW_AT_type
206 ; CHECK-NEXT:          .byte   1                               # DW_AT_external
207 ; CHECK-NEXT:          .byte   3                               # Abbrev [3] 0x54:0x7 DW_TAG_base_type
208 ; CHECK-NEXT:          .vbyte  4, L..info_string4              # DW_AT_name
209 ; CHECK-NEXT:          .byte   5                               # DW_AT_encoding
210 ; CHECK-NEXT:          .byte   4                               # DW_AT_byte_size
211 ; CHECK-NEXT:          .byte   0                               # End Of Children Mark
212 ; CHECK-NEXT:  L..debug_info_end0:
213 ; CHECK:               .dwsect 0x80000
214 ; CHECK-NEXT:  .dwrnges:
215 ; CHECK-NEXT:  L..debug_ranges0:
216 ; CHECK-NEXT:          .vbyte  4, L..func_begin0
217 ; CHECK-NEXT:          .vbyte  4, L..func_end0
218 ; CHECK-NEXT:          .vbyte  4, L..func_begin1
219 ; CHECK-NEXT:          .vbyte  4, L..func_end1
220 ; CHECK-NEXT:          .vbyte  4, 0
221 ; CHECK-NEXT:          .vbyte  4, 0
222 ; CHECK:               .dwsect 0x70000
223 ; CHECK-NEXT:  .dwstr:
224 ; CHECK-NEXT:  L..info_string0:
225 ; CHECK-NEXT:          .string "clang version 13.0.0"          # string offset=0
226 ; CHECK-NEXT:  L..info_string1:
227 ; CHECK-NEXT:          .string "1.c"                           # string offset=21
228 ; CHECK-NEXT:  L..info_string2:
229 ; CHECK-NEXT:          .string "debug"                         # string offset=25
230 ; CHECK-NEXT:  L..info_string3:
231 ; CHECK-NEXT:          .string "foo"                           # string offset=31
232 ; CHECK-NEXT:  L..info_string4:
233 ; CHECK-NEXT:          .string "int"                           # string offset=35
234 ; CHECK-NEXT:  L..info_string5:
235 ; CHECK-NEXT:          .string "bar"                           # string offset=39
236 ; CHECK-NEXT:          .toc
237 ; CHECK:               .dwsect 0x20000
238 ; CHECK-NEXT:  .dwline:
239 ; CHECK-NEXT:  L..debug_line_0:
240 ; CHECK-NEXT:  .set L..line_table_start0, L..debug_line_0-4
241 ; CHECK-NEXT:          .vbyte  2, 3
242 ; CHECK-NEXT:          .vbyte  4, L..prologue_end0-L..prologue_start0
243 ; CHECK-NEXT:  L..prologue_start0:
244 ; CHECK-NEXT:          .byte   4
245 ; CHECK-NEXT:          .byte   1
246 ; CHECK-NEXT:          .byte   -5
247 ; CHECK-NEXT:          .byte   14
248 ; CHECK-NEXT:          .byte   13
249 ; CHECK-NEXT:          .byte   0
250 ; CHECK-NEXT:          .byte   1
251 ; CHECK-NEXT:          .byte   1
252 ; CHECK-NEXT:          .byte   1
253 ; CHECK-NEXT:          .byte   1
254 ; CHECK-NEXT:          .byte   0
255 ; CHECK-NEXT:          .byte   0
256 ; CHECK-NEXT:          .byte   0
257 ; CHECK-NEXT:          .byte   1
258 ; CHECK-NEXT:          .byte   0
259 ; CHECK-NEXT:          .byte   0
260 ; CHECK-NEXT:          .byte   1
261 ; CHECK-NEXT:          .byte   "debug"
262 ; CHECK-NEXT:          .byte   0
263 ; CHECK-NEXT:          .byte   0
264 ; CHECK-NEXT:          .byte   "1.c"
265 ; CHECK-NEXT:          .byte   0
266 ; CHECK-NEXT:          .byte   1
267 ; CHECK-NEXT:          .byte   0
268 ; CHECK-NEXT:          .byte   0
269 ; CHECK-NEXT:          .byte   0
270 ; CHECK-NEXT:  L..prologue_end0:
271 ; CHECK-NEXT:          .byte   5
272 ; CHECK-NEXT:          .byte   3
273 ; CHECK-NEXT:          .byte   10
274 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp0
275 ; CHECK-NEXT:          .byte   5
276 ; CHECK-NEXT:          .byte   2
277 ; CHECK-NEXT:          .vbyte  4, L..tmp0
278 ; CHECK-NEXT:          .byte   20                              # Start sequence
279 ; CHECK-NEXT:          .byte   0                               # Set address to L..func_end0
280 ; CHECK-NEXT:          .byte   5
281 ; CHECK-NEXT:          .byte   2 
282 ; CHECK-NEXT:          .vbyte  4, L..func_end0
283 ; CHECK-NEXT:          .byte   0                               # End sequence
284 ; CHECK-NEXT:          .byte   1
285 ; CHECK-NEXT:          .byte   1
286 ; CHECK-NEXT:          .byte   5
287 ; CHECK-NEXT:          .byte   3
288 ; CHECK-NEXT:          .byte   10
289 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp2
290 ; CHECK-NEXT:          .byte   5
291 ; CHECK-NEXT:          .byte   2
292 ; CHECK-NEXT:          .vbyte  4, L..tmp2
293 ; CHECK-NEXT:          .byte   25                              # Start sequence
294 ; CHECK-NEXT:          .byte   0                               # Set address to L..func_end1
295 ; CHECK-NEXT:          .byte   5
296 ; CHECK-NEXT:          .byte   2
297 ; CHECK-NEXT:          .vbyte  4, L..func_end1
298 ; CHECK-NEXT:          .byte   0                               # End sequence
299 ; CHECK-NEXT:          .byte   1
300 ; CHECK-NEXT:          .byte   1
301 ; CHECK-NEXT:  L..debug_line_end0: