1 ; Bitcode compatibility test for llvm
3 ; Please update this file when making any IR changes. Information on the
4 ; release process for this file is available here:
6 ; http://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility
8 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
9 ; RUN-PR24755: verify-uselistorder < %s
11 target datalayout = "E"
12 ; CHECK: target datalayout = "E"
14 target triple = "x86_64-apple-macosx10.10.0"
15 ; CHECK: target triple = "x86_64-apple-macosx10.10.0"
17 ;; Module-level assembly
18 module asm "beep boop"
19 ; CHECK: module asm "beep boop"
22 $comdat.any = comdat any
23 ; CHECK: $comdat.any = comdat any
24 $comdat.exactmatch = comdat exactmatch
25 ; CHECK: $comdat.exactmatch = comdat exactmatch
26 $comdat.largest = comdat largest
27 ; CHECK: $comdat.largest = comdat largest
28 $comdat.noduplicates = comdat noduplicates
29 ; CHECK: $comdat.noduplicates = comdat noduplicates
30 $comdat.samesize = comdat samesize
31 ; CHECK: $comdat.samesize = comdat samesize
34 @const.true = constant i1 true
35 ; CHECK: @const.true = constant i1 true
36 @const.false = constant i1 false
37 ; CHECK: @const.false = constant i1 false
38 @const.int = constant i32 zeroinitializer
39 ; CHECK: @const.int = constant i32 0
40 @const.float = constant double 0.0
41 ; CHECK: @const.float = constant double 0.0
42 @const.null = constant i8* null
43 ; CHECK: @const.null = constant i8* null
44 %const.struct.type = type { i32, i8 }
45 %const.struct.type.packed = type <{ i32, i8 }>
46 @const.struct = constant %const.struct.type { i32 -1, i8 undef }
47 ; CHECK: @const.struct = constant %const.struct.type { i32 -1, i8 undef }
48 @const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }>
49 ; CHECK: @const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }>
51 ; CHECK: @constant.array.i8 = constant [3 x i8] c"\00\01\00"
52 @constant.array.i8 = constant [3 x i8] [i8 -0, i8 1, i8 0]
53 ; CHECK: @constant.array.i16 = constant [3 x i16] [i16 0, i16 1, i16 0]
54 @constant.array.i16 = constant [3 x i16] [i16 -0, i16 1, i16 0]
55 ; CHECK: @constant.array.i32 = constant [3 x i32] [i32 0, i32 1, i32 0]
56 @constant.array.i32 = constant [3 x i32] [i32 -0, i32 1, i32 0]
57 ; CHECK: @constant.array.i64 = constant [3 x i64] [i64 0, i64 1, i64 0]
58 @constant.array.i64 = constant [3 x i64] [i64 -0, i64 1, i64 0]
59 ; CHECK: @constant.array.f16 = constant [3 x half] [half 0xH8000, half 0xH3C00, half 0xH0000]
60 @constant.array.f16 = constant [3 x half] [half -0.0, half 1.0, half 0.0]
61 ; CHECK: @constant.array.f32 = constant [3 x float] [float -0.000000e+00, float 1.000000e+00, float 0.000000e+00]
62 @constant.array.f32 = constant [3 x float] [float -0.0, float 1.0, float 0.0]
63 ; CHECK: @constant.array.f64 = constant [3 x double] [double -0.000000e+00, double 1.000000e+00, double 0.000000e+00]
64 @constant.array.f64 = constant [3 x double] [double -0.0, double 1.0, double 0.0]
66 ; CHECK: @constant.vector.i8 = constant <3 x i8> <i8 0, i8 1, i8 0>
67 @constant.vector.i8 = constant <3 x i8> <i8 -0, i8 1, i8 0>
68 ; CHECK: @constant.vector.i16 = constant <3 x i16> <i16 0, i16 1, i16 0>
69 @constant.vector.i16 = constant <3 x i16> <i16 -0, i16 1, i16 0>
70 ; CHECK: @constant.vector.i32 = constant <3 x i32> <i32 0, i32 1, i32 0>
71 @constant.vector.i32 = constant <3 x i32> <i32 -0, i32 1, i32 0>
72 ; CHECK: @constant.vector.i64 = constant <3 x i64> <i64 0, i64 1, i64 0>
73 @constant.vector.i64 = constant <3 x i64> <i64 -0, i64 1, i64 0>
74 ; CHECK: @constant.vector.f16 = constant <3 x half> <half 0xH8000, half 0xH3C00, half 0xH0000>
75 @constant.vector.f16 = constant <3 x half> <half -0.0, half 1.0, half 0.0>
76 ; CHECK: @constant.vector.f32 = constant <3 x float> <float -0.000000e+00, float 1.000000e+00, float 0.000000e+00>
77 @constant.vector.f32 = constant <3 x float> <float -0.0, float 1.0, float 0.0>
78 ; CHECK: @constant.vector.f64 = constant <3 x double> <double -0.000000e+00, double 1.000000e+00, double 0.000000e+00>
79 @constant.vector.f64 = constant <3 x double> <double -0.0, double 1.0, double 0.0>
82 ; Format: [@<GlobalVarName> =] [Linkage] [Visibility] [DLLStorageClass]
83 ; [ThreadLocal] [unnamed_addr] [AddrSpace] [ExternallyInitialized]
84 ; <global | constant> <Type> [<InitializerConstant>]
85 ; [, section "name"] [, comdat [($name)]] [, align <Alignment>]
87 ; Global Variables -- Simple
89 ; CHECK: @g1 = global i32 0
91 ; CHECK: @g2 = constant i32 0
93 ; Global Variables -- Linkage
94 @g.private = private global i32 0
95 ; CHECK: @g.private = private global i32 0
96 @g.internal = internal global i32 0
97 ; CHECK: @g.internal = internal global i32 0
98 @g.available_externally = available_externally global i32 0
99 ; CHECK: @g.available_externally = available_externally global i32 0
100 @g.linkonce = linkonce global i32 0
101 ; CHECK: @g.linkonce = linkonce global i32 0
102 @g.weak = weak global i32 0
103 ; CHECK: @g.weak = weak global i32 0
104 @g.common = common global i32 0
105 ; CHECK: @g.common = common global i32 0
106 @g.appending = appending global [4 x i8] c"test"
107 ; CHECK: @g.appending = appending global [4 x i8] c"test"
108 @g.extern_weak = extern_weak global i32
109 ; CHECK: @g.extern_weak = extern_weak global i32
110 @g.linkonce_odr = linkonce_odr global i32 0
111 ; CHECK: @g.linkonce_odr = linkonce_odr global i32 0
112 @g.weak_odr = weak_odr global i32 0
113 ; CHECK: @g.weak_odr = weak_odr global i32 0
114 @g.external = external global i32
115 ; CHECK: @g.external = external global i32
117 ; Global Variables -- Visibility
118 @g.default = default global i32 0
119 ; CHECK: @g.default = global i32 0
120 @g.hidden = hidden global i32 0
121 ; CHECK: @g.hidden = hidden global i32 0
122 @g.protected = protected global i32 0
123 ; CHECK: @g.protected = protected global i32 0
125 ; Global Variables -- DLLStorageClass
126 @g.dlldefault = default global i32 0
127 ; CHECK: @g.dlldefault = global i32 0
128 @g.dllimport = external dllimport global i32
129 ; CHECK: @g.dllimport = external dllimport global i32
130 @g.dllexport = dllexport global i32 0
131 ; CHECK: @g.dllexport = dllexport global i32 0
133 ; Global Variables -- ThreadLocal
134 @g.notthreadlocal = global i32 0
135 ; CHECK: @g.notthreadlocal = global i32 0
136 @g.generaldynamic = thread_local global i32 0
137 ; CHECK: @g.generaldynamic = thread_local global i32 0
138 @g.localdynamic = thread_local(localdynamic) global i32 0
139 ; CHECK: @g.localdynamic = thread_local(localdynamic) global i32 0
140 @g.initialexec = thread_local(initialexec) global i32 0
141 ; CHECK: @g.initialexec = thread_local(initialexec) global i32 0
142 @g.localexec = thread_local(localexec) global i32 0
143 ; CHECK: @g.localexec = thread_local(localexec) global i32 0
145 ; Global Variables -- unnamed_addr
146 @g.unnamed_addr = unnamed_addr global i32 0
147 ; CHECK: @g.unnamed_addr = unnamed_addr global i32 0
149 ; Global Variables -- AddrSpace
150 @g.addrspace = addrspace(1) global i32 0
151 ; CHECK: @g.addrspace = addrspace(1) global i32 0
153 ; Global Variables -- ExternallyInitialized
154 @g.externally_initialized = external externally_initialized global i32
155 ; CHECK: @g.externally_initialized = external externally_initialized global i32
157 ; Global Variables -- section
158 @g.section = global i32 0, section "_DATA"
159 ; CHECK: @g.section = global i32 0, section "_DATA"
161 ; Global Variables -- comdat
162 @comdat.any = global i32 0, comdat
163 ; CHECK: @comdat.any = global i32 0, comdat
164 @comdat.exactmatch = global i32 0, comdat
165 ; CHECK: @comdat.exactmatch = global i32 0, comdat
166 @comdat.largest = global i32 0, comdat
167 ; CHECK: @comdat.largest = global i32 0, comdat
168 @comdat.noduplicates = global i32 0, comdat
169 ; CHECK: @comdat.noduplicates = global i32 0, comdat
170 @comdat.samesize = global i32 0, comdat
171 ; CHECK: @comdat.samesize = global i32 0, comdat
173 ; Force two globals from different comdats into sections with the same name.
174 $comdat1 = comdat any
175 $comdat2 = comdat any
176 @g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1)
177 ; CHECK: @g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1)
178 @g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2)
179 ; CHECK: @g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2)
181 ; Global Variables -- align
182 @g.align = global i32 0, align 4
183 ; CHECK: @g.align = global i32 0, align 4
185 ; Global Variables -- Intrinsics
186 %pri.func.data = type { i32, void ()*, i8* }
187 @g.used1 = global i32 0
188 @g.used2 = global i32 0
189 @g.used3 = global i8 0
191 @llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata"
192 ; CHECK: @llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata"
193 @llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata"
194 ; CHECK: @llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata"
195 @llvm.global_ctors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata"
196 ; CHECK: @llvm.global_ctors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata"
197 @llvm.global_dtors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata"
198 ; CHECK: @llvm.global_dtors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata"
201 ; Format: @<Name> = [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal]
202 ; [unnamed_addr] alias <AliaseeTy> @<Aliasee>
205 @a.private = private alias i32, i32* @g.private
206 ; CHECK: @a.private = private alias i32, i32* @g.private
207 @a.internal = internal alias i32, i32* @g.internal
208 ; CHECK: @a.internal = internal alias i32, i32* @g.internal
209 @a.linkonce = linkonce alias i32, i32* @g.linkonce
210 ; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce
211 @a.weak = weak alias i32, i32* @g.weak
212 ; CHECK: @a.weak = weak alias i32, i32* @g.weak
213 @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
214 ; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
215 @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
216 ; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
217 @a.external = external alias i32, i32* @g1
218 ; CHECK: @a.external = alias i32, i32* @g1
220 ; Aliases -- Visibility
221 @a.default = default alias i32, i32* @g.default
222 ; CHECK: @a.default = alias i32, i32* @g.default
223 @a.hidden = hidden alias i32, i32* @g.hidden
224 ; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden
225 @a.protected = protected alias i32, i32* @g.protected
226 ; CHECK: @a.protected = protected alias i32, i32* @g.protected
228 ; Aliases -- DLLStorageClass
229 @a.dlldefault = default alias i32, i32* @g.dlldefault
230 ; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault
231 @a.dllimport = dllimport alias i32, i32* @g1
232 ; CHECK: @a.dllimport = dllimport alias i32, i32* @g1
233 @a.dllexport = dllexport alias i32, i32* @g.dllexport
234 ; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport
236 ; Aliases -- ThreadLocal
237 @a.notthreadlocal = alias i32, i32* @g.notthreadlocal
238 ; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal
239 @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
240 ; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
241 @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
242 ; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
243 @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
244 ; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
245 @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
246 ; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
248 ; Aliases -- unnamed_addr
249 @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
250 ; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
253 ; Format: define [linkage] [visibility] [DLLStorageClass]
254 ; [cconv] [ret attrs]
255 ; <ResultType> @<FunctionName> ([argument list])
256 ; [unnamed_addr] [fn Attrs] [section "name"] [comdat [($name)]]
257 ; [align N] [gc] [prefix Constant] [prologue Constant]
258 ; [personality Constant] { ... }
260 ; Functions -- Simple
262 ; CHECK: declare void @f1()
265 ; CHECK: define void @f2()
270 ; Functions -- linkage
271 define private void @f.private() {
272 ; CHECK: define private void @f.private()
276 define internal void @f.internal() {
277 ; CHECK: define internal void @f.internal()
281 define available_externally void @f.available_externally() {
282 ; CHECK: define available_externally void @f.available_externally()
286 define linkonce void @f.linkonce() {
287 ; CHECK: define linkonce void @f.linkonce()
291 define weak void @f.weak() {
292 ; CHECK: define weak void @f.weak()
296 define linkonce_odr void @f.linkonce_odr() {
297 ; CHECK: define linkonce_odr void @f.linkonce_odr()
301 define weak_odr void @f.weak_odr() {
302 ; CHECK: define weak_odr void @f.weak_odr()
306 declare external void @f.external()
307 ; CHECK: declare void @f.external()
308 declare extern_weak void @f.extern_weak()
309 ; CHECK: declare extern_weak void @f.extern_weak()
311 ; Functions -- visibility
312 declare default void @f.default()
313 ; CHECK: declare void @f.default()
314 declare hidden void @f.hidden()
315 ; CHECK: declare hidden void @f.hidden()
316 declare protected void @f.protected()
317 ; CHECK: declare protected void @f.protected()
319 ; Functions -- DLLStorageClass
320 declare dllimport void @f.dllimport()
321 ; CHECK: declare dllimport void @f.dllimport()
322 declare dllexport void @f.dllexport()
323 ; CHECK: declare dllexport void @f.dllexport()
325 ; Functions -- cconv (Calling conventions)
326 declare ccc void @f.ccc()
327 ; CHECK: declare void @f.ccc()
328 declare fastcc void @f.fastcc()
329 ; CHECK: declare fastcc void @f.fastcc()
330 declare coldcc void @f.coldcc()
331 ; CHECK: declare coldcc void @f.coldcc()
332 declare cc10 void @f.cc10()
333 ; CHECK: declare ghccc void @f.cc10()
334 declare ghccc void @f.ghccc()
335 ; CHECK: declare ghccc void @f.ghccc()
336 declare cc11 void @f.cc11()
337 ; CHECK: declare cc11 void @f.cc11()
338 declare webkit_jscc void @f.webkit_jscc()
339 ; CHECK: declare webkit_jscc void @f.webkit_jscc()
340 declare anyregcc void @f.anyregcc()
341 ; CHECK: declare anyregcc void @f.anyregcc()
342 declare preserve_mostcc void @f.preserve_mostcc()
343 ; CHECK: declare preserve_mostcc void @f.preserve_mostcc()
344 declare preserve_allcc void @f.preserve_allcc()
345 ; CHECK: declare preserve_allcc void @f.preserve_allcc()
346 declare cc64 void @f.cc64()
347 ; CHECK: declare x86_stdcallcc void @f.cc64()
348 declare x86_stdcallcc void @f.x86_stdcallcc()
349 ; CHECK: declare x86_stdcallcc void @f.x86_stdcallcc()
350 declare cc65 void @f.cc65()
351 ; CHECK: declare x86_fastcallcc void @f.cc65()
352 declare x86_fastcallcc void @f.x86_fastcallcc()
353 ; CHECK: declare x86_fastcallcc void @f.x86_fastcallcc()
354 declare cc66 void @f.cc66()
355 ; CHECK: declare arm_apcscc void @f.cc66()
356 declare arm_apcscc void @f.arm_apcscc()
357 ; CHECK: declare arm_apcscc void @f.arm_apcscc()
358 declare cc67 void @f.cc67()
359 ; CHECK: declare arm_aapcscc void @f.cc67()
360 declare arm_aapcscc void @f.arm_aapcscc()
361 ; CHECK: declare arm_aapcscc void @f.arm_aapcscc()
362 declare cc68 void @f.cc68()
363 ; CHECK: declare arm_aapcs_vfpcc void @f.cc68()
364 declare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc()
365 ; CHECK: declare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc()
366 declare cc69 void @f.cc69()
367 ; CHECK: declare msp430_intrcc void @f.cc69()
368 declare msp430_intrcc void @f.msp430_intrcc()
369 ; CHECK: declare msp430_intrcc void @f.msp430_intrcc()
370 declare cc70 void @f.cc70()
371 ; CHECK: declare x86_thiscallcc void @f.cc70()
372 declare x86_thiscallcc void @f.x86_thiscallcc()
373 ; CHECK: declare x86_thiscallcc void @f.x86_thiscallcc()
374 declare cc71 void @f.cc71()
375 ; CHECK: declare ptx_kernel void @f.cc71()
376 declare ptx_kernel void @f.ptx_kernel()
377 ; CHECK: declare ptx_kernel void @f.ptx_kernel()
378 declare cc72 void @f.cc72()
379 ; CHECK: declare ptx_device void @f.cc72()
380 declare ptx_device void @f.ptx_device()
381 ; CHECK: declare ptx_device void @f.ptx_device()
382 declare cc75 void @f.cc75()
383 ; CHECK: declare spir_func void @f.cc75()
384 declare spir_func void @f.spir_func()
385 ; CHECK: declare spir_func void @f.spir_func()
386 declare cc76 void @f.cc76()
387 ; CHECK: declare spir_kernel void @f.cc76()
388 declare spir_kernel void @f.spir_kernel()
389 ; CHECK: declare spir_kernel void @f.spir_kernel()
390 declare cc77 void @f.cc77()
391 ; CHECK: declare intel_ocl_bicc void @f.cc77()
392 declare intel_ocl_bicc void @f.intel_ocl_bicc()
393 ; CHECK: declare intel_ocl_bicc void @f.intel_ocl_bicc()
394 declare cc78 void @f.cc78()
395 ; CHECK: declare x86_64_sysvcc void @f.cc78()
396 declare x86_64_sysvcc void @f.x86_64_sysvcc()
397 ; CHECK: declare x86_64_sysvcc void @f.x86_64_sysvcc()
398 declare cc79 void @f.cc79()
399 ; CHECK: declare x86_64_win64cc void @f.cc79()
400 declare x86_64_win64cc void @f.x86_64_win64cc()
401 ; CHECK: declare x86_64_win64cc void @f.x86_64_win64cc()
402 declare cc80 void @f.cc80()
403 ; CHECK: declare x86_vectorcallcc void @f.cc80()
404 declare x86_vectorcallcc void @f.x86_vectorcallcc()
405 ; CHECK: declare x86_vectorcallcc void @f.x86_vectorcallcc()
406 declare cc1023 void @f.cc1023()
407 ; CHECK: declare cc1023 void @f.cc1023()
409 ; Functions -- ret attrs (Return attributes)
410 declare zeroext i64 @f.zeroext()
411 ; CHECK: declare zeroext i64 @f.zeroext()
412 declare signext i64 @f.signext()
413 ; CHECK: declare signext i64 @f.signext()
414 declare inreg i32* @f.inreg()
415 ; CHECK: declare inreg i32* @f.inreg()
416 declare noalias i32* @f.noalias()
417 ; CHECK: declare noalias i32* @f.noalias()
418 declare nonnull i32* @f.nonnull()
419 ; CHECK: declare nonnull i32* @f.nonnull()
420 declare dereferenceable(4) i32* @f.dereferenceable4()
421 ; CHECK: declare dereferenceable(4) i32* @f.dereferenceable4()
422 declare dereferenceable(8) i32* @f.dereferenceable8()
423 ; CHECK: declare dereferenceable(8) i32* @f.dereferenceable8()
424 declare dereferenceable(16) i32* @f.dereferenceable16()
425 ; CHECK: declare dereferenceable(16) i32* @f.dereferenceable16()
426 declare dereferenceable_or_null(4) i32* @f.dereferenceable4_or_null()
427 ; CHECK: declare dereferenceable_or_null(4) i32* @f.dereferenceable4_or_null()
428 declare dereferenceable_or_null(8) i32* @f.dereferenceable8_or_null()
429 ; CHECK: declare dereferenceable_or_null(8) i32* @f.dereferenceable8_or_null()
430 declare dereferenceable_or_null(16) i32* @f.dereferenceable16_or_null()
431 ; CHECK: declare dereferenceable_or_null(16) i32* @f.dereferenceable16_or_null()
433 ; Functions -- Parameter attributes
434 declare void @f.param.zeroext(i8 zeroext)
435 ; CHECK: declare void @f.param.zeroext(i8 zeroext)
436 declare void @f.param.signext(i8 signext)
437 ; CHECK: declare void @f.param.signext(i8 signext)
438 declare void @f.param.inreg(i8 inreg)
439 ; CHECK: declare void @f.param.inreg(i8 inreg)
440 declare void @f.param.byval({ i8, i8 }* byval)
441 ; CHECK: declare void @f.param.byval({ i8, i8 }* byval)
442 declare void @f.param.inalloca(i8* inalloca)
443 ; CHECK: declare void @f.param.inalloca(i8* inalloca)
444 declare void @f.param.sret(i8* sret)
445 ; CHECK: declare void @f.param.sret(i8* sret)
446 declare void @f.param.noalias(i8* noalias)
447 ; CHECK: declare void @f.param.noalias(i8* noalias)
448 declare void @f.param.nocapture(i8* nocapture)
449 ; CHECK: declare void @f.param.nocapture(i8* nocapture)
450 declare void @f.param.nest(i8* nest)
451 ; CHECK: declare void @f.param.nest(i8* nest)
452 declare i8* @f.param.returned(i8* returned)
453 ; CHECK: declare i8* @f.param.returned(i8* returned)
454 declare void @f.param.nonnull(i8* nonnull)
455 ; CHECK: declare void @f.param.nonnull(i8* nonnull)
456 declare void @f.param.dereferenceable(i8* dereferenceable(4))
457 ; CHECK: declare void @f.param.dereferenceable(i8* dereferenceable(4))
458 declare void @f.param.dereferenceable_or_null(i8* dereferenceable_or_null(4))
459 ; CHECK: declare void @f.param.dereferenceable_or_null(i8* dereferenceable_or_null(4))
461 ; Functions -- unnamed_addr
462 declare void @f.unnamed_addr() unnamed_addr
463 ; CHECK: declare void @f.unnamed_addr() unnamed_addr
465 ; Functions -- fn Attrs (Function attributes)
466 declare void @f.alignstack4() alignstack(4)
467 ; CHECK: declare void @f.alignstack4() #0
468 declare void @f.alignstack8() alignstack(8)
469 ; CHECK: declare void @f.alignstack8() #1
470 declare void @f.alwaysinline() alwaysinline
471 ; CHECK: declare void @f.alwaysinline() #2
472 declare void @f.cold() cold
473 ; CHECK: declare void @f.cold() #3
474 declare void @f.convergent() convergent
475 ; CHECK: declare void @f.convergent() #4
476 declare void @f.inlinehint() inlinehint
477 ; CHECK: declare void @f.inlinehint() #5
478 declare void @f.jumptable() unnamed_addr jumptable
479 ; CHECK: declare void @f.jumptable() unnamed_addr #6
480 declare void @f.minsize() minsize
481 ; CHECK: declare void @f.minsize() #7
482 declare void @f.naked() naked
483 ; CHECK: declare void @f.naked() #8
484 declare void @f.nobuiltin() nobuiltin
485 ; CHECK: declare void @f.nobuiltin() #9
486 declare void @f.noduplicate() noduplicate
487 ; CHECK: declare void @f.noduplicate() #10
488 declare void @f.noimplicitfloat() noimplicitfloat
489 ; CHECK: declare void @f.noimplicitfloat() #11
490 declare void @f.noinline() noinline
491 ; CHECK: declare void @f.noinline() #12
492 declare void @f.nonlazybind() nonlazybind
493 ; CHECK: declare void @f.nonlazybind() #13
494 declare void @f.noredzone() noredzone
495 ; CHECK: declare void @f.noredzone() #14
496 declare void @f.noreturn() noreturn
497 ; CHECK: declare void @f.noreturn() #15
498 declare void @f.nounwind() nounwind
499 ; CHECK: declare void @f.nounwind() #16
500 declare void @f.optnone() noinline optnone
501 ; CHECK: declare void @f.optnone() #17
502 declare void @f.optsize() optsize
503 ; CHECK: declare void @f.optsize() #18
504 declare void @f.readnone() readnone
505 ; CHECK: declare void @f.readnone() #19
506 declare void @f.readonly() readonly
507 ; CHECK: declare void @f.readonly() #20
508 declare void @f.returns_twice() returns_twice
509 ; CHECK: declare void @f.returns_twice() #21
510 declare void @f.safestack() safestack
511 ; CHECK: declare void @f.safestack() #22
512 declare void @f.sanitize_address() sanitize_address
513 ; CHECK: declare void @f.sanitize_address() #23
514 declare void @f.sanitize_memory() sanitize_memory
515 ; CHECK: declare void @f.sanitize_memory() #24
516 declare void @f.sanitize_thread() sanitize_thread
517 ; CHECK: declare void @f.sanitize_thread() #25
518 declare void @f.ssp() ssp
519 ; CHECK: declare void @f.ssp() #26
520 declare void @f.sspreq() sspreq
521 ; CHECK: declare void @f.sspreq() #27
522 declare void @f.sspstrong() sspstrong
523 ; CHECK: declare void @f.sspstrong() #28
524 declare void @f.thunk() "thunk"
525 ; CHECK: declare void @f.thunk() #29
526 declare void @f.uwtable() uwtable
527 ; CHECK: declare void @f.uwtable() #30
528 declare void @f.kvpair() "cpu"="cortex-a8"
529 ; CHECK:declare void @f.kvpair() #31
530 declare void @f.norecurse() norecurse
531 ; CHECK: declare void @f.norecurse() #32
532 declare void @f.inaccessiblememonly() inaccessiblememonly
533 ; CHECK: declare void @f.inaccessiblememonly() #33
534 declare void @f.inaccessiblemem_or_argmemonly() inaccessiblemem_or_argmemonly
535 ; CHECK: declare void @f.inaccessiblemem_or_argmemonly() #34
537 ; Functions -- section
538 declare void @f.section() section "80"
539 ; CHECK: declare void @f.section() section "80"
541 ; Functions -- comdat
542 define void @f.comdat_any() comdat($comdat.any) {
543 ; CHECK: define void @f.comdat_any() comdat($comdat.any)
547 define void @f.comdat_exactmatch() comdat($comdat.exactmatch) {
548 ; CHECK: define void @f.comdat_exactmatch() comdat($comdat.exactmatch)
552 define void @f.comdat_largest() comdat($comdat.largest) {
553 ; CHECK: define void @f.comdat_largest() comdat($comdat.largest)
557 define void @f.comdat_noduplicates() comdat($comdat.noduplicates) {
558 ; CHECK: define void @f.comdat_noduplicates() comdat($comdat.noduplicates)
562 define void @f.comdat_samesize() comdat($comdat.samesize) {
563 ; CHECK: define void @f.comdat_samesize() comdat($comdat.samesize)
569 declare void @f.align2() align 2
570 ; CHECK: declare void @f.align2() align 2
571 declare void @f.align4() align 4
572 ; CHECK: declare void @f.align4() align 4
573 declare void @f.align8() align 8
574 ; CHECK: declare void @f.align8() align 8
577 declare void @f.gcshadow() gc "shadow-stack"
578 ; CHECK: declare void @f.gcshadow() gc "shadow-stack"
580 ; Functions -- Prefix data
581 declare void @f.prefixi32() prefix i32 1684365668
582 ; CHECK: declare void @f.prefixi32() prefix i32 1684365668
583 declare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3]
584 ; CHECK: declare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3]
586 ; Functions -- Prologue data
587 declare void @f.prologuei32() prologue i32 1684365669
588 ; CHECK: declare void @f.prologuei32() prologue i32 1684365669
589 declare void @f.prologuearray() prologue [4 x i32] [i32 0, i32 1, i32 2, i32 3]
590 ; CHECK: declare void @f.prologuearray() prologue [4 x i32] [i32 0, i32 1, i32 2, i32 3]
592 ; Functions -- Personality constant
593 declare void @llvm.donothing() nounwind readnone
594 ; CHECK: declare void @llvm.donothing() #35
595 define void @f.no_personality() personality i8 3 {
596 ; CHECK: define void @f.no_personality() personality i8 3
597 invoke void @llvm.donothing() to label %normal unwind label %exception
599 %cleanup = landingpad i8 cleanup
605 declare i32 @f.personality_handler()
606 ; CHECK: declare i32 @f.personality_handler()
607 define void @f.personality() personality i32 ()* @f.personality_handler {
608 ; CHECK: define void @f.personality() personality i32 ()* @f.personality_handler
609 invoke void @llvm.donothing() to label %normal unwind label %exception
611 %cleanup = landingpad i32 cleanup
617 ;; Atomic Memory Ordering Constraints
618 define void @atomics(i32* %word) {
619 %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic
620 ; CHECK: %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic
621 %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic
622 ; CHECK: %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic
623 %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic
624 ; CHECK: %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic
625 %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic
626 ; CHECK: %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic
627 %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic
628 ; CHECK: %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic
629 %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic
630 ; CHECK: %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic
631 %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic
632 ; CHECK: %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic
633 %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 singlethread seq_cst monotonic
634 ; CHECK: %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 singlethread seq_cst monotonic
635 %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic
636 ; CHECK: %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic
637 %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic
638 ; CHECK: %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic
639 %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic
640 ; CHECK: %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic
641 %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic
642 ; CHECK: %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic
643 %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic
644 ; CHECK: %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic
645 %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic
646 ; CHECK: %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic
647 %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic
648 ; CHECK: %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic
649 %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic
650 ; CHECK: %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic
651 %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic
652 ; CHECK: %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic
653 %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 singlethread monotonic
654 ; CHECK: %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 singlethread monotonic
655 %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 singlethread monotonic
656 ; CHECK: %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 singlethread monotonic
658 ; CHECK: fence acquire
660 ; CHECK: fence release
662 ; CHECK: fence acq_rel
663 fence singlethread seq_cst
664 ; CHECK: fence singlethread seq_cst
666 %ld.1 = load atomic i32, i32* %word monotonic, align 4
667 ; CHECK: %ld.1 = load atomic i32, i32* %word monotonic, align 4
668 %ld.2 = load atomic volatile i32, i32* %word acquire, align 8
669 ; CHECK: %ld.2 = load atomic volatile i32, i32* %word acquire, align 8
670 %ld.3 = load atomic volatile i32, i32* %word singlethread seq_cst, align 16
671 ; CHECK: %ld.3 = load atomic volatile i32, i32* %word singlethread seq_cst, align 16
673 store atomic i32 23, i32* %word monotonic, align 4
674 ; CHECK: store atomic i32 23, i32* %word monotonic, align 4
675 store atomic volatile i32 24, i32* %word monotonic, align 4
676 ; CHECK: store atomic volatile i32 24, i32* %word monotonic, align 4
677 store atomic volatile i32 25, i32* %word singlethread monotonic, align 4
678 ; CHECK: store atomic volatile i32 25, i32* %word singlethread monotonic, align 4
683 define void @fastmathflags(float %op1, float %op2) {
684 %f.nnan = fadd nnan float %op1, %op2
685 ; CHECK: %f.nnan = fadd nnan float %op1, %op2
686 %f.ninf = fadd ninf float %op1, %op2
687 ; CHECK: %f.ninf = fadd ninf float %op1, %op2
688 %f.nsz = fadd nsz float %op1, %op2
689 ; CHECK: %f.nsz = fadd nsz float %op1, %op2
690 %f.arcp = fadd arcp float %op1, %op2
691 ; CHECK: %f.arcp = fadd arcp float %op1, %op2
692 %f.fast = fadd fast float %op1, %op2
693 ; CHECK: %f.fast = fadd fast float %op1, %op2
697 ; Check various fast math flags and floating-point types on calls.
699 declare float @fmf1()
700 declare double @fmf2()
701 declare <4 x double> @fmf3()
703 ; CHECK-LABEL: fastMathFlagsForCalls(
704 define void @fastMathFlagsForCalls(float %f, double %d1, <4 x double> %d2) {
705 %call.fast = call fast float @fmf1()
706 ; CHECK: %call.fast = call fast float @fmf1()
708 ; Throw in some other attributes to make sure those stay in the right places.
710 %call.nsz.arcp = notail call nsz arcp double @fmf2()
711 ; CHECK: %call.nsz.arcp = notail call nsz arcp double @fmf2()
713 %call.nnan.ninf = tail call nnan ninf fastcc <4 x double> @fmf3()
714 ; CHECK: %call.nnan.ninf = tail call nnan ninf fastcc <4 x double> @fmf3()
720 %opaquety = type opaque
721 define void @typesystem() {
722 %p0 = bitcast i8* null to i32 (i32)*
723 ; CHECK: %p0 = bitcast i8* null to i32 (i32)*
724 %p1 = bitcast i8* null to void (i8*)*
725 ; CHECK: %p1 = bitcast i8* null to void (i8*)*
726 %p2 = bitcast i8* null to i32 (i8*, ...)*
727 ; CHECK: %p2 = bitcast i8* null to i32 (i8*, ...)*
728 %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)*
729 ; CHECK: %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)*
730 %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)*
731 ; CHECK: %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)*
732 %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)*
733 ; CHECK: %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)*
735 %t0 = alloca i1942652
736 ; CHECK: %t0 = alloca i1942652
738 ; CHECK: %t1 = alloca half
740 ; CHECK: %t2 = alloca float
742 ; CHECK: %t3 = alloca double
744 ; CHECK: %t4 = alloca fp128
745 %t5 = alloca x86_fp80
746 ; CHECK: %t5 = alloca x86_fp80
747 %t6 = alloca ppc_fp128
748 ; CHECK: %t6 = alloca ppc_fp128
750 ; CHECK: %t7 = alloca x86_mmx
751 %t8 = alloca %opaquety*
752 ; CHECK: %t8 = alloca %opaquety*
757 declare void @llvm.token(token)
758 ; CHECK: declare void @llvm.token(token)
760 ;; Inline Assembler Expressions
761 define void @inlineasm(i32 %arg) {
762 call i32 asm "bswap $0", "=r,r"(i32 %arg)
763 ; CHECK: call i32 asm "bswap $0", "=r,r"(i32 %arg)
764 call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg)
765 ; CHECK: call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg)
771 ; Instructions -- Terminators
772 define void @instructions.terminators(i8 %val) personality i32 -10 {
773 br i1 false, label %iftrue, label %iffalse
774 ; CHECK: br i1 false, label %iftrue, label %iffalse
776 ; CHECK: br label %iftrue
782 switch i8 %val, label %defaultdest [
783 ; CHECK: switch i8 %val, label %defaultdest [
784 i8 0, label %defaultdest.0
785 ; CHECK: i8 0, label %defaultdest.0
786 i8 1, label %defaultdest.1
787 ; CHECK: i8 1, label %defaultdest.1
788 i8 2, label %defaultdest.2
789 ; CHECK: i8 2, label %defaultdest.2
800 indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2]
801 ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2]
802 indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2]
803 ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2]
805 invoke fastcc void @f.fastcc()
806 ; CHECK: invoke fastcc void @f.fastcc()
807 to label %defaultdest unwind label %exc
808 ; CHECK: to label %defaultdest unwind label %exc
810 %cleanup = landingpad i32 cleanup
813 ; CHECK: resume i32 undef
820 define i32 @instructions.win_eh.1() personality i32 -3 {
824 invoke void @f.ccc() to label %normal unwind label %catchswitch1
825 invoke void @f.ccc() to label %normal unwind label %catchswitch2
826 invoke void @f.ccc() to label %normal unwind label %catchswitch3
829 %cs1 = catchswitch within none [label %catchpad1] unwind to caller
832 catchpad within %cs1 []
834 ; CHECK: catchpad within %cs1 []
835 ; CHECK-NEXT: br label %normal
838 %cs2 = catchswitch within none [label %catchpad2] unwind to caller
841 catchpad within %cs2 [i32* %arg1]
843 ; CHECK: catchpad within %cs2 [i32* %arg1]
844 ; CHECK-NEXT: br label %normal
847 %cs3 = catchswitch within none [label %catchpad3] unwind label %cleanuppad1
850 catchpad within %cs3 [i32* %arg1, i32* %arg2]
852 ; CHECK: catchpad within %cs3 [i32* %arg1, i32* %arg2]
853 ; CHECK-NEXT: br label %normal
856 %clean.1 = cleanuppad within none []
858 ; CHECK: %clean.1 = cleanuppad within none []
859 ; CHECK-NEXT: unreachable
865 define i32 @instructions.win_eh.2() personality i32 -4 {
867 invoke void @f.ccc() to label %invoke.cont unwind label %catchswitch
870 invoke void @f.ccc() to label %continue unwind label %cleanup
873 %clean = cleanuppad within none []
874 ; CHECK: %clean = cleanuppad within none []
875 cleanupret from %clean unwind to caller
876 ; CHECK: cleanupret from %clean unwind to caller
879 %cs = catchswitch within none [label %catchpad] unwind label %terminate
882 %catch = catchpad within %cs []
884 ; CHECK: %catch = catchpad within %cs []
885 ; CHECK-NEXT: br label %body
888 invoke void @f.ccc() [ "funclet"(token %catch) ]
889 to label %continue unwind label %terminate.inner
890 catchret from %catch to label %return
891 ; CHECK: catchret from %catch to label %return
897 cleanuppad within %catch []
899 ; CHECK: cleanuppad within %catch []
900 ; CHECK-NEXT: unreachable
903 cleanuppad within none []
905 ; CHECK: cleanuppad within none []
906 ; CHECK-NEXT: unreachable
912 ; Instructions -- Binary Operations
913 define void @instructions.binops(i8 %op1, i8 %op2) {
916 ; CHECK: add i8 %op1, %op2
917 add nuw i8 %op1, %op2
918 ; CHECK: add nuw i8 %op1, %op2
919 add nsw i8 %op1, %op2
920 ; CHECK: add nsw i8 %op1, %op2
921 add nuw nsw i8 %op1, %op2
922 ; CHECK: add nuw nsw i8 %op1, %op2
924 ; CHECK: sub i8 %op1, %op2
925 sub nuw i8 %op1, %op2
926 ; CHECK: sub nuw i8 %op1, %op2
927 sub nsw i8 %op1, %op2
928 ; CHECK: sub nsw i8 %op1, %op2
929 sub nuw nsw i8 %op1, %op2
930 ; CHECK: sub nuw nsw i8 %op1, %op2
932 ; CHECK: mul i8 %op1, %op2
933 mul nuw i8 %op1, %op2
934 ; CHECK: mul nuw i8 %op1, %op2
935 mul nsw i8 %op1, %op2
936 ; CHECK: mul nsw i8 %op1, %op2
937 mul nuw nsw i8 %op1, %op2
938 ; CHECK: mul nuw nsw i8 %op1, %op2
942 ; CHECK: udiv i8 %op1, %op2
943 udiv exact i8 %op1, %op2
944 ; CHECK: udiv exact i8 %op1, %op2
946 ; CHECK: sdiv i8 %op1, %op2
947 sdiv exact i8 %op1, %op2
948 ; CHECK: sdiv exact i8 %op1, %op2
952 ; CHECK: urem i8 %op1, %op2
954 ; CHECK: srem i8 %op1, %op2
959 ; Instructions -- Bitwise Binary Operations
960 define void @instructions.bitwise_binops(i8 %op1, i8 %op2) {
963 ; CHECK: shl i8 %op1, %op2
964 shl nuw i8 %op1, %op2
965 ; CHECK: shl nuw i8 %op1, %op2
966 shl nsw i8 %op1, %op2
967 ; CHECK: shl nsw i8 %op1, %op2
968 shl nuw nsw i8 %op1, %op2
969 ; CHECK: shl nuw nsw i8 %op1, %op2
973 ; CHECK: lshr i8 %op1, %op2
974 lshr exact i8 %op1, %op2
975 ; CHECK: lshr exact i8 %op1, %op2
977 ; CHECK: ashr i8 %op1, %op2
978 ashr exact i8 %op1, %op2
979 ; CHECK: ashr exact i8 %op1, %op2
983 ; CHECK: and i8 %op1, %op2
985 ; CHECK: or i8 %op1, %op2
987 ; CHECK: xor i8 %op1, %op2
992 ; Instructions -- Vector Operations
993 define void @instructions.vectorops(<4 x float> %vec, <4 x float> %vec2) {
994 extractelement <4 x float> %vec, i8 0
995 ; CHECK: extractelement <4 x float> %vec, i8 0
996 insertelement <4 x float> %vec, float 3.500000e+00, i8 0
997 ; CHECK: insertelement <4 x float> %vec, float 3.500000e+00, i8 0
998 shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer
999 ; CHECK: shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer
1004 ; Instructions -- Aggregate Operations
1005 define void @instructions.aggregateops({ i8, i32 } %up, <{ i8, i32 }> %p,
1006 [3 x i8] %arr, { i8, { i32 }} %n,
1007 <2 x i8*> %pvec, <2 x i64> %offsets) {
1008 extractvalue { i8, i32 } %up, 0
1009 ; CHECK: extractvalue { i8, i32 } %up, 0
1010 extractvalue <{ i8, i32 }> %p, 1
1011 ; CHECK: extractvalue <{ i8, i32 }> %p, 1
1012 extractvalue [3 x i8] %arr, 2
1013 ; CHECK: extractvalue [3 x i8] %arr, 2
1014 extractvalue { i8, { i32 } } %n, 1, 0
1015 ; CHECK: extractvalue { i8, { i32 } } %n, 1, 0
1017 insertvalue { i8, i32 } %up, i8 1, 0
1018 ; CHECK: insertvalue { i8, i32 } %up, i8 1, 0
1019 insertvalue <{ i8, i32 }> %p, i32 2, 1
1020 ; CHECK: insertvalue <{ i8, i32 }> %p, i32 2, 1
1021 insertvalue [3 x i8] %arr, i8 0, 0
1022 ; CHECK: insertvalue [3 x i8] %arr, i8 0, 0
1023 insertvalue { i8, { i32 } } %n, i32 0, 1, 0
1024 ; CHECK: insertvalue { i8, { i32 } } %n, i32 0, 1, 0
1026 %up.ptr = alloca { i8, i32 }
1027 %p.ptr = alloca <{ i8, i32 }>
1028 %arr.ptr = alloca [3 x i8]
1029 %n.ptr = alloca { i8, { i32 } }
1031 getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0
1032 ; CHECK: getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0
1033 getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1
1034 ; CHECK: getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1
1035 getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2
1036 ; CHECK: getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2
1037 getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1
1038 ; CHECK: getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1
1039 getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0
1040 ; CHECK: getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0
1041 getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets
1042 ; CHECK: getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets
1047 ; Instructions -- Memory Access and Addressing Operations
1051 define void @instructions.memops(i32** %base) {
1052 alloca i32, i8 4, align 4
1053 ; CHECK: alloca i32, i8 4, align 4
1054 alloca inalloca i32, i8 4, align 4
1055 ; CHECK: alloca inalloca i32, i8 4, align 4
1057 load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1058 ; CHECK: load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1059 load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1060 ; CHECK: load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1062 store i32* null, i32** %base, align 4, !nontemporal !8
1063 ; CHECK: store i32* null, i32** %base, align 4, !nontemporal !8
1064 store volatile i32* null, i32** %base, align 4, !nontemporal !8
1065 ; CHECK: store volatile i32* null, i32** %base, align 4, !nontemporal !8
1070 ; Instructions -- Conversion Operations
1071 define void @instructions.conversions() {
1073 ; CHECK: trunc i32 -1 to i1
1075 ; CHECK: zext i32 -1 to i64
1077 ; CHECK: sext i32 -1 to i64
1078 fptrunc float undef to half
1079 ; CHECK: fptrunc float undef to half
1080 fpext half undef to float
1081 ; CHECK: fpext half undef to float
1082 fptoui float undef to i32
1083 ; CHECK: fptoui float undef to i32
1084 fptosi float undef to i32
1085 ; CHECK: fptosi float undef to i32
1086 uitofp i32 1 to float
1087 ; CHECK: uitofp i32 1 to float
1088 sitofp i32 -1 to float
1089 ; CHECK: sitofp i32 -1 to float
1090 ptrtoint i8* null to i64
1091 ; CHECK: ptrtoint i8* null to i64
1092 inttoptr i64 0 to i8*
1093 ; CHECK: inttoptr i64 0 to i8*
1094 bitcast i32 0 to i32
1095 ; CHECK: bitcast i32 0 to i32
1096 addrspacecast i32* null to i32 addrspace(1)*
1097 ; CHECK: addrspacecast i32* null to i32 addrspace(1)*
1102 ; Instructions -- Other Operations
1103 define void @instructions.other(i32 %op1, i32 %op2, half %fop1, half %fop2) {
1105 icmp eq i32 %op1, %op2
1106 ; CHECK: icmp eq i32 %op1, %op2
1107 icmp ne i32 %op1, %op2
1108 ; CHECK: icmp ne i32 %op1, %op2
1109 icmp ugt i32 %op1, %op2
1110 ; CHECK: icmp ugt i32 %op1, %op2
1111 icmp uge i32 %op1, %op2
1112 ; CHECK: icmp uge i32 %op1, %op2
1113 icmp ult i32 %op1, %op2
1114 ; CHECK: icmp ult i32 %op1, %op2
1115 icmp ule i32 %op1, %op2
1116 ; CHECK: icmp ule i32 %op1, %op2
1117 icmp sgt i32 %op1, %op2
1118 ; CHECK: icmp sgt i32 %op1, %op2
1119 icmp sge i32 %op1, %op2
1120 ; CHECK: icmp sge i32 %op1, %op2
1121 icmp slt i32 %op1, %op2
1122 ; CHECK: icmp slt i32 %op1, %op2
1123 icmp sle i32 %op1, %op2
1124 ; CHECK: icmp sle i32 %op1, %op2
1126 fcmp false half %fop1, %fop2
1127 ; CHECK: fcmp false half %fop1, %fop2
1128 fcmp oeq half %fop1, %fop2
1129 ; CHECK: fcmp oeq half %fop1, %fop2
1130 fcmp ogt half %fop1, %fop2
1131 ; CHECK: fcmp ogt half %fop1, %fop2
1132 fcmp oge half %fop1, %fop2
1133 ; CHECK: fcmp oge half %fop1, %fop2
1134 fcmp olt half %fop1, %fop2
1135 ; CHECK: fcmp olt half %fop1, %fop2
1136 fcmp ole half %fop1, %fop2
1137 ; CHECK: fcmp ole half %fop1, %fop2
1138 fcmp one half %fop1, %fop2
1139 ; CHECK: fcmp one half %fop1, %fop2
1140 fcmp ord half %fop1, %fop2
1141 ; CHECK: fcmp ord half %fop1, %fop2
1142 fcmp ueq half %fop1, %fop2
1143 ; CHECK: fcmp ueq half %fop1, %fop2
1144 fcmp ugt half %fop1, %fop2
1145 ; CHECK: fcmp ugt half %fop1, %fop2
1146 fcmp uge half %fop1, %fop2
1147 ; CHECK: fcmp uge half %fop1, %fop2
1148 fcmp ult half %fop1, %fop2
1149 ; CHECK: fcmp ult half %fop1, %fop2
1150 fcmp ule half %fop1, %fop2
1151 ; CHECK: fcmp ule half %fop1, %fop2
1152 fcmp une half %fop1, %fop2
1153 ; CHECK: fcmp une half %fop1, %fop2
1154 fcmp uno half %fop1, %fop2
1155 ; CHECK: fcmp uno half %fop1, %fop2
1156 fcmp true half %fop1, %fop2
1157 ; CHECK: fcmp true half %fop1, %fop2
1161 %v1 = add i32 %op1, %op2
1164 %v2 = add i32 %op1, %op2
1167 phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ]
1168 ; CHECK: phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ]
1170 select i1 true, i32 0, i32 1
1171 ; CHECK: select i1 true, i32 0, i32 1
1172 select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
1173 ; CHECK: select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
1175 call void @f.nobuiltin() builtin
1176 ; CHECK: call void @f.nobuiltin() #39
1178 call fastcc noalias i32* @f.noalias() noinline
1179 ; CHECK: call fastcc noalias i32* @f.noalias() #12
1180 tail call ghccc nonnull i32* @f.nonnull() minsize
1181 ; CHECK: tail call ghccc nonnull i32* @f.nonnull() #7
1186 define void @instructions.call_musttail(i8* inalloca %val) {
1187 musttail call void @f.param.inalloca(i8* inalloca %val)
1188 ; CHECK: musttail call void @f.param.inalloca(i8* inalloca %val)
1193 define void @instructions.call_notail() {
1194 notail call void @f1()
1195 ; CHECK: notail call void @f1()
1200 define void @instructions.landingpad() personality i32 -2 {
1201 invoke void @llvm.donothing() to label %proceed unwind label %catch1
1202 invoke void @llvm.donothing() to label %proceed unwind label %catch2
1203 invoke void @llvm.donothing() to label %proceed unwind label %catch3
1204 invoke void @llvm.donothing() to label %proceed unwind label %catch4
1208 ; CHECK: landingpad i32
1215 ; CHECK: landingpad i32
1219 ; CHECK: catch i32* null
1224 ; CHECK: landingpad i32
1228 ; CHECK: catch i32* null
1230 ; CHECK: catch i32* null
1235 ; CHECK: landingpad i32
1236 filter [2 x i32] zeroinitializer
1237 ; CHECK: filter [2 x i32] zeroinitializer
1244 ;; Intrinsic Functions
1246 ; Intrinsic Functions -- Variable Argument Handling
1247 declare void @llvm.va_start(i8*)
1248 declare void @llvm.va_copy(i8*, i8*)
1249 declare void @llvm.va_end(i8*)
1250 define void @instructions.va_arg(i8* %v, ...) {
1252 %ap2 = bitcast i8** %ap to i8*
1254 call void @llvm.va_start(i8* %ap2)
1255 ; CHECK: call void @llvm.va_start(i8* %ap2)
1257 va_arg i8* %ap2, i32
1258 ; CHECK: va_arg i8* %ap2, i32
1260 call void @llvm.va_copy(i8* %v, i8* %ap2)
1261 ; CHECK: call void @llvm.va_copy(i8* %v, i8* %ap2)
1263 call void @llvm.va_end(i8* %ap2)
1264 ; CHECK: call void @llvm.va_end(i8* %ap2)
1269 ; Intrinsic Functions -- Accurate Garbage Collection
1270 declare void @llvm.gcroot(i8**, i8*)
1271 declare i8* @llvm.gcread(i8*, i8**)
1272 declare void @llvm.gcwrite(i8*, i8*, i8**)
1273 define void @intrinsics.gc() gc "shadow-stack" {
1274 %ptrloc = alloca i8*
1275 call void @llvm.gcroot(i8** %ptrloc, i8* null)
1276 ; CHECK: call void @llvm.gcroot(i8** %ptrloc, i8* null)
1278 call i8* @llvm.gcread(i8* null, i8** %ptrloc)
1279 ; CHECK: call i8* @llvm.gcread(i8* null, i8** %ptrloc)
1282 call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc)
1283 ; CHECK: call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc)
1288 ; Intrinsic Functions -- Code Generation
1289 declare i8* @llvm.returnaddress(i32)
1290 declare i8* @llvm.frameaddress(i32)
1291 declare i32 @llvm.read_register.i32(metadata)
1292 declare i64 @llvm.read_register.i64(metadata)
1293 declare void @llvm.write_register.i32(metadata, i32)
1294 declare void @llvm.write_register.i64(metadata, i64)
1295 declare i8* @llvm.stacksave()
1296 declare void @llvm.stackrestore(i8*)
1297 declare void @llvm.prefetch(i8*, i32, i32, i32)
1298 declare void @llvm.pcmarker(i32)
1299 declare i64 @llvm.readcyclecounter()
1300 declare void @llvm.clear_cache(i8*, i8*)
1301 declare void @llvm.instrprof_increment(i8*, i64, i32, i32)
1304 define void @intrinsics.codegen() {
1305 call i8* @llvm.returnaddress(i32 1)
1306 ; CHECK: call i8* @llvm.returnaddress(i32 1)
1307 call i8* @llvm.frameaddress(i32 1)
1308 ; CHECK: call i8* @llvm.frameaddress(i32 1)
1310 call i32 @llvm.read_register.i32(metadata !10)
1311 ; CHECK: call i32 @llvm.read_register.i32(metadata !10)
1312 call i64 @llvm.read_register.i64(metadata !10)
1313 ; CHECK: call i64 @llvm.read_register.i64(metadata !10)
1314 call void @llvm.write_register.i32(metadata !10, i32 0)
1315 ; CHECK: call void @llvm.write_register.i32(metadata !10, i32 0)
1316 call void @llvm.write_register.i64(metadata !10, i64 0)
1317 ; CHECK: call void @llvm.write_register.i64(metadata !10, i64 0)
1319 %stack = call i8* @llvm.stacksave()
1320 ; CHECK: %stack = call i8* @llvm.stacksave()
1321 call void @llvm.stackrestore(i8* %stack)
1322 ; CHECK: call void @llvm.stackrestore(i8* %stack)
1324 call void @llvm.prefetch(i8* %stack, i32 0, i32 3, i32 0)
1325 ; CHECK: call void @llvm.prefetch(i8* %stack, i32 0, i32 3, i32 0)
1327 call void @llvm.pcmarker(i32 1)
1328 ; CHECK: call void @llvm.pcmarker(i32 1)
1330 call i64 @llvm.readcyclecounter()
1331 ; CHECK: call i64 @llvm.readcyclecounter()
1333 call void @llvm.clear_cache(i8* null, i8* null)
1334 ; CHECK: call void @llvm.clear_cache(i8* null, i8* null)
1336 call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0)
1337 ; CHECK: call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0)
1342 declare void @llvm.localescape(...)
1343 declare i8* @llvm.localrecover(i8* %func, i8* %fp, i32 %idx)
1344 define void @intrinsics.localescape() {
1345 %static.alloca = alloca i32
1346 call void (...) @llvm.localescape(i32* %static.alloca)
1347 ; CHECK: call void (...) @llvm.localescape(i32* %static.alloca)
1349 call void @intrinsics.localrecover()
1353 define void @intrinsics.localrecover() {
1354 %func = bitcast void ()* @intrinsics.localescape to i8*
1355 %fp = call i8* @llvm.frameaddress(i32 1)
1356 call i8* @llvm.localrecover(i8* %func, i8* %fp, i32 0)
1357 ; CHECK: call i8* @llvm.localrecover(i8* %func, i8* %fp, i32 0)
1362 ; We need this function to provide `uses' for some metadata tests.
1363 define void @misc.metadata() {
1364 call void @f1(), !srcloc !11
1365 call void @f1(), !srcloc !12
1366 call void @f1(), !srcloc !13
1367 call void @f1(), !srcloc !14
1371 declare void @op_bundle_callee_0()
1372 declare void @op_bundle_callee_1(i32,i32)
1374 define void @call_with_operand_bundle0(i32* %ptr) {
1375 ; CHECK-LABEL: call_with_operand_bundle0(
1377 %l = load i32, i32* %ptr
1379 call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
1380 ; CHECK: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
1384 define void @call_with_operand_bundle1(i32* %ptr) {
1385 ; CHECK-LABEL: call_with_operand_bundle1(
1387 %l = load i32, i32* %ptr
1390 call void @op_bundle_callee_0()
1391 call void @op_bundle_callee_0() [ "foo"() ]
1392 call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
1393 ; CHECK: @op_bundle_callee_0(){{$}}
1394 ; CHECK-NEXT: call void @op_bundle_callee_0() [ "foo"() ]
1395 ; CHECK-NEXT: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
1399 define void @call_with_operand_bundle2(i32* %ptr) {
1400 ; CHECK-LABEL: call_with_operand_bundle2(
1402 call void @op_bundle_callee_0() [ "foo"() ]
1403 ; CHECK: call void @op_bundle_callee_0() [ "foo"() ]
1407 define void @call_with_operand_bundle3(i32* %ptr) {
1408 ; CHECK-LABEL: call_with_operand_bundle3(
1410 %l = load i32, i32* %ptr
1412 call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1413 ; CHECK: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1417 define void @call_with_operand_bundle4(i32* %ptr) {
1418 ; CHECK-LABEL: call_with_operand_bundle4(
1420 %l = load i32, i32* %ptr
1422 call void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1423 ; CHECK: call void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1427 ; Invoke versions of the above tests:
1430 define void @invoke_with_operand_bundle0(i32* %ptr) personality i8 3 {
1431 ; CHECK-LABEL: @invoke_with_operand_bundle0(
1433 %l = load i32, i32* %ptr
1435 invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ] to label %normal unwind label %exception
1436 ; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float 0.000000e+00, i64 100, i32 %l) ]
1439 %cleanup = landingpad i8 cleanup
1445 define void @invoke_with_operand_bundle1(i32* %ptr) personality i8 3 {
1446 ; CHECK-LABEL: @invoke_with_operand_bundle1(
1448 %l = load i32, i32* %ptr
1451 invoke void @op_bundle_callee_0() to label %normal unwind label %exception
1452 ; CHECK: invoke void @op_bundle_callee_0(){{$}}
1455 %cleanup = landingpad i8 cleanup
1459 invoke void @op_bundle_callee_0() [ "foo"() ] to label %normal1 unwind label %exception1
1460 ; CHECK: invoke void @op_bundle_callee_0() [ "foo"() ]
1463 %cleanup1 = landingpad i8 cleanup
1467 invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] to label %normal2 unwind label %exception2
1468 ; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1471 %cleanup2 = landingpad i8 cleanup
1478 define void @invoke_with_operand_bundle2(i32* %ptr) personality i8 3 {
1479 ; CHECK-LABEL: @invoke_with_operand_bundle2(
1481 invoke void @op_bundle_callee_0() [ "foo"() ] to label %normal unwind label %exception
1482 ; CHECK: invoke void @op_bundle_callee_0() [ "foo"() ]
1485 %cleanup = landingpad i8 cleanup
1491 define void @invoke_with_operand_bundle3(i32* %ptr) personality i8 3 {
1492 ; CHECK-LABEL: @invoke_with_operand_bundle3(
1494 %l = load i32, i32* %ptr
1496 invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ] to label %normal unwind label %exception
1497 ; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1500 %cleanup = landingpad i8 cleanup
1506 define void @invoke_with_operand_bundle4(i32* %ptr) personality i8 3 {
1507 ; CHECK-LABEL: @invoke_with_operand_bundle4(
1509 %l = load i32, i32* %ptr
1511 invoke void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1512 to label %normal unwind label %exception
1513 ; CHECK: invoke void @op_bundle_callee_1(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float 0.000000e+00, i32 %l) ]
1516 %cleanup = landingpad i8 cleanup
1523 ; CHECK: attributes #0 = { alignstack=4 }
1524 ; CHECK: attributes #1 = { alignstack=8 }
1525 ; CHECK: attributes #2 = { alwaysinline }
1526 ; CHECK: attributes #3 = { cold }
1527 ; CHECK: attributes #4 = { convergent }
1528 ; CHECK: attributes #5 = { inlinehint }
1529 ; CHECK: attributes #6 = { jumptable }
1530 ; CHECK: attributes #7 = { minsize }
1531 ; CHECK: attributes #8 = { naked }
1532 ; CHECK: attributes #9 = { nobuiltin }
1533 ; CHECK: attributes #10 = { noduplicate }
1534 ; CHECK: attributes #11 = { noimplicitfloat }
1535 ; CHECK: attributes #12 = { noinline }
1536 ; CHECK: attributes #13 = { nonlazybind }
1537 ; CHECK: attributes #14 = { noredzone }
1538 ; CHECK: attributes #15 = { noreturn }
1539 ; CHECK: attributes #16 = { nounwind }
1540 ; CHECK: attributes #17 = { noinline optnone }
1541 ; CHECK: attributes #18 = { optsize }
1542 ; CHECK: attributes #19 = { readnone }
1543 ; CHECK: attributes #20 = { readonly }
1544 ; CHECK: attributes #21 = { returns_twice }
1545 ; CHECK: attributes #22 = { safestack }
1546 ; CHECK: attributes #23 = { sanitize_address }
1547 ; CHECK: attributes #24 = { sanitize_memory }
1548 ; CHECK: attributes #25 = { sanitize_thread }
1549 ; CHECK: attributes #26 = { ssp }
1550 ; CHECK: attributes #27 = { sspreq }
1551 ; CHECK: attributes #28 = { sspstrong }
1552 ; CHECK: attributes #29 = { "thunk" }
1553 ; CHECK: attributes #30 = { uwtable }
1554 ; CHECK: attributes #31 = { "cpu"="cortex-a8" }
1555 ; CHECK: attributes #32 = { norecurse }
1556 ; CHECK: attributes #33 = { inaccessiblememonly }
1557 ; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
1558 ; CHECK: attributes #35 = { nounwind readnone }
1559 ; CHECK: attributes #36 = { argmemonly nounwind readonly }
1560 ; CHECK: attributes #37 = { argmemonly nounwind }
1561 ; CHECK: attributes #38 = { nounwind readonly }
1562 ; CHECK: attributes #39 = { builtin }
1566 ; Metadata -- Module flags
1567 !llvm.module.flags = !{!0, !1, !2, !4, !5, !6}
1568 ; CHECK: !llvm.module.flags = !{!0, !1, !2, !4, !5, !6}
1570 !0 = !{i32 1, !"mod1", i32 0}
1571 ; CHECK: !0 = !{i32 1, !"mod1", i32 0}
1572 !1 = !{i32 2, !"mod2", i32 0}
1573 ; CHECK: !1 = !{i32 2, !"mod2", i32 0}
1574 !2 = !{i32 3, !"mod3", !3}
1575 ; CHECK: !2 = !{i32 3, !"mod3", !3}
1577 ; CHECK: !3 = !{!"mod6", !0}
1578 !4 = !{i32 4, !"mod4", i32 0}
1579 ; CHECK: !4 = !{i32 4, !"mod4", i32 0}
1580 !5 = !{i32 5, !"mod5", !0}
1581 ; CHECK: !5 = !{i32 5, !"mod5", !0}
1582 !6 = !{i32 6, !"mod6", !0}
1583 ; CHECK: !6 = !{i32 6, !"mod6", !0}
1585 ; Metadata -- Check `distinct'
1587 ; CHECK: !11 = distinct !{}
1589 ; CHECK: !12 = distinct !{}
1591 ; CHECK: !13 = !{!11}
1593 ; CHECK: !14 = !{!12}