1375fa138SDuncan P. N. Exon Smith; Bitcode compatibility test for llvm
2375fa138SDuncan P. N. Exon Smith;
3375fa138SDuncan P. N. Exon Smith; Please update this file when making any IR changes. Information on the
4375fa138SDuncan P. N. Exon Smith; release process for this file is available here:
5375fa138SDuncan P. N. Exon Smith;
6375fa138SDuncan P. N. Exon Smith;     http://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility
7375fa138SDuncan P. N. Exon Smith
8375fa138SDuncan P. N. Exon Smith; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
9471bfb70SNikita Popov; RUN: verify-uselistorder < %s
10375fa138SDuncan P. N. Exon Smith
11375fa138SDuncan P. N. Exon Smithtarget datalayout = "E"
12375fa138SDuncan P. N. Exon Smith; CHECK: target datalayout = "E"
13375fa138SDuncan P. N. Exon Smith
14375fa138SDuncan P. N. Exon Smithtarget triple = "x86_64-apple-macosx10.10.0"
15375fa138SDuncan P. N. Exon Smith; CHECK: target triple = "x86_64-apple-macosx10.10.0"
16375fa138SDuncan P. N. Exon Smith
17375fa138SDuncan P. N. Exon Smith;; Module-level assembly
18375fa138SDuncan P. N. Exon Smithmodule asm "beep boop"
19375fa138SDuncan P. N. Exon Smith; CHECK: module asm "beep boop"
20375fa138SDuncan P. N. Exon Smith
21375fa138SDuncan P. N. Exon Smith;; Comdats
22375fa138SDuncan P. N. Exon Smith$comdat.any = comdat any
23375fa138SDuncan P. N. Exon Smith; CHECK: $comdat.any = comdat any
24375fa138SDuncan P. N. Exon Smith$comdat.exactmatch = comdat exactmatch
25375fa138SDuncan P. N. Exon Smith; CHECK: $comdat.exactmatch = comdat exactmatch
26375fa138SDuncan P. N. Exon Smith$comdat.largest = comdat largest
27375fa138SDuncan P. N. Exon Smith; CHECK: $comdat.largest = comdat largest
2839248779SFangrui Song$comdat.noduplicates = comdat nodeduplicate
2939248779SFangrui Song; CHECK: $comdat.noduplicates = comdat nodeduplicate
30375fa138SDuncan P. N. Exon Smith$comdat.samesize = comdat samesize
31375fa138SDuncan P. N. Exon Smith; CHECK: $comdat.samesize = comdat samesize
32375fa138SDuncan P. N. Exon Smith
33375fa138SDuncan P. N. Exon Smith;; Constants
34375fa138SDuncan P. N. Exon Smith@const.true = constant i1 true
35375fa138SDuncan P. N. Exon Smith; CHECK: @const.true = constant i1 true
36375fa138SDuncan P. N. Exon Smith@const.false = constant i1 false
37375fa138SDuncan P. N. Exon Smith; CHECK: @const.false = constant i1 false
38375fa138SDuncan P. N. Exon Smith@const.int = constant i32 zeroinitializer
39375fa138SDuncan P. N. Exon Smith; CHECK: @const.int = constant i32 0
40375fa138SDuncan P. N. Exon Smith@const.float = constant double 0.0
41375fa138SDuncan P. N. Exon Smith; CHECK: @const.float = constant double 0.0
42375fa138SDuncan P. N. Exon Smith@const.null = constant i8* null
43375fa138SDuncan P. N. Exon Smith; CHECK: @const.null = constant i8* null
4475f50e15SZhengyang Liu%const.struct.type = type { i32, i8, i64 }
45375fa138SDuncan P. N. Exon Smith%const.struct.type.packed = type <{ i32, i8 }>
4675f50e15SZhengyang Liu@const.struct = constant %const.struct.type { i32 -1, i8 undef, i64 poison }
4775f50e15SZhengyang Liu; CHECK: @const.struct = constant %const.struct.type { i32 -1, i8 undef, i64 poison }
48375fa138SDuncan P. N. Exon Smith@const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }>
49375fa138SDuncan P. N. Exon Smith; CHECK: @const.struct.packed = constant %const.struct.type.packed <{ i32 -1, i8 1 }>
50375fa138SDuncan P. N. Exon Smith
51d99e7183SJustin Bogner; CHECK: @constant.array.i8  = constant [3 x i8] c"\00\01\00"
52d99e7183SJustin Bogner@constant.array.i8  = constant [3 x i8] [i8 -0, i8 1, i8 0]
53d99e7183SJustin Bogner; CHECK: @constant.array.i16 = constant [3 x i16] [i16 0, i16 1, i16 0]
54d99e7183SJustin Bogner@constant.array.i16 = constant [3 x i16] [i16 -0, i16 1, i16 0]
55d99e7183SJustin Bogner; CHECK: @constant.array.i32 = constant [3 x i32] [i32 0, i32 1, i32 0]
56d99e7183SJustin Bogner@constant.array.i32 = constant [3 x i32] [i32 -0, i32 1, i32 0]
57d99e7183SJustin Bogner; CHECK: @constant.array.i64 = constant [3 x i64] [i64 0, i64 1, i64 0]
58d99e7183SJustin Bogner@constant.array.i64 = constant [3 x i64] [i64 -0, i64 1, i64 0]
59d99e7183SJustin Bogner; CHECK: @constant.array.f16 = constant [3 x half] [half 0xH8000, half 0xH3C00, half 0xH0000]
60d99e7183SJustin Bogner@constant.array.f16 = constant [3 x half] [half -0.0, half 1.0, half 0.0]
61d99e7183SJustin Bogner; CHECK: @constant.array.f32 = constant [3 x float] [float -0.000000e+00, float 1.000000e+00, float 0.000000e+00]
62d99e7183SJustin Bogner@constant.array.f32 = constant [3 x float] [float -0.0, float 1.0, float 0.0]
63d99e7183SJustin Bogner; CHECK: @constant.array.f64 = constant [3 x double] [double -0.000000e+00, double 1.000000e+00, double 0.000000e+00]
64d99e7183SJustin Bogner@constant.array.f64 = constant [3 x double] [double -0.0, double 1.0, double 0.0]
65d99e7183SJustin Bogner
66d99e7183SJustin Bogner; CHECK: @constant.vector.i8  = constant <3 x i8>  <i8 0, i8 1, i8 0>
67d99e7183SJustin Bogner@constant.vector.i8  = constant <3 x i8>  <i8 -0, i8 1, i8 0>
68d99e7183SJustin Bogner; CHECK: @constant.vector.i16 = constant <3 x i16> <i16 0, i16 1, i16 0>
69d99e7183SJustin Bogner@constant.vector.i16 = constant <3 x i16> <i16 -0, i16 1, i16 0>
70d99e7183SJustin Bogner; CHECK: @constant.vector.i32 = constant <3 x i32> <i32 0, i32 1, i32 0>
71d99e7183SJustin Bogner@constant.vector.i32 = constant <3 x i32> <i32 -0, i32 1, i32 0>
72d99e7183SJustin Bogner; CHECK: @constant.vector.i64 = constant <3 x i64> <i64 0, i64 1, i64 0>
73d99e7183SJustin Bogner@constant.vector.i64 = constant <3 x i64> <i64 -0, i64 1, i64 0>
74d99e7183SJustin Bogner; CHECK: @constant.vector.f16 = constant <3 x half> <half 0xH8000, half 0xH3C00, half 0xH0000>
75d99e7183SJustin Bogner@constant.vector.f16 = constant <3 x half> <half -0.0, half 1.0, half 0.0>
76d99e7183SJustin Bogner; CHECK: @constant.vector.f32 = constant <3 x float> <float -0.000000e+00, float 1.000000e+00, float 0.000000e+00>
77d99e7183SJustin Bogner@constant.vector.f32 = constant <3 x float> <float -0.0, float 1.0, float 0.0>
78d99e7183SJustin Bogner; CHECK: @constant.vector.f64 = constant <3 x double> <double -0.000000e+00, double 1.000000e+00, double 0.000000e+00>
79d99e7183SJustin Bogner@constant.vector.f64 = constant <3 x double> <double -0.0, double 1.0, double 0.0>
80d99e7183SJustin Bogner
81375fa138SDuncan P. N. Exon Smith;; Global Variables
82375fa138SDuncan P. N. Exon Smith; Format: [@<GlobalVarName> =] [Linkage] [Visibility] [DLLStorageClass]
8396efdd61SPeter Collingbourne;         [ThreadLocal] [(unnamed_addr|local_unnamed_addr)] [AddrSpace] [ExternallyInitialized]
84375fa138SDuncan P. N. Exon Smith;         <global | constant> <Type> [<InitializerConstant>]
85375fa138SDuncan P. N. Exon Smith;         [, section "name"] [, comdat [($name)]] [, align <Alignment>]
86375fa138SDuncan P. N. Exon Smith
87375fa138SDuncan P. N. Exon Smith; Global Variables -- Simple
88375fa138SDuncan P. N. Exon Smith@g1 = global i32 0
89375fa138SDuncan P. N. Exon Smith; CHECK: @g1 = global i32 0
90375fa138SDuncan P. N. Exon Smith@g2 = constant i32 0
91375fa138SDuncan P. N. Exon Smith; CHECK: @g2 = constant i32 0
92375fa138SDuncan P. N. Exon Smith
93375fa138SDuncan P. N. Exon Smith; Global Variables -- Linkage
94375fa138SDuncan P. N. Exon Smith@g.private = private global i32 0
95375fa138SDuncan P. N. Exon Smith; CHECK: @g.private = private global i32 0
96375fa138SDuncan P. N. Exon Smith@g.internal = internal global i32 0
97375fa138SDuncan P. N. Exon Smith; CHECK: @g.internal = internal global i32 0
98375fa138SDuncan P. N. Exon Smith@g.available_externally = available_externally global i32 0
99375fa138SDuncan P. N. Exon Smith; CHECK: @g.available_externally = available_externally global i32 0
100375fa138SDuncan P. N. Exon Smith@g.linkonce = linkonce global i32 0
101375fa138SDuncan P. N. Exon Smith; CHECK: @g.linkonce = linkonce global i32 0
102375fa138SDuncan P. N. Exon Smith@g.weak = weak global i32 0
103375fa138SDuncan P. N. Exon Smith; CHECK: @g.weak = weak global i32 0
104375fa138SDuncan P. N. Exon Smith@g.common = common global i32 0
105375fa138SDuncan P. N. Exon Smith; CHECK: @g.common = common global i32 0
106375fa138SDuncan P. N. Exon Smith@g.appending = appending global [4 x i8] c"test"
107375fa138SDuncan P. N. Exon Smith; CHECK: @g.appending = appending global [4 x i8] c"test"
108375fa138SDuncan P. N. Exon Smith@g.extern_weak = extern_weak global i32
109375fa138SDuncan P. N. Exon Smith; CHECK: @g.extern_weak = extern_weak global i32
110375fa138SDuncan P. N. Exon Smith@g.linkonce_odr = linkonce_odr global i32 0
111375fa138SDuncan P. N. Exon Smith; CHECK: @g.linkonce_odr = linkonce_odr global i32 0
112375fa138SDuncan P. N. Exon Smith@g.weak_odr = weak_odr global i32 0
113375fa138SDuncan P. N. Exon Smith; CHECK: @g.weak_odr = weak_odr global i32 0
114375fa138SDuncan P. N. Exon Smith@g.external = external global i32
115375fa138SDuncan P. N. Exon Smith; CHECK: @g.external = external global i32
116375fa138SDuncan P. N. Exon Smith
117375fa138SDuncan P. N. Exon Smith; Global Variables -- Visibility
118375fa138SDuncan P. N. Exon Smith@g.default = default global i32 0
119375fa138SDuncan P. N. Exon Smith; CHECK: @g.default = global i32 0
120375fa138SDuncan P. N. Exon Smith@g.hidden = hidden global i32 0
121375fa138SDuncan P. N. Exon Smith; CHECK: @g.hidden = hidden global i32 0
122375fa138SDuncan P. N. Exon Smith@g.protected = protected global i32 0
123375fa138SDuncan P. N. Exon Smith; CHECK: @g.protected = protected global i32 0
124375fa138SDuncan P. N. Exon Smith
125375fa138SDuncan P. N. Exon Smith; Global Variables -- DLLStorageClass
126375fa138SDuncan P. N. Exon Smith@g.dlldefault = default global i32 0
127375fa138SDuncan P. N. Exon Smith; CHECK: @g.dlldefault = global i32 0
128375fa138SDuncan P. N. Exon Smith@g.dllimport = external dllimport global i32
129375fa138SDuncan P. N. Exon Smith; CHECK: @g.dllimport = external dllimport global i32
130375fa138SDuncan P. N. Exon Smith@g.dllexport = dllexport global i32 0
131375fa138SDuncan P. N. Exon Smith; CHECK: @g.dllexport = dllexport global i32 0
132375fa138SDuncan P. N. Exon Smith
133375fa138SDuncan P. N. Exon Smith; Global Variables -- ThreadLocal
134375fa138SDuncan P. N. Exon Smith@g.notthreadlocal = global i32 0
135375fa138SDuncan P. N. Exon Smith; CHECK: @g.notthreadlocal = global i32 0
136375fa138SDuncan P. N. Exon Smith@g.generaldynamic = thread_local global i32 0
137375fa138SDuncan P. N. Exon Smith; CHECK: @g.generaldynamic = thread_local global i32 0
138375fa138SDuncan P. N. Exon Smith@g.localdynamic = thread_local(localdynamic) global i32 0
139375fa138SDuncan P. N. Exon Smith; CHECK: @g.localdynamic = thread_local(localdynamic) global i32 0
140375fa138SDuncan P. N. Exon Smith@g.initialexec = thread_local(initialexec) global i32 0
141375fa138SDuncan P. N. Exon Smith; CHECK: @g.initialexec = thread_local(initialexec) global i32 0
142375fa138SDuncan P. N. Exon Smith@g.localexec = thread_local(localexec) global i32 0
143375fa138SDuncan P. N. Exon Smith; CHECK: @g.localexec = thread_local(localexec) global i32 0
144375fa138SDuncan P. N. Exon Smith
14596efdd61SPeter Collingbourne; Global Variables -- unnamed_addr and local_unnamed_addr
146375fa138SDuncan P. N. Exon Smith@g.unnamed_addr = unnamed_addr global i32 0
147375fa138SDuncan P. N. Exon Smith; CHECK: @g.unnamed_addr = unnamed_addr global i32 0
14896efdd61SPeter Collingbourne@g.local_unnamed_addr = local_unnamed_addr global i32 0
14996efdd61SPeter Collingbourne; CHECK: @g.local_unnamed_addr = local_unnamed_addr global i32 0
150375fa138SDuncan P. N. Exon Smith
151375fa138SDuncan P. N. Exon Smith; Global Variables -- AddrSpace
152375fa138SDuncan P. N. Exon Smith@g.addrspace = addrspace(1) global i32 0
153375fa138SDuncan P. N. Exon Smith; CHECK: @g.addrspace = addrspace(1) global i32 0
154375fa138SDuncan P. N. Exon Smith
155375fa138SDuncan P. N. Exon Smith; Global Variables -- ExternallyInitialized
156375fa138SDuncan P. N. Exon Smith@g.externally_initialized = external externally_initialized global i32
157375fa138SDuncan P. N. Exon Smith; CHECK: @g.externally_initialized = external externally_initialized global i32
158375fa138SDuncan P. N. Exon Smith
159375fa138SDuncan P. N. Exon Smith; Global Variables -- section
160375fa138SDuncan P. N. Exon Smith@g.section = global i32 0, section "_DATA"
161375fa138SDuncan P. N. Exon Smith; CHECK: @g.section = global i32 0, section "_DATA"
162375fa138SDuncan P. N. Exon Smith
16331fda09bSPeter Collingbourne; Global Variables -- partition
16431fda09bSPeter Collingbourne@g.partition = global i32 0, partition "part"
16531fda09bSPeter Collingbourne; CHECK: @g.partition = global i32 0, partition "part"
16631fda09bSPeter Collingbourne
167375fa138SDuncan P. N. Exon Smith; Global Variables -- comdat
168375fa138SDuncan P. N. Exon Smith@comdat.any = global i32 0, comdat
169375fa138SDuncan P. N. Exon Smith; CHECK: @comdat.any = global i32 0, comdat
170375fa138SDuncan P. N. Exon Smith@comdat.exactmatch = global i32 0, comdat
171375fa138SDuncan P. N. Exon Smith; CHECK: @comdat.exactmatch = global i32 0, comdat
172375fa138SDuncan P. N. Exon Smith@comdat.largest = global i32 0, comdat
173375fa138SDuncan P. N. Exon Smith; CHECK: @comdat.largest = global i32 0, comdat
174375fa138SDuncan P. N. Exon Smith@comdat.noduplicates = global i32 0, comdat
175375fa138SDuncan P. N. Exon Smith; CHECK: @comdat.noduplicates = global i32 0, comdat
176375fa138SDuncan P. N. Exon Smith@comdat.samesize = global i32 0, comdat
177375fa138SDuncan P. N. Exon Smith; CHECK: @comdat.samesize = global i32 0, comdat
178375fa138SDuncan P. N. Exon Smith
179375fa138SDuncan P. N. Exon Smith; Force two globals from different comdats into sections with the same name.
180375fa138SDuncan P. N. Exon Smith$comdat1 = comdat any
181375fa138SDuncan P. N. Exon Smith$comdat2 = comdat any
182375fa138SDuncan P. N. Exon Smith@g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1)
183375fa138SDuncan P. N. Exon Smith; CHECK: @g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1)
184375fa138SDuncan P. N. Exon Smith@g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2)
185375fa138SDuncan P. N. Exon Smith; CHECK: @g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2)
186375fa138SDuncan P. N. Exon Smith
187375fa138SDuncan P. N. Exon Smith; Global Variables -- align
188375fa138SDuncan P. N. Exon Smith@g.align = global i32 0, align 4
189375fa138SDuncan P. N. Exon Smith; CHECK: @g.align = global i32 0, align 4
190375fa138SDuncan P. N. Exon Smith
191375fa138SDuncan P. N. Exon Smith; Global Variables -- Intrinsics
192375fa138SDuncan P. N. Exon Smith%pri.func.data = type { i32, void ()*, i8* }
193375fa138SDuncan P. N. Exon Smith@g.used1 = global i32 0
194375fa138SDuncan P. N. Exon Smith@g.used2 = global i32 0
195375fa138SDuncan P. N. Exon Smith@g.used3 = global i8 0
196375fa138SDuncan P. N. Exon Smithdeclare void @g.f1()
197375fa138SDuncan P. N. Exon Smith@llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata"
198375fa138SDuncan P. N. Exon Smith; CHECK: @llvm.used = appending global [1 x i32*] [i32* @g.used1], section "llvm.metadata"
199375fa138SDuncan P. N. Exon Smith@llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata"
200375fa138SDuncan P. N. Exon Smith; CHECK: @llvm.compiler.used = appending global [1 x i32*] [i32* @g.used2], section "llvm.metadata"
201375fa138SDuncan P. N. Exon Smith@llvm.global_ctors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata"
202375fa138SDuncan P. N. Exon Smith; 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"
203375fa138SDuncan P. N. Exon Smith@llvm.global_dtors = appending global [1 x %pri.func.data] [%pri.func.data { i32 0, void ()* @g.f1, i8* @g.used3 }], section "llvm.metadata"
204375fa138SDuncan P. N. Exon Smith; 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"
205375fa138SDuncan P. N. Exon Smith
2068db981d4SMitch Phillips; Global Variables -- sanitizers
2078db981d4SMitch Phillips@g.no_sanitize_address = global i32 0, no_sanitize_address
2088db981d4SMitch Phillips@g.no_sanitize_hwaddress = global i32 0, no_sanitize_hwaddress
209*90e5a8acSMitch Phillips@g.sanitize_memtag = global i32 0, sanitize_memtag
210*90e5a8acSMitch Phillips@g.no_sanitize_multiple = global i32 0, no_sanitize_address, no_sanitize_hwaddress
2118db981d4SMitch Phillips@g.sanitize_address_dyninit = global i32 0, sanitize_address_dyninit
212*90e5a8acSMitch Phillips@g.sanitize_multiple = global i32 0, sanitize_memtag, sanitize_address_dyninit
2138db981d4SMitch Phillips; CHECK: @g.no_sanitize_address = global i32 0, no_sanitize_address
2148db981d4SMitch Phillips; CHECK: @g.no_sanitize_hwaddress = global i32 0, no_sanitize_hwaddress
215*90e5a8acSMitch Phillips; CHECK: @g.sanitize_memtag = global i32 0, sanitize_memtag
216*90e5a8acSMitch Phillips; CHECK: @g.no_sanitize_multiple = global i32 0, no_sanitize_address, no_sanitize_hwaddress
2178db981d4SMitch Phillips; CHECK: @g.sanitize_address_dyninit = global i32 0, sanitize_address_dyninit
218*90e5a8acSMitch Phillips; CHECK: @g.sanitize_multiple = global i32 0, sanitize_memtag, sanitize_address_dyninit
2198db981d4SMitch Phillips
220375fa138SDuncan P. N. Exon Smith;; Aliases
221375fa138SDuncan P. N. Exon Smith; Format: @<Name> = [Linkage] [Visibility] [DLLStorageClass] [ThreadLocal]
222375fa138SDuncan P. N. Exon Smith;                   [unnamed_addr] alias <AliaseeTy> @<Aliasee>
223375fa138SDuncan P. N. Exon Smith
224375fa138SDuncan P. N. Exon Smith; Aliases -- Linkage
2252f40830dSDavid Blaikie@a.private = private alias i32, i32* @g.private
2262f40830dSDavid Blaikie; CHECK: @a.private = private alias i32, i32* @g.private
2272f40830dSDavid Blaikie@a.internal = internal alias i32, i32* @g.internal
2282f40830dSDavid Blaikie; CHECK: @a.internal = internal alias i32, i32* @g.internal
2292f40830dSDavid Blaikie@a.linkonce = linkonce alias i32, i32* @g.linkonce
2302f40830dSDavid Blaikie; CHECK: @a.linkonce = linkonce alias i32, i32* @g.linkonce
2312f40830dSDavid Blaikie@a.weak = weak alias i32, i32* @g.weak
2322f40830dSDavid Blaikie; CHECK: @a.weak = weak alias i32, i32* @g.weak
2332f40830dSDavid Blaikie@a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
2342f40830dSDavid Blaikie; CHECK: @a.linkonce_odr = linkonce_odr alias i32, i32* @g.linkonce_odr
2352f40830dSDavid Blaikie@a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
2362f40830dSDavid Blaikie; CHECK: @a.weak_odr = weak_odr alias i32, i32* @g.weak_odr
2372f40830dSDavid Blaikie@a.external = external alias i32, i32* @g1
2382f40830dSDavid Blaikie; CHECK: @a.external = alias i32, i32* @g1
239375fa138SDuncan P. N. Exon Smith
240375fa138SDuncan P. N. Exon Smith; Aliases -- Visibility
2412f40830dSDavid Blaikie@a.default = default alias i32, i32* @g.default
2422f40830dSDavid Blaikie; CHECK: @a.default = alias i32, i32* @g.default
2432f40830dSDavid Blaikie@a.hidden = hidden alias i32, i32* @g.hidden
2442f40830dSDavid Blaikie; CHECK: @a.hidden = hidden alias i32, i32* @g.hidden
2452f40830dSDavid Blaikie@a.protected = protected alias i32, i32* @g.protected
2462f40830dSDavid Blaikie; CHECK: @a.protected = protected alias i32, i32* @g.protected
247375fa138SDuncan P. N. Exon Smith
248375fa138SDuncan P. N. Exon Smith; Aliases -- DLLStorageClass
2492f40830dSDavid Blaikie@a.dlldefault = default alias i32, i32* @g.dlldefault
2502f40830dSDavid Blaikie; CHECK: @a.dlldefault = alias i32, i32* @g.dlldefault
2512f40830dSDavid Blaikie@a.dllexport = dllexport alias i32, i32* @g.dllexport
2522f40830dSDavid Blaikie; CHECK: @a.dllexport = dllexport alias i32, i32* @g.dllexport
253375fa138SDuncan P. N. Exon Smith
254375fa138SDuncan P. N. Exon Smith; Aliases -- ThreadLocal
2552f40830dSDavid Blaikie@a.notthreadlocal = alias i32, i32* @g.notthreadlocal
2562f40830dSDavid Blaikie; CHECK: @a.notthreadlocal = alias i32, i32* @g.notthreadlocal
2572f40830dSDavid Blaikie@a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
2582f40830dSDavid Blaikie; CHECK: @a.generaldynamic = thread_local alias i32, i32* @g.generaldynamic
2592f40830dSDavid Blaikie@a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
2602f40830dSDavid Blaikie; CHECK: @a.localdynamic = thread_local(localdynamic) alias i32, i32* @g.localdynamic
2612f40830dSDavid Blaikie@a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
2622f40830dSDavid Blaikie; CHECK: @a.initialexec = thread_local(initialexec) alias i32, i32* @g.initialexec
2632f40830dSDavid Blaikie@a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
2642f40830dSDavid Blaikie; CHECK: @a.localexec = thread_local(localexec) alias i32, i32* @g.localexec
265375fa138SDuncan P. N. Exon Smith
26696efdd61SPeter Collingbourne; Aliases -- unnamed_addr and local_unnamed_addr
2672f40830dSDavid Blaikie@a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
2682f40830dSDavid Blaikie; CHECK: @a.unnamed_addr = unnamed_addr alias i32, i32* @g.unnamed_addr
26996efdd61SPeter Collingbourne@a.local_unnamed_addr = local_unnamed_addr alias i32, i32* @g.local_unnamed_addr
27096efdd61SPeter Collingbourne; CHECK: @a.local_unnamed_addr = local_unnamed_addr alias i32, i32* @g.local_unnamed_addr
271375fa138SDuncan P. N. Exon Smith
27231fda09bSPeter Collingbourne; Aliases -- partition
27331fda09bSPeter Collingbourne; CHECK: @alias.partition = alias i32, i32* @g.partition, partition "part"
27431fda09bSPeter Collingbourne@alias.partition = alias i32, i32* @g.partition, partition "part"
27531fda09bSPeter Collingbourne
276a1feff70SDmitry Polukhin;; IFunc
277a1feff70SDmitry Polukhin; Format @<Name> = [Linkage] [Visibility] ifunc <IFuncTy>,
278a1feff70SDmitry Polukhin;                  <ResolverTy>* @<Resolver>
279a1feff70SDmitry Polukhin
280a1feff70SDmitry Polukhin; IFunc -- Linkage
281848812a5SItay Bookstein@ifunc.external = external ifunc void (), void ()* ()* @ifunc_resolver
282848812a5SItay Bookstein; CHECK: @ifunc.external = ifunc void (), void ()* ()* @ifunc_resolver
283848812a5SItay Bookstein@ifunc.private = private ifunc void (), void ()* ()* @ifunc_resolver
284848812a5SItay Bookstein; CHECK: @ifunc.private = private ifunc void (), void ()* ()* @ifunc_resolver
285848812a5SItay Bookstein@ifunc.internal = internal ifunc void (), void ()* ()* @ifunc_resolver
286848812a5SItay Bookstein; CHECK: @ifunc.internal = internal ifunc void (), void ()* ()* @ifunc_resolver
287a1feff70SDmitry Polukhin
288a1feff70SDmitry Polukhin; IFunc -- Visibility
289848812a5SItay Bookstein@ifunc.default = default ifunc void (), void ()* ()* @ifunc_resolver
290848812a5SItay Bookstein; CHECK: @ifunc.default = ifunc void (), void ()* ()* @ifunc_resolver
291848812a5SItay Bookstein@ifunc.hidden = hidden ifunc void (), void ()* ()* @ifunc_resolver
292848812a5SItay Bookstein; CHECK: @ifunc.hidden = hidden ifunc void (), void ()* ()* @ifunc_resolver
293848812a5SItay Bookstein@ifunc.protected = protected ifunc void (), void ()* ()* @ifunc_resolver
294848812a5SItay Bookstein; CHECK: @ifunc.protected = protected ifunc void (), void ()* ()* @ifunc_resolver
295a1feff70SDmitry Polukhin
29631fda09bSPeter Collingbourne; IFunc -- partition
297848812a5SItay Bookstein; CHECK: @ifunc.partition = ifunc void (), void ()* ()* @ifunc_resolver, partition "part"
298848812a5SItay Bookstein@ifunc.partition = ifunc void (), void ()* ()* @ifunc_resolver, partition "part"
29931fda09bSPeter Collingbourne
300848812a5SItay Booksteindefine void ()* @ifunc_resolver() {
301a1feff70SDmitry Polukhinentry:
302848812a5SItay Bookstein  ret void ()* null
303a1feff70SDmitry Polukhin}
304a1feff70SDmitry Polukhin
305375fa138SDuncan P. N. Exon Smith;; Functions
306375fa138SDuncan P. N. Exon Smith; Format: define [linkage] [visibility] [DLLStorageClass]
307375fa138SDuncan P. N. Exon Smith;         [cconv] [ret attrs]
308375fa138SDuncan P. N. Exon Smith;         <ResultType> @<FunctionName> ([argument list])
30996efdd61SPeter Collingbourne;         [(unnamed_addr|local_unnamed_addr)] [fn Attrs] [section "name"] [comdat [($name)]]
310375fa138SDuncan P. N. Exon Smith;         [align N] [gc] [prefix Constant] [prologue Constant]
311375fa138SDuncan P. N. Exon Smith;         [personality Constant] { ... }
312375fa138SDuncan P. N. Exon Smith
313375fa138SDuncan P. N. Exon Smith; Functions -- Simple
314375fa138SDuncan P. N. Exon Smithdeclare void @f1 ()
315375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f1()
316375fa138SDuncan P. N. Exon Smith
317375fa138SDuncan P. N. Exon Smithdefine void @f2 () {
318375fa138SDuncan P. N. Exon Smith; CHECK: define void @f2()
319375fa138SDuncan P. N. Exon Smithentry:
320375fa138SDuncan P. N. Exon Smith  ret void
321375fa138SDuncan P. N. Exon Smith}
322375fa138SDuncan P. N. Exon Smith
323375fa138SDuncan P. N. Exon Smith; Functions -- linkage
324375fa138SDuncan P. N. Exon Smithdefine private void @f.private() {
325375fa138SDuncan P. N. Exon Smith; CHECK: define private void @f.private()
326375fa138SDuncan P. N. Exon Smithentry:
327375fa138SDuncan P. N. Exon Smith  ret void
328375fa138SDuncan P. N. Exon Smith}
329375fa138SDuncan P. N. Exon Smithdefine internal void @f.internal() {
330375fa138SDuncan P. N. Exon Smith; CHECK: define internal void @f.internal()
331375fa138SDuncan P. N. Exon Smithentry:
332375fa138SDuncan P. N. Exon Smith  ret void
333375fa138SDuncan P. N. Exon Smith}
334375fa138SDuncan P. N. Exon Smithdefine available_externally void @f.available_externally() {
335375fa138SDuncan P. N. Exon Smith; CHECK: define available_externally void @f.available_externally()
336375fa138SDuncan P. N. Exon Smithentry:
337375fa138SDuncan P. N. Exon Smith  ret void
338375fa138SDuncan P. N. Exon Smith}
339375fa138SDuncan P. N. Exon Smithdefine linkonce void @f.linkonce() {
340375fa138SDuncan P. N. Exon Smith; CHECK: define linkonce void @f.linkonce()
341375fa138SDuncan P. N. Exon Smithentry:
342375fa138SDuncan P. N. Exon Smith  ret void
343375fa138SDuncan P. N. Exon Smith}
344375fa138SDuncan P. N. Exon Smithdefine weak void @f.weak() {
345375fa138SDuncan P. N. Exon Smith; CHECK: define weak void @f.weak()
346375fa138SDuncan P. N. Exon Smithentry:
347375fa138SDuncan P. N. Exon Smith  ret void
348375fa138SDuncan P. N. Exon Smith}
349375fa138SDuncan P. N. Exon Smithdefine linkonce_odr void @f.linkonce_odr() {
350375fa138SDuncan P. N. Exon Smith; CHECK: define linkonce_odr void @f.linkonce_odr()
351375fa138SDuncan P. N. Exon Smithentry:
352375fa138SDuncan P. N. Exon Smith  ret void
353375fa138SDuncan P. N. Exon Smith}
354375fa138SDuncan P. N. Exon Smithdefine weak_odr void @f.weak_odr() {
355375fa138SDuncan P. N. Exon Smith; CHECK: define weak_odr void @f.weak_odr()
356375fa138SDuncan P. N. Exon Smithentry:
357375fa138SDuncan P. N. Exon Smith  ret void
358375fa138SDuncan P. N. Exon Smith}
359375fa138SDuncan P. N. Exon Smithdeclare external void @f.external()
360375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.external()
361375fa138SDuncan P. N. Exon Smithdeclare extern_weak void @f.extern_weak()
362375fa138SDuncan P. N. Exon Smith; CHECK: declare extern_weak void @f.extern_weak()
363375fa138SDuncan P. N. Exon Smith
364375fa138SDuncan P. N. Exon Smith; Functions -- visibility
365375fa138SDuncan P. N. Exon Smithdeclare default void @f.default()
366375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.default()
367375fa138SDuncan P. N. Exon Smithdeclare hidden void @f.hidden()
368375fa138SDuncan P. N. Exon Smith; CHECK: declare hidden void @f.hidden()
369375fa138SDuncan P. N. Exon Smithdeclare protected void @f.protected()
370375fa138SDuncan P. N. Exon Smith; CHECK: declare protected void @f.protected()
371375fa138SDuncan P. N. Exon Smith
372375fa138SDuncan P. N. Exon Smith; Functions -- DLLStorageClass
373375fa138SDuncan P. N. Exon Smithdeclare dllimport void @f.dllimport()
374375fa138SDuncan P. N. Exon Smith; CHECK: declare dllimport void @f.dllimport()
375375fa138SDuncan P. N. Exon Smithdeclare dllexport void @f.dllexport()
376375fa138SDuncan P. N. Exon Smith; CHECK: declare dllexport void @f.dllexport()
377375fa138SDuncan P. N. Exon Smith
378375fa138SDuncan P. N. Exon Smith; Functions -- cconv (Calling conventions)
379375fa138SDuncan P. N. Exon Smithdeclare ccc void @f.ccc()
380375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.ccc()
381375fa138SDuncan P. N. Exon Smithdeclare fastcc void @f.fastcc()
382375fa138SDuncan P. N. Exon Smith; CHECK: declare fastcc void @f.fastcc()
383375fa138SDuncan P. N. Exon Smithdeclare coldcc void @f.coldcc()
384375fa138SDuncan P. N. Exon Smith; CHECK: declare coldcc void @f.coldcc()
385375fa138SDuncan P. N. Exon Smithdeclare cc10 void @f.cc10()
386375fa138SDuncan P. N. Exon Smith; CHECK: declare ghccc void @f.cc10()
387375fa138SDuncan P. N. Exon Smithdeclare ghccc void @f.ghccc()
388375fa138SDuncan P. N. Exon Smith; CHECK: declare ghccc void @f.ghccc()
389375fa138SDuncan P. N. Exon Smithdeclare cc11 void @f.cc11()
390375fa138SDuncan P. N. Exon Smith; CHECK: declare cc11 void @f.cc11()
391375fa138SDuncan P. N. Exon Smithdeclare webkit_jscc void @f.webkit_jscc()
392375fa138SDuncan P. N. Exon Smith; CHECK: declare webkit_jscc void @f.webkit_jscc()
393375fa138SDuncan P. N. Exon Smithdeclare anyregcc void @f.anyregcc()
394375fa138SDuncan P. N. Exon Smith; CHECK: declare anyregcc void @f.anyregcc()
395375fa138SDuncan P. N. Exon Smithdeclare preserve_mostcc void @f.preserve_mostcc()
396375fa138SDuncan P. N. Exon Smith; CHECK: declare preserve_mostcc void @f.preserve_mostcc()
397375fa138SDuncan P. N. Exon Smithdeclare preserve_allcc void @f.preserve_allcc()
398375fa138SDuncan P. N. Exon Smith; CHECK: declare preserve_allcc void @f.preserve_allcc()
39982a0e808STim Northoverdeclare swifttailcc void @f.swifttailcc()
40082a0e808STim Northover; CHECK: declare swifttailcc void @f.swifttailcc()
401375fa138SDuncan P. N. Exon Smithdeclare cc64 void @f.cc64()
402375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_stdcallcc void @f.cc64()
403375fa138SDuncan P. N. Exon Smithdeclare x86_stdcallcc void @f.x86_stdcallcc()
404375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_stdcallcc void @f.x86_stdcallcc()
405375fa138SDuncan P. N. Exon Smithdeclare cc65 void @f.cc65()
406375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_fastcallcc void @f.cc65()
407375fa138SDuncan P. N. Exon Smithdeclare x86_fastcallcc void @f.x86_fastcallcc()
408375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_fastcallcc void @f.x86_fastcallcc()
409375fa138SDuncan P. N. Exon Smithdeclare cc66 void @f.cc66()
410375fa138SDuncan P. N. Exon Smith; CHECK: declare arm_apcscc void @f.cc66()
411375fa138SDuncan P. N. Exon Smithdeclare arm_apcscc void @f.arm_apcscc()
412375fa138SDuncan P. N. Exon Smith; CHECK: declare arm_apcscc void @f.arm_apcscc()
413375fa138SDuncan P. N. Exon Smithdeclare cc67 void @f.cc67()
414375fa138SDuncan P. N. Exon Smith; CHECK: declare arm_aapcscc void @f.cc67()
415375fa138SDuncan P. N. Exon Smithdeclare arm_aapcscc void @f.arm_aapcscc()
416375fa138SDuncan P. N. Exon Smith; CHECK: declare arm_aapcscc void @f.arm_aapcscc()
417375fa138SDuncan P. N. Exon Smithdeclare cc68 void @f.cc68()
418375fa138SDuncan P. N. Exon Smith; CHECK: declare arm_aapcs_vfpcc void @f.cc68()
419375fa138SDuncan P. N. Exon Smithdeclare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc()
420375fa138SDuncan P. N. Exon Smith; CHECK: declare arm_aapcs_vfpcc void @f.arm_aapcs_vfpcc()
421375fa138SDuncan P. N. Exon Smithdeclare cc69 void @f.cc69()
422375fa138SDuncan P. N. Exon Smith; CHECK: declare msp430_intrcc void @f.cc69()
423375fa138SDuncan P. N. Exon Smithdeclare msp430_intrcc void @f.msp430_intrcc()
424375fa138SDuncan P. N. Exon Smith; CHECK: declare msp430_intrcc void @f.msp430_intrcc()
425375fa138SDuncan P. N. Exon Smithdeclare cc70 void @f.cc70()
426375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_thiscallcc void @f.cc70()
427375fa138SDuncan P. N. Exon Smithdeclare x86_thiscallcc void @f.x86_thiscallcc()
428375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_thiscallcc void @f.x86_thiscallcc()
429375fa138SDuncan P. N. Exon Smithdeclare cc71 void @f.cc71()
430375fa138SDuncan P. N. Exon Smith; CHECK: declare ptx_kernel void @f.cc71()
431375fa138SDuncan P. N. Exon Smithdeclare ptx_kernel void @f.ptx_kernel()
432375fa138SDuncan P. N. Exon Smith; CHECK: declare ptx_kernel void @f.ptx_kernel()
433375fa138SDuncan P. N. Exon Smithdeclare cc72 void @f.cc72()
434375fa138SDuncan P. N. Exon Smith; CHECK: declare ptx_device void @f.cc72()
435375fa138SDuncan P. N. Exon Smithdeclare ptx_device void @f.ptx_device()
436375fa138SDuncan P. N. Exon Smith; CHECK: declare ptx_device void @f.ptx_device()
437375fa138SDuncan P. N. Exon Smithdeclare cc75 void @f.cc75()
438375fa138SDuncan P. N. Exon Smith; CHECK: declare spir_func void @f.cc75()
439375fa138SDuncan P. N. Exon Smithdeclare spir_func void @f.spir_func()
440375fa138SDuncan P. N. Exon Smith; CHECK: declare spir_func void @f.spir_func()
441375fa138SDuncan P. N. Exon Smithdeclare cc76 void @f.cc76()
442375fa138SDuncan P. N. Exon Smith; CHECK: declare spir_kernel void @f.cc76()
443375fa138SDuncan P. N. Exon Smithdeclare spir_kernel void @f.spir_kernel()
444375fa138SDuncan P. N. Exon Smith; CHECK: declare spir_kernel void @f.spir_kernel()
445375fa138SDuncan P. N. Exon Smithdeclare cc77 void @f.cc77()
446375fa138SDuncan P. N. Exon Smith; CHECK: declare intel_ocl_bicc void @f.cc77()
447375fa138SDuncan P. N. Exon Smithdeclare intel_ocl_bicc void @f.intel_ocl_bicc()
448375fa138SDuncan P. N. Exon Smith; CHECK: declare intel_ocl_bicc void @f.intel_ocl_bicc()
449375fa138SDuncan P. N. Exon Smithdeclare cc78 void @f.cc78()
450375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_64_sysvcc void @f.cc78()
451375fa138SDuncan P. N. Exon Smithdeclare x86_64_sysvcc void @f.x86_64_sysvcc()
452375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_64_sysvcc void @f.x86_64_sysvcc()
453375fa138SDuncan P. N. Exon Smithdeclare cc79 void @f.cc79()
4542f24e934SMartin Storsjo; CHECK: declare win64cc void @f.cc79()
4552f24e934SMartin Storsjodeclare win64cc void @f.win64cc()
4562f24e934SMartin Storsjo; CHECK: declare win64cc void @f.win64cc()
457375fa138SDuncan P. N. Exon Smithdeclare cc80 void @f.cc80()
458375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_vectorcallcc void @f.cc80()
459375fa138SDuncan P. N. Exon Smithdeclare x86_vectorcallcc void @f.x86_vectorcallcc()
460375fa138SDuncan P. N. Exon Smith; CHECK: declare x86_vectorcallcc void @f.x86_vectorcallcc()
4611f7732abSNikolay Haustovdeclare cc81 void @f.cc81()
4621f7732abSNikolay Haustov; CHECK: declare hhvmcc void @f.cc81()
4631f7732abSNikolay Haustovdeclare hhvmcc void @f.hhvmcc()
4641f7732abSNikolay Haustov; CHECK: declare hhvmcc void @f.hhvmcc()
4651f7732abSNikolay Haustovdeclare cc82 void @f.cc82()
4661f7732abSNikolay Haustov; CHECK: declare hhvm_ccc void @f.cc82()
4671f7732abSNikolay Haustovdeclare hhvm_ccc void @f.hhvm_ccc()
4681f7732abSNikolay Haustov; CHECK: declare hhvm_ccc void @f.hhvm_ccc()
4692e0e03c6SMatt Arsenaultdeclare cc83 void @f.cc83(i8* byval(i8))
4702e0e03c6SMatt Arsenault; CHECK: declare x86_intrcc void @f.cc83(i8* byval(i8))
4712e0e03c6SMatt Arsenaultdeclare x86_intrcc void @f.x86_intrcc(i8* byval(i8))
4722e0e03c6SMatt Arsenault; CHECK: declare x86_intrcc void @f.x86_intrcc(i8* byval(i8))
4731f7732abSNikolay Haustovdeclare cc84 void @f.cc84()
4741f7732abSNikolay Haustov; CHECK: declare avr_intrcc void @f.cc84()
4751f7732abSNikolay Haustovdeclare avr_intrcc void @f.avr_intrcc()
4761f7732abSNikolay Haustov; CHECK: declare avr_intrcc void @f.avr_intrcc()
4771f7732abSNikolay Haustovdeclare cc85 void @f.cc85()
4781f7732abSNikolay Haustov; CHECK: declare avr_signalcc void @f.cc85()
4791f7732abSNikolay Haustovdeclare avr_signalcc void @f.avr_signalcc()
4801f7732abSNikolay Haustov; CHECK: declare avr_signalcc void @f.avr_signalcc()
4811f7732abSNikolay Haustovdeclare cc87 void @f.cc87()
4821f7732abSNikolay Haustov; CHECK: declare amdgpu_vs void @f.cc87()
4831f7732abSNikolay Haustovdeclare amdgpu_vs void @f.amdgpu_vs()
4841f7732abSNikolay Haustov; CHECK: declare amdgpu_vs void @f.amdgpu_vs()
4851f7732abSNikolay Haustovdeclare cc88 void @f.cc88()
4861f7732abSNikolay Haustov; CHECK: declare amdgpu_gs void @f.cc88()
4871f7732abSNikolay Haustovdeclare amdgpu_gs void @f.amdgpu_gs()
4881f7732abSNikolay Haustov; CHECK: declare amdgpu_gs void @f.amdgpu_gs()
4891f7732abSNikolay Haustovdeclare cc89 void @f.cc89()
4901f7732abSNikolay Haustov; CHECK: declare amdgpu_ps void @f.cc89()
4911f7732abSNikolay Haustovdeclare amdgpu_ps void @f.amdgpu_ps()
4921f7732abSNikolay Haustov; CHECK: declare amdgpu_ps void @f.amdgpu_ps()
4931f7732abSNikolay Haustovdeclare cc90 void @f.cc90()
4941f7732abSNikolay Haustov; CHECK: declare amdgpu_cs void @f.cc90()
4951f7732abSNikolay Haustovdeclare amdgpu_cs void @f.amdgpu_cs()
4961f7732abSNikolay Haustov; CHECK: declare amdgpu_cs void @f.amdgpu_cs()
497a022b1ccSSebastian Neubauerdeclare amdgpu_gfx void @f.amdgpu_gfx()
498a022b1ccSSebastian Neubauer; CHECK: declare amdgpu_gfx void @f.amdgpu_gfx()
4991f7732abSNikolay Haustovdeclare cc91 void @f.cc91()
5001f7732abSNikolay Haustov; CHECK: declare amdgpu_kernel void @f.cc91()
5011f7732abSNikolay Haustovdeclare amdgpu_kernel void @f.amdgpu_kernel()
5021f7732abSNikolay Haustov; CHECK: declare amdgpu_kernel void @f.amdgpu_kernel()
503a302a736SMarek Olsakdeclare cc93 void @f.cc93()
504a302a736SMarek Olsak; CHECK: declare amdgpu_hs void @f.cc93()
505a302a736SMarek Olsakdeclare amdgpu_hs void @f.amdgpu_hs()
506a302a736SMarek Olsak; CHECK: declare amdgpu_hs void @f.amdgpu_hs()
507ef1ae8ffSTim Renoufdeclare cc95 void @f.cc95()
508ef1ae8ffSTim Renouf; CHECK: declare amdgpu_ls void @f.cc95()
509ef1ae8ffSTim Renoufdeclare amdgpu_ls void @f.amdgpu_ls()
510ef1ae8ffSTim Renouf; CHECK: declare amdgpu_ls void @f.amdgpu_ls()
511ef1ae8ffSTim Renoufdeclare cc96 void @f.cc96()
512ef1ae8ffSTim Renouf; CHECK: declare amdgpu_es void @f.cc96()
513ef1ae8ffSTim Renoufdeclare amdgpu_es void @f.amdgpu_es()
514ef1ae8ffSTim Renouf; CHECK: declare amdgpu_es void @f.amdgpu_es()
515ad6d6e74SVedant Kumardeclare cc1023 void @f.cc1023()
516ad6d6e74SVedant Kumar; CHECK: declare cc1023 void @f.cc1023()
517375fa138SDuncan P. N. Exon Smith
518375fa138SDuncan P. N. Exon Smith; Functions -- ret attrs (Return attributes)
519375fa138SDuncan P. N. Exon Smithdeclare zeroext i64 @f.zeroext()
520375fa138SDuncan P. N. Exon Smith; CHECK: declare zeroext i64 @f.zeroext()
521375fa138SDuncan P. N. Exon Smithdeclare signext i64 @f.signext()
522375fa138SDuncan P. N. Exon Smith; CHECK: declare signext i64 @f.signext()
523375fa138SDuncan P. N. Exon Smithdeclare inreg i32* @f.inreg()
524375fa138SDuncan P. N. Exon Smith; CHECK: declare inreg i32* @f.inreg()
525375fa138SDuncan P. N. Exon Smithdeclare noalias i32* @f.noalias()
526375fa138SDuncan P. N. Exon Smith; CHECK: declare noalias i32* @f.noalias()
527375fa138SDuncan P. N. Exon Smithdeclare nonnull i32* @f.nonnull()
528375fa138SDuncan P. N. Exon Smith; CHECK: declare nonnull i32* @f.nonnull()
529375fa138SDuncan P. N. Exon Smithdeclare dereferenceable(4) i32* @f.dereferenceable4()
530375fa138SDuncan P. N. Exon Smith; CHECK: declare dereferenceable(4) i32* @f.dereferenceable4()
531375fa138SDuncan P. N. Exon Smithdeclare dereferenceable(8) i32* @f.dereferenceable8()
532375fa138SDuncan P. N. Exon Smith; CHECK: declare dereferenceable(8) i32* @f.dereferenceable8()
533375fa138SDuncan P. N. Exon Smithdeclare dereferenceable(16) i32* @f.dereferenceable16()
534375fa138SDuncan P. N. Exon Smith; CHECK: declare dereferenceable(16) i32* @f.dereferenceable16()
535375fa138SDuncan P. N. Exon Smithdeclare dereferenceable_or_null(4) i32* @f.dereferenceable4_or_null()
536375fa138SDuncan P. N. Exon Smith; CHECK: declare dereferenceable_or_null(4) i32* @f.dereferenceable4_or_null()
537375fa138SDuncan P. N. Exon Smithdeclare dereferenceable_or_null(8) i32* @f.dereferenceable8_or_null()
538375fa138SDuncan P. N. Exon Smith; CHECK: declare dereferenceable_or_null(8) i32* @f.dereferenceable8_or_null()
539375fa138SDuncan P. N. Exon Smithdeclare dereferenceable_or_null(16) i32* @f.dereferenceable16_or_null()
540375fa138SDuncan P. N. Exon Smith; CHECK: declare dereferenceable_or_null(16) i32* @f.dereferenceable16_or_null()
541375fa138SDuncan P. N. Exon Smith
542375fa138SDuncan P. N. Exon Smith; Functions -- Parameter attributes
543375fa138SDuncan P. N. Exon Smithdeclare void @f.param.zeroext(i8 zeroext)
544375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.zeroext(i8 zeroext)
545375fa138SDuncan P. N. Exon Smithdeclare void @f.param.signext(i8 signext)
546375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.signext(i8 signext)
547375fa138SDuncan P. N. Exon Smithdeclare void @f.param.inreg(i8 inreg)
548375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.inreg(i8 inreg)
54906c192d4SMatt Arsenaultdeclare void @f.param.byval({ i8, i8 }* byval({ i8, i8 }))
550b7141207STim Northover; CHECK: declare void @f.param.byval({ i8, i8 }* byval({ i8, i8 }))
5519a0c9402SMatt Arsenaultdeclare void @f.param.inalloca(i8* inalloca(i8))
5529a0c9402SMatt Arsenault; CHECK: declare void @f.param.inalloca(i8* inalloca(i8))
55320c43d6bSMatt Arsenaultdeclare void @f.param.sret(i8* sret(i8))
5540a7cd99aSMatt Arsenault; CHECK: declare void @f.param.sret(i8* sret(i8))
555375fa138SDuncan P. N. Exon Smithdeclare void @f.param.noalias(i8* noalias)
556375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.noalias(i8* noalias)
557375fa138SDuncan P. N. Exon Smithdeclare void @f.param.nocapture(i8* nocapture)
558375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.nocapture(i8* nocapture)
559375fa138SDuncan P. N. Exon Smithdeclare void @f.param.nest(i8* nest)
560375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.nest(i8* nest)
561375fa138SDuncan P. N. Exon Smithdeclare i8* @f.param.returned(i8* returned)
562375fa138SDuncan P. N. Exon Smith; CHECK: declare i8* @f.param.returned(i8* returned)
563375fa138SDuncan P. N. Exon Smithdeclare void @f.param.nonnull(i8* nonnull)
564375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.nonnull(i8* nonnull)
565375fa138SDuncan P. N. Exon Smithdeclare void @f.param.dereferenceable(i8* dereferenceable(4))
566375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.dereferenceable(i8* dereferenceable(4))
567375fa138SDuncan P. N. Exon Smithdeclare void @f.param.dereferenceable_or_null(i8* dereferenceable_or_null(4))
568375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.param.dereferenceable_or_null(i8* dereferenceable_or_null(4))
569f9d932e6SMomchil Velikovdeclare void @f.param.stack_align([2 x double] alignstack(16))
570f9d932e6SMomchil Velikov; CHECK: declare void @f.param.stack_align([2 x double] alignstack(16))
571ea0eec69STim Northoverdeclare void @f.param.swiftself(i8* swiftself)
572ea0eec69STim Northover; CHECK: declare void @f.param.swiftself(i8* swiftself)
573ea0eec69STim Northoverdeclare void @f.param.swiftasync(i8* swiftasync)
574ea0eec69STim Northover; CHECK: declare void @f.param.swiftasync(i8* swiftasync)
575ea0eec69STim Northoverdeclare void @f.param.swifterror(i8** swifterror)
576ea0eec69STim Northover; CHECK: declare void @f.param.swifterror(i8** swifterror)
577d664c4b7SAugie Facklerdeclare void @f.param.allocalign(i32 allocalign)
578d664c4b7SAugie Fackler; CHECK: declare void @f.param.allocalign(i32 allocalign)
579a907d36cSAugie Facklerdeclare void @f.param.allocptr(i32* allocptr)
580a907d36cSAugie Fackler; CHECK: declare void @f.param.allocptr(i32* allocptr)
581375fa138SDuncan P. N. Exon Smith
58296efdd61SPeter Collingbourne; Functions -- unnamed_addr and local_unnamed_addr
583375fa138SDuncan P. N. Exon Smithdeclare void @f.unnamed_addr() unnamed_addr
584375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.unnamed_addr() unnamed_addr
58596efdd61SPeter Collingbournedeclare void @f.local_unnamed_addr() local_unnamed_addr
58696efdd61SPeter Collingbourne; CHECK: declare void @f.local_unnamed_addr() local_unnamed_addr
587375fa138SDuncan P. N. Exon Smith
588375fa138SDuncan P. N. Exon Smith; Functions -- fn Attrs (Function attributes)
589375fa138SDuncan P. N. Exon Smithdeclare void @f.alignstack4() alignstack(4)
590375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.alignstack4() #0
591375fa138SDuncan P. N. Exon Smithdeclare void @f.alignstack8() alignstack(8)
592375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.alignstack8() #1
593375fa138SDuncan P. N. Exon Smithdeclare void @f.alwaysinline() alwaysinline
594375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.alwaysinline() #2
595375fa138SDuncan P. N. Exon Smithdeclare void @f.cold() cold
596375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.cold() #3
597375fa138SDuncan P. N. Exon Smithdeclare void @f.convergent() convergent
598375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.convergent() #4
599375fa138SDuncan P. N. Exon Smithdeclare void @f.inlinehint() inlinehint
600375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.inlinehint() #5
601375fa138SDuncan P. N. Exon Smithdeclare void @f.jumptable() unnamed_addr jumptable
602375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.jumptable() unnamed_addr #6
603375fa138SDuncan P. N. Exon Smithdeclare void @f.minsize() minsize
604375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.minsize() #7
605375fa138SDuncan P. N. Exon Smithdeclare void @f.naked() naked
606375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.naked() #8
607375fa138SDuncan P. N. Exon Smithdeclare void @f.nobuiltin() nobuiltin
608375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.nobuiltin() #9
609375fa138SDuncan P. N. Exon Smithdeclare void @f.noduplicate() noduplicate
610375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.noduplicate() #10
611375fa138SDuncan P. N. Exon Smithdeclare void @f.noimplicitfloat() noimplicitfloat
612375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.noimplicitfloat() #11
613375fa138SDuncan P. N. Exon Smithdeclare void @f.noinline() noinline
614375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.noinline() #12
615375fa138SDuncan P. N. Exon Smithdeclare void @f.nonlazybind() nonlazybind
616375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.nonlazybind() #13
617375fa138SDuncan P. N. Exon Smithdeclare void @f.noredzone() noredzone
618375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.noredzone() #14
619375fa138SDuncan P. N. Exon Smithdeclare void @f.noreturn() noreturn
620375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.noreturn() #15
621375fa138SDuncan P. N. Exon Smithdeclare void @f.nounwind() nounwind
622375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.nounwind() #16
623375fa138SDuncan P. N. Exon Smithdeclare void @f.optnone() noinline optnone
624375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.optnone() #17
625375fa138SDuncan P. N. Exon Smithdeclare void @f.optsize() optsize
626375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.optsize() #18
627375fa138SDuncan P. N. Exon Smithdeclare void @f.readnone() readnone
628375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.readnone() #19
629375fa138SDuncan P. N. Exon Smithdeclare void @f.readonly() readonly
630375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.readonly() #20
631375fa138SDuncan P. N. Exon Smithdeclare void @f.returns_twice() returns_twice
632375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.returns_twice() #21
633375fa138SDuncan P. N. Exon Smithdeclare void @f.safestack() safestack
634375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.safestack() #22
635375fa138SDuncan P. N. Exon Smithdeclare void @f.sanitize_address() sanitize_address
636375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.sanitize_address() #23
637375fa138SDuncan P. N. Exon Smithdeclare void @f.sanitize_memory() sanitize_memory
638375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.sanitize_memory() #24
639375fa138SDuncan P. N. Exon Smithdeclare void @f.sanitize_thread() sanitize_thread
640375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.sanitize_thread() #25
641375fa138SDuncan P. N. Exon Smithdeclare void @f.ssp() ssp
642375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.ssp() #26
643375fa138SDuncan P. N. Exon Smithdeclare void @f.sspreq() sspreq
644375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.sspreq() #27
645375fa138SDuncan P. N. Exon Smithdeclare void @f.sspstrong() sspstrong
646375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.sspstrong() #28
647375fa138SDuncan P. N. Exon Smithdeclare void @f.thunk() "thunk"
648375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.thunk() #29
649375fa138SDuncan P. N. Exon Smithdeclare void @f.uwtable() uwtable
650375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.uwtable() #30
651375fa138SDuncan P. N. Exon Smithdeclare void @f.kvpair() "cpu"="cortex-a8"
652375fa138SDuncan P. N. Exon Smith; CHECK:declare void @f.kvpair() #31
653e6f87ca8SJames Molloydeclare void @f.norecurse() norecurse
654e6f87ca8SJames Molloy; CHECK: declare void @f.norecurse() #32
655fb3f4907SVaivaswatha Nagarajdeclare void @f.inaccessiblememonly() inaccessiblememonly
656fb3f4907SVaivaswatha Nagaraj; CHECK: declare void @f.inaccessiblememonly() #33
657fb3f4907SVaivaswatha Nagarajdeclare void @f.inaccessiblemem_or_argmemonly() inaccessiblemem_or_argmemonly
658fb3f4907SVaivaswatha Nagaraj; CHECK: declare void @f.inaccessiblemem_or_argmemonly() #34
65953a5fbb4SAndrew Kaylordeclare void @f.strictfp() #35
660375fa138SDuncan P. N. Exon Smith
661375fa138SDuncan P. N. Exon Smith; Functions -- section
662375fa138SDuncan P. N. Exon Smithdeclare void @f.section() section "80"
663375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.section() section "80"
664375fa138SDuncan P. N. Exon Smith
66531fda09bSPeter Collingbourne; Functions -- partition
66631fda09bSPeter Collingbournedefine void @f.partition() partition "part" {
66731fda09bSPeter Collingbourne; CHECK: define void @f.partition() partition "part"
66831fda09bSPeter Collingbourne  ret void
66931fda09bSPeter Collingbourne}
67031fda09bSPeter Collingbourne
671375fa138SDuncan P. N. Exon Smith; Functions -- comdat
672375fa138SDuncan P. N. Exon Smithdefine void @f.comdat_any() comdat($comdat.any) {
673375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.comdat_any() comdat($comdat.any)
674375fa138SDuncan P. N. Exon Smithentry:
675375fa138SDuncan P. N. Exon Smith  ret void
676375fa138SDuncan P. N. Exon Smith}
677375fa138SDuncan P. N. Exon Smithdefine void @f.comdat_exactmatch() comdat($comdat.exactmatch) {
678375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.comdat_exactmatch() comdat($comdat.exactmatch)
679375fa138SDuncan P. N. Exon Smithentry:
680375fa138SDuncan P. N. Exon Smith  ret void
681375fa138SDuncan P. N. Exon Smith}
682375fa138SDuncan P. N. Exon Smithdefine void @f.comdat_largest() comdat($comdat.largest) {
683375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.comdat_largest() comdat($comdat.largest)
684375fa138SDuncan P. N. Exon Smithentry:
685375fa138SDuncan P. N. Exon Smith  ret void
686375fa138SDuncan P. N. Exon Smith}
687375fa138SDuncan P. N. Exon Smithdefine void @f.comdat_noduplicates() comdat($comdat.noduplicates) {
688375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.comdat_noduplicates() comdat($comdat.noduplicates)
689375fa138SDuncan P. N. Exon Smithentry:
690375fa138SDuncan P. N. Exon Smith  ret void
691375fa138SDuncan P. N. Exon Smith}
692375fa138SDuncan P. N. Exon Smithdefine void @f.comdat_samesize() comdat($comdat.samesize) {
693375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.comdat_samesize() comdat($comdat.samesize)
694375fa138SDuncan P. N. Exon Smithentry:
695375fa138SDuncan P. N. Exon Smith  ret void
696375fa138SDuncan P. N. Exon Smith}
697375fa138SDuncan P. N. Exon Smith
698375fa138SDuncan P. N. Exon Smith; Functions -- align
699375fa138SDuncan P. N. Exon Smithdeclare void @f.align2() align 2
700375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.align2() align 2
701375fa138SDuncan P. N. Exon Smithdeclare void @f.align4() align 4
702375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.align4() align 4
703375fa138SDuncan P. N. Exon Smithdeclare void @f.align8() align 8
704375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.align8() align 8
705375fa138SDuncan P. N. Exon Smith
706375fa138SDuncan P. N. Exon Smith; Functions -- GC
707375fa138SDuncan P. N. Exon Smithdeclare void @f.gcshadow() gc "shadow-stack"
708375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.gcshadow() gc "shadow-stack"
709375fa138SDuncan P. N. Exon Smith
710375fa138SDuncan P. N. Exon Smith; Functions -- Prefix data
711375fa138SDuncan P. N. Exon Smithdeclare void @f.prefixi32() prefix i32 1684365668
712375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.prefixi32() prefix i32 1684365668
713375fa138SDuncan P. N. Exon Smithdeclare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3]
714375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.prefixarray() prefix [4 x i32] [i32 0, i32 1, i32 2, i32 3]
715375fa138SDuncan P. N. Exon Smith
716375fa138SDuncan P. N. Exon Smith; Functions -- Prologue data
717375fa138SDuncan P. N. Exon Smithdeclare void @f.prologuei32() prologue i32 1684365669
718375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.prologuei32() prologue i32 1684365669
719375fa138SDuncan P. N. Exon Smithdeclare void @f.prologuearray() prologue [4 x i32] [i32 0, i32 1, i32 2, i32 3]
720375fa138SDuncan P. N. Exon Smith; CHECK: declare void @f.prologuearray() prologue [4 x i32] [i32 0, i32 1, i32 2, i32 3]
721375fa138SDuncan P. N. Exon Smith
722375fa138SDuncan P. N. Exon Smith; Functions -- Personality constant
723375fa138SDuncan P. N. Exon Smithdeclare void @llvm.donothing() nounwind readnone
724fb3f4907SVaivaswatha Nagaraj; CHECK: declare void @llvm.donothing() #35
725375fa138SDuncan P. N. Exon Smithdefine void @f.no_personality() personality i8 3 {
726375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.no_personality() personality i8 3
727375fa138SDuncan P. N. Exon Smith  invoke void @llvm.donothing() to label %normal unwind label %exception
728375fa138SDuncan P. N. Exon Smithexception:
729375fa138SDuncan P. N. Exon Smith  %cleanup = landingpad i8 cleanup
730375fa138SDuncan P. N. Exon Smith  br label %normal
731375fa138SDuncan P. N. Exon Smithnormal:
732375fa138SDuncan P. N. Exon Smith  ret void
733375fa138SDuncan P. N. Exon Smith}
734375fa138SDuncan P. N. Exon Smith
735375fa138SDuncan P. N. Exon Smithdeclare i32 @f.personality_handler()
736375fa138SDuncan P. N. Exon Smith; CHECK: declare i32 @f.personality_handler()
737375fa138SDuncan P. N. Exon Smithdefine void @f.personality() personality i32 ()* @f.personality_handler {
738375fa138SDuncan P. N. Exon Smith; CHECK: define void @f.personality() personality i32 ()* @f.personality_handler
739375fa138SDuncan P. N. Exon Smith  invoke void @llvm.donothing() to label %normal unwind label %exception
740375fa138SDuncan P. N. Exon Smithexception:
741375fa138SDuncan P. N. Exon Smith  %cleanup = landingpad i32 cleanup
742375fa138SDuncan P. N. Exon Smith  br label %normal
743375fa138SDuncan P. N. Exon Smithnormal:
744375fa138SDuncan P. N. Exon Smith  ret void
745375fa138SDuncan P. N. Exon Smith}
746375fa138SDuncan P. N. Exon Smith
747375fa138SDuncan P. N. Exon Smith;; Atomic Memory Ordering Constraints
748375fa138SDuncan P. N. Exon Smithdefine void @atomics(i32* %word) {
74917517f31SGuillaume Chatelet  ;; Atomic Compare And Exchange w/o alignment
75017517f31SGuillaume Chatelet  %cmpxchg_no_align.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic
75117517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic
75217517f31SGuillaume Chatelet  %cmpxchg_no_align.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic
75317517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic
75417517f31SGuillaume Chatelet  %cmpxchg_no_align.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic
75517517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic
75617517f31SGuillaume Chatelet  %cmpxchg_no_align.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic
75717517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic
75817517f31SGuillaume Chatelet  %cmpxchg_no_align.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic
75917517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic
76017517f31SGuillaume Chatelet  %cmpxchg_no_align.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic
76117517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic
76217517f31SGuillaume Chatelet  %cmpxchg_no_align.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic
76317517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic
76417517f31SGuillaume Chatelet  %cmpxchg_no_align.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 syncscope("singlethread") seq_cst monotonic
76517517f31SGuillaume Chatelet  ; CHECK: %cmpxchg_no_align.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 syncscope("singlethread") seq_cst monotonic
76617517f31SGuillaume Chatelet
76717517f31SGuillaume Chatelet  ;; Atomic Compare And Exchange w/ alignment
76817517f31SGuillaume Chatelet  %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic, align 16
76917517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.0 = cmpxchg i32* %word, i32 0, i32 4 monotonic monotonic, align 16
77017517f31SGuillaume Chatelet  %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic, align 16
77117517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.1 = cmpxchg i32* %word, i32 0, i32 5 acq_rel monotonic, align 16
77217517f31SGuillaume Chatelet  %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic, align 16
77317517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.2 = cmpxchg i32* %word, i32 0, i32 6 acquire monotonic, align 16
77417517f31SGuillaume Chatelet  %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic, align 16
77517517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.3 = cmpxchg i32* %word, i32 0, i32 7 release monotonic, align 16
77617517f31SGuillaume Chatelet  %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic, align 16
77717517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.4 = cmpxchg i32* %word, i32 0, i32 8 seq_cst monotonic, align 16
77817517f31SGuillaume Chatelet  %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic, align 16
77917517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.5 = cmpxchg weak i32* %word, i32 0, i32 9 seq_cst monotonic, align 16
78017517f31SGuillaume Chatelet  %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic, align 16
78117517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.6 = cmpxchg volatile i32* %word, i32 0, i32 10 seq_cst monotonic, align 16
78217517f31SGuillaume Chatelet  %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 syncscope("singlethread") seq_cst monotonic, align 16
78317517f31SGuillaume Chatelet  ; CHECK: %cmpxchg.7 = cmpxchg weak volatile i32* %word, i32 0, i32 11 syncscope("singlethread") seq_cst monotonic, align 16
784d06ab798SGuillaume Chatelet
785d06ab798SGuillaume Chatelet  ;; Atomic w/o alignment
786d06ab798SGuillaume Chatelet  %atomicrmw_no_align.xchg = atomicrmw xchg i32* %word, i32 12 monotonic
787d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.xchg = atomicrmw xchg i32* %word, i32 12 monotonic
788d06ab798SGuillaume Chatelet  %atomicrmw_no_align.add = atomicrmw add i32* %word, i32 13 monotonic
789d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.add = atomicrmw add i32* %word, i32 13 monotonic
790d06ab798SGuillaume Chatelet  %atomicrmw_no_align.sub = atomicrmw sub i32* %word, i32 14 monotonic
791d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.sub = atomicrmw sub i32* %word, i32 14 monotonic
792d06ab798SGuillaume Chatelet  %atomicrmw_no_align.and = atomicrmw and i32* %word, i32 15 monotonic
793d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.and = atomicrmw and i32* %word, i32 15 monotonic
794d06ab798SGuillaume Chatelet  %atomicrmw_no_align.nand = atomicrmw nand i32* %word, i32 16 monotonic
795d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.nand = atomicrmw nand i32* %word, i32 16 monotonic
796d06ab798SGuillaume Chatelet  %atomicrmw_no_align.or = atomicrmw or i32* %word, i32 17 monotonic
797d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.or = atomicrmw or i32* %word, i32 17 monotonic
798d06ab798SGuillaume Chatelet  %atomicrmw_no_align.xor = atomicrmw xor i32* %word, i32 18 monotonic
799d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.xor = atomicrmw xor i32* %word, i32 18 monotonic
800d06ab798SGuillaume Chatelet  %atomicrmw_no_align.max = atomicrmw max i32* %word, i32 19 monotonic
801d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.max = atomicrmw max i32* %word, i32 19 monotonic
802d06ab798SGuillaume Chatelet  %atomicrmw_no_align.min = atomicrmw volatile min i32* %word, i32 20 monotonic
803d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.min = atomicrmw volatile min i32* %word, i32 20 monotonic
804d06ab798SGuillaume Chatelet  %atomicrmw_no_align.umax = atomicrmw umax i32* %word, i32 21 syncscope("singlethread") monotonic
805d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.umax = atomicrmw umax i32* %word, i32 21 syncscope("singlethread") monotonic
806d06ab798SGuillaume Chatelet  %atomicrmw_no_align.umin = atomicrmw volatile umin i32* %word, i32 22 syncscope("singlethread") monotonic
807d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw_no_align.umin = atomicrmw volatile umin i32* %word, i32 22 syncscope("singlethread") monotonic
808d06ab798SGuillaume Chatelet
809d06ab798SGuillaume Chatelet  ;; Atomic w/ alignment
810d06ab798SGuillaume Chatelet  %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic, align 16
811d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.xchg = atomicrmw xchg i32* %word, i32 12 monotonic, align 16
812d06ab798SGuillaume Chatelet  %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic, align 16
813d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.add = atomicrmw add i32* %word, i32 13 monotonic, align 16
814d06ab798SGuillaume Chatelet  %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic, align 16
815d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.sub = atomicrmw sub i32* %word, i32 14 monotonic, align 16
816d06ab798SGuillaume Chatelet  %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic, align 16
817d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.and = atomicrmw and i32* %word, i32 15 monotonic, align 16
818d06ab798SGuillaume Chatelet  %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic, align 16
819d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.nand = atomicrmw nand i32* %word, i32 16 monotonic, align 16
820d06ab798SGuillaume Chatelet  %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic, align 16
821d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.or = atomicrmw or i32* %word, i32 17 monotonic, align 16
822d06ab798SGuillaume Chatelet  %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic, align 16
823d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.xor = atomicrmw xor i32* %word, i32 18 monotonic, align 16
824d06ab798SGuillaume Chatelet  %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic, align 16
825d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.max = atomicrmw max i32* %word, i32 19 monotonic, align 16
826d06ab798SGuillaume Chatelet  %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic, align 16
827d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.min = atomicrmw volatile min i32* %word, i32 20 monotonic, align 16
828d06ab798SGuillaume Chatelet  %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 syncscope("singlethread") monotonic, align 16
829d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.umax = atomicrmw umax i32* %word, i32 21 syncscope("singlethread") monotonic, align 16
830d06ab798SGuillaume Chatelet  %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 syncscope("singlethread") monotonic, align 16
831d06ab798SGuillaume Chatelet  ; CHECK: %atomicrmw.umin = atomicrmw volatile umin i32* %word, i32 22 syncscope("singlethread") monotonic, align 16
832d06ab798SGuillaume Chatelet
833375fa138SDuncan P. N. Exon Smith  fence acquire
834375fa138SDuncan P. N. Exon Smith  ; CHECK: fence acquire
835375fa138SDuncan P. N. Exon Smith  fence release
836375fa138SDuncan P. N. Exon Smith  ; CHECK: fence release
837375fa138SDuncan P. N. Exon Smith  fence acq_rel
838375fa138SDuncan P. N. Exon Smith  ; CHECK: fence acq_rel
839bb80d3e1SKonstantin Zhuravlyov  fence syncscope("singlethread") seq_cst
840bb80d3e1SKonstantin Zhuravlyov  ; CHECK: fence syncscope("singlethread") seq_cst
841375fa138SDuncan P. N. Exon Smith
842375fa138SDuncan P. N. Exon Smith  %ld.1 = load atomic i32, i32* %word monotonic, align 4
843375fa138SDuncan P. N. Exon Smith  ; CHECK: %ld.1 = load atomic i32, i32* %word monotonic, align 4
844375fa138SDuncan P. N. Exon Smith  %ld.2 = load atomic volatile i32, i32* %word acquire, align 8
845375fa138SDuncan P. N. Exon Smith  ; CHECK: %ld.2 = load atomic volatile i32, i32* %word acquire, align 8
846bb80d3e1SKonstantin Zhuravlyov  %ld.3 = load atomic volatile i32, i32* %word syncscope("singlethread") seq_cst, align 16
847bb80d3e1SKonstantin Zhuravlyov  ; CHECK: %ld.3 = load atomic volatile i32, i32* %word syncscope("singlethread") seq_cst, align 16
848375fa138SDuncan P. N. Exon Smith
849375fa138SDuncan P. N. Exon Smith  store atomic i32 23, i32* %word monotonic, align 4
850375fa138SDuncan P. N. Exon Smith  ; CHECK: store atomic i32 23, i32* %word monotonic, align 4
851375fa138SDuncan P. N. Exon Smith  store atomic volatile i32 24, i32* %word monotonic, align 4
852375fa138SDuncan P. N. Exon Smith  ; CHECK: store atomic volatile i32 24, i32* %word monotonic, align 4
853bb80d3e1SKonstantin Zhuravlyov  store atomic volatile i32 25, i32* %word syncscope("singlethread") monotonic, align 4
854bb80d3e1SKonstantin Zhuravlyov  ; CHECK: store atomic volatile i32 25, i32* %word syncscope("singlethread") monotonic, align 4
855375fa138SDuncan P. N. Exon Smith  ret void
856375fa138SDuncan P. N. Exon Smith}
857375fa138SDuncan P. N. Exon Smith
8580cb08e44SMatt Arsenaultdefine void @fp_atomics(float* %word) {
8590cb08e44SMatt Arsenault; CHECK: %atomicrmw.xchg = atomicrmw xchg float* %word, float 1.000000e+00 monotonic
8600cb08e44SMatt Arsenault  %atomicrmw.xchg = atomicrmw xchg float* %word, float 1.0 monotonic
86139508331SMatt Arsenault
86239508331SMatt Arsenault; CHECK: %atomicrmw.fadd = atomicrmw fadd float* %word, float 1.000000e+00 monotonic
86339508331SMatt Arsenault  %atomicrmw.fadd = atomicrmw fadd float* %word, float 1.0 monotonic
86439508331SMatt Arsenault
86539508331SMatt Arsenault; CHECK: %atomicrmw.fsub = atomicrmw fsub float* %word, float 1.000000e+00 monotonic
86639508331SMatt Arsenault  %atomicrmw.fsub = atomicrmw fsub float* %word, float 1.0 monotonic
86739508331SMatt Arsenault
8681023ddafSShilei Tian; CHECK: %atomicrmw.fmax = atomicrmw fmax float* %word, float 1.000000e+00 monotonic
8691023ddafSShilei Tian  %atomicrmw.fmax = atomicrmw fmax float* %word, float 1.0 monotonic
8701023ddafSShilei Tian
8711023ddafSShilei Tian; CHECK: %atomicrmw.fmin = atomicrmw fmin float* %word, float 1.000000e+00 monotonic
8721023ddafSShilei Tian  %atomicrmw.fmin = atomicrmw fmin float* %word, float 1.0 monotonic
8731023ddafSShilei Tian
8740cb08e44SMatt Arsenault  ret void
8750cb08e44SMatt Arsenault}
8760cb08e44SMatt Arsenault
87718e6b823STakafumi Arakakidefine void @pointer_atomics(i8** %word) {
87818e6b823STakafumi Arakaki; CHECK: %atomicrmw.xchg = atomicrmw xchg i8** %word, i8* null monotonic
87918e6b823STakafumi Arakaki  %atomicrmw.xchg = atomicrmw xchg i8** %word, i8* null monotonic
88018e6b823STakafumi Arakaki  ret void
88118e6b823STakafumi Arakaki}
88218e6b823STakafumi Arakaki
883375fa138SDuncan P. N. Exon Smith;; Fast Math Flags
884cbde0d9cSCameron McInallydefine void @fastmathflags_unop(float %op1) {
885cbde0d9cSCameron McInally  %f.nnan = fneg nnan float %op1
886cbde0d9cSCameron McInally  ; CHECK: %f.nnan = fneg nnan float %op1
887cbde0d9cSCameron McInally  %f.ninf = fneg ninf float %op1
888cbde0d9cSCameron McInally  ; CHECK: %f.ninf = fneg ninf float %op1
889cbde0d9cSCameron McInally  %f.nsz = fneg nsz float %op1
890cbde0d9cSCameron McInally  ; CHECK: %f.nsz = fneg nsz float %op1
891cbde0d9cSCameron McInally  %f.arcp = fneg arcp float %op1
892cbde0d9cSCameron McInally  ; CHECK: %f.arcp = fneg arcp float %op1
893cbde0d9cSCameron McInally  %f.contract = fneg contract float %op1
894cbde0d9cSCameron McInally  ; CHECK: %f.contract = fneg contract float %op1
895cbde0d9cSCameron McInally  %f.afn = fneg afn float %op1
896cbde0d9cSCameron McInally  ; CHECK: %f.afn = fneg afn float %op1
897cbde0d9cSCameron McInally  %f.reassoc = fneg reassoc float %op1
898cbde0d9cSCameron McInally  ; CHECK: %f.reassoc = fneg reassoc float %op1
899cbde0d9cSCameron McInally  %f.fast = fneg fast float %op1
900cbde0d9cSCameron McInally  ; CHECK: %f.fast = fneg fast float %op1
901cbde0d9cSCameron McInally  ret void
902cbde0d9cSCameron McInally}
903cbde0d9cSCameron McInally
904cbde0d9cSCameron McInallydefine void @fastmathflags_binops(float %op1, float %op2) {
905375fa138SDuncan P. N. Exon Smith  %f.nnan = fadd nnan float %op1, %op2
906375fa138SDuncan P. N. Exon Smith  ; CHECK: %f.nnan = fadd nnan float %op1, %op2
907375fa138SDuncan P. N. Exon Smith  %f.ninf = fadd ninf float %op1, %op2
908375fa138SDuncan P. N. Exon Smith  ; CHECK: %f.ninf = fadd ninf float %op1, %op2
909375fa138SDuncan P. N. Exon Smith  %f.nsz = fadd nsz float %op1, %op2
910375fa138SDuncan P. N. Exon Smith  ; CHECK: %f.nsz = fadd nsz float %op1, %op2
911375fa138SDuncan P. N. Exon Smith  %f.arcp = fadd arcp float %op1, %op2
912375fa138SDuncan P. N. Exon Smith  ; CHECK: %f.arcp = fadd arcp float %op1, %op2
913cd847a8fSAdam Nemet  %f.contract = fadd contract float %op1, %op2
914cd847a8fSAdam Nemet  ; CHECK: %f.contract = fadd contract float %op1, %op2
915629c4115SSanjay Patel  %f.afn = fadd afn float %op1, %op2
916629c4115SSanjay Patel  ; CHECK: %f.afn = fadd afn float %op1, %op2
917629c4115SSanjay Patel  %f.reassoc = fadd reassoc float %op1, %op2
918629c4115SSanjay Patel  ; CHECK: %f.reassoc = fadd reassoc float %op1, %op2
919375fa138SDuncan P. N. Exon Smith  %f.fast = fadd fast float %op1, %op2
920375fa138SDuncan P. N. Exon Smith  ; CHECK: %f.fast = fadd fast float %op1, %op2
921375fa138SDuncan P. N. Exon Smith  ret void
922375fa138SDuncan P. N. Exon Smith}
923375fa138SDuncan P. N. Exon Smith
9245a4f7cf2SSanjay Pateldefine void @fastmathflags_select(i1 %cond, float %op1, float %op2) {
9255a4f7cf2SSanjay Patel  %f.nnan = select nnan i1 %cond, float %op1, float %op2
9265a4f7cf2SSanjay Patel  ; CHECK: %f.nnan = select nnan i1 %cond, float %op1, float %op2
9275a4f7cf2SSanjay Patel  %f.ninf = select ninf i1 %cond, float %op1, float %op2
9285a4f7cf2SSanjay Patel  ; CHECK: %f.ninf = select ninf i1 %cond, float %op1, float %op2
9295a4f7cf2SSanjay Patel  %f.nsz = select nsz i1 %cond, float %op1, float %op2
9305a4f7cf2SSanjay Patel  ; CHECK: %f.nsz = select nsz i1 %cond, float %op1, float %op2
9315a4f7cf2SSanjay Patel  %f.arcp = select arcp i1 %cond, float %op1, float %op2
9325a4f7cf2SSanjay Patel  ; CHECK: %f.arcp = select arcp i1 %cond, float %op1, float %op2
9335a4f7cf2SSanjay Patel  %f.contract = select contract i1 %cond, float %op1, float %op2
9345a4f7cf2SSanjay Patel  ; CHECK: %f.contract = select contract i1 %cond, float %op1, float %op2
9355a4f7cf2SSanjay Patel  %f.afn = select afn i1 %cond, float %op1, float %op2
9365a4f7cf2SSanjay Patel  ; CHECK: %f.afn = select afn i1 %cond, float %op1, float %op2
9375a4f7cf2SSanjay Patel  %f.reassoc = select reassoc i1 %cond, float %op1, float %op2
9385a4f7cf2SSanjay Patel  ; CHECK: %f.reassoc = select reassoc i1 %cond, float %op1, float %op2
9395a4f7cf2SSanjay Patel  %f.fast = select fast i1 %cond, float %op1, float %op2
9405a4f7cf2SSanjay Patel  ; CHECK: %f.fast = select fast i1 %cond, float %op1, float %op2
9415a4f7cf2SSanjay Patel  ret void
9425a4f7cf2SSanjay Patel}
9435a4f7cf2SSanjay Patel
9445a4f7cf2SSanjay Pateldefine void @fastmathflags_vector_select(<2 x i1> %cond, <2 x double> %op1, <2 x double> %op2) {
9455a4f7cf2SSanjay Patel  %f.nnan.nsz = select nnan nsz <2 x i1> %cond, <2 x double> %op1, <2 x double> %op2
9465a4f7cf2SSanjay Patel  ; CHECK: %f.nnan.nsz = select nnan nsz <2 x i1> %cond, <2 x double> %op1, <2 x double> %op2
9475a4f7cf2SSanjay Patel  %f.fast = select fast <2 x i1> %cond, <2 x double> %op1, <2 x double> %op2
9485a4f7cf2SSanjay Patel  ; CHECK: %f.fast = select fast <2 x i1> %cond, <2 x double> %op1, <2 x double> %op2
9495a4f7cf2SSanjay Patel  ret void
9505a4f7cf2SSanjay Patel}
9515a4f7cf2SSanjay Patel
9522da4b6e5SJay Foaddefine void @fastmathflags_array_select(i1 %cond, [2 x double] %op1, [2 x double] %op2) {
9532da4b6e5SJay Foad  %f.nnan.nsz = select nnan nsz i1 %cond, [2 x double] %op1, [2 x double] %op2
9542da4b6e5SJay Foad  ; CHECK: %f.nnan.nsz = select nnan nsz i1 %cond, [2 x double] %op1, [2 x double] %op2
9552da4b6e5SJay Foad  %f.fast = select fast i1 %cond, [2 x double] %op1, [2 x double] %op2
9562da4b6e5SJay Foad  ; CHECK: %f.fast = select fast i1 %cond, [2 x double] %op1, [2 x double] %op2
9572da4b6e5SJay Foad  ret void
9582da4b6e5SJay Foad}
9592da4b6e5SJay Foad
9606d4ea22eSSanjay Pateldefine void @fastmathflags_phi(i1 %cond, float %f1, float %f2, double %d1, double %d2, half %h1, half %h2) {
9616d4ea22eSSanjay Patelentry:
9626d4ea22eSSanjay Patel  br i1 %cond, label %L1, label %L2
9636d4ea22eSSanjay PatelL1:
9646d4ea22eSSanjay Patel  br label %exit
9656d4ea22eSSanjay PatelL2:
9666d4ea22eSSanjay Patel  br label %exit
9676d4ea22eSSanjay Patelexit:
9686d4ea22eSSanjay Patel  %p.nnan = phi nnan float [ %f1, %L1 ], [ %f2, %L2 ]
9696d4ea22eSSanjay Patel  ; CHECK: %p.nnan = phi nnan float [ %f1, %L1 ], [ %f2, %L2 ]
9706d4ea22eSSanjay Patel  %p.ninf = phi ninf double [ %d1, %L1 ], [ %d2, %L2 ]
9716d4ea22eSSanjay Patel  ; CHECK: %p.ninf = phi ninf double [ %d1, %L1 ], [ %d2, %L2 ]
9726d4ea22eSSanjay Patel  %p.contract = phi contract half [ %h1, %L1 ], [ %h2, %L2 ]
9736d4ea22eSSanjay Patel  ; CHECK: %p.contract = phi contract half [ %h1, %L1 ], [ %h2, %L2 ]
9746d4ea22eSSanjay Patel  %p.nsz.reassoc = phi reassoc nsz float [ %f1, %L1 ], [ %f2, %L2 ]
9756d4ea22eSSanjay Patel  ; CHECK: %p.nsz.reassoc = phi reassoc nsz float [ %f1, %L1 ], [ %f2, %L2 ]
9766d4ea22eSSanjay Patel  %p.fast = phi fast half [ %h2, %L1 ], [ %h1, %L2 ]
9776d4ea22eSSanjay Patel  ; CHECK: %p.fast = phi fast half [ %h2, %L1 ], [ %h1, %L2 ]
9786d4ea22eSSanjay Patel  ret void
9796d4ea22eSSanjay Patel}
9806d4ea22eSSanjay Patel
9815af0201cSMichael Bergdefine void @fastmathflags_vector_phi(i1 %cond, <4 x float> %f1, <4 x float> %f2, <2 x double> %d1, <2 x double> %d2, <8 x half> %h1, <8 x half> %h2) {
9825af0201cSMichael Bergentry:
9835af0201cSMichael Berg  br i1 %cond, label %L1, label %L2
9845af0201cSMichael BergL1:
9855af0201cSMichael Berg  br label %exit
9865af0201cSMichael BergL2:
9875af0201cSMichael Berg  br label %exit
9885af0201cSMichael Bergexit:
9895af0201cSMichael Berg  %p.nnan = phi nnan <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
9905af0201cSMichael Berg  ; CHECK: %p.nnan = phi nnan <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
9915af0201cSMichael Berg  %p.ninf = phi ninf <2 x double> [ %d1, %L1 ], [ %d2, %L2 ]
9925af0201cSMichael Berg  ; CHECK: %p.ninf = phi ninf <2 x double> [ %d1, %L1 ], [ %d2, %L2 ]
9935af0201cSMichael Berg  %p.contract = phi contract <8 x half> [ %h1, %L1 ], [ %h2, %L2 ]
9945af0201cSMichael Berg  ; CHECK: %p.contract = phi contract <8 x half> [ %h1, %L1 ], [ %h2, %L2 ]
9955af0201cSMichael Berg  %p.nsz.reassoc = phi reassoc nsz <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
9965af0201cSMichael Berg  ; CHECK: %p.nsz.reassoc = phi reassoc nsz <4 x float> [ %f1, %L1 ], [ %f2, %L2 ]
9975af0201cSMichael Berg  %p.fast = phi fast <8 x half> [ %h2, %L1 ], [ %h1, %L2 ]
9985af0201cSMichael Berg  ; CHECK: %p.fast = phi fast <8 x half> [ %h2, %L1 ], [ %h1, %L2 ]
9995af0201cSMichael Berg  ret void
10005af0201cSMichael Berg}
10015af0201cSMichael Berg
10022da4b6e5SJay Foaddefine void @fastmathflags_array_phi(i1 %cond, [4 x float] %f1, [4 x float] %f2, [2 x double] %d1, [2 x double] %d2, [8 x half] %h1, [8 x half] %h2) {
10032da4b6e5SJay Foadentry:
10042da4b6e5SJay Foad  br i1 %cond, label %L1, label %L2
10052da4b6e5SJay FoadL1:
10062da4b6e5SJay Foad  br label %exit
10072da4b6e5SJay FoadL2:
10082da4b6e5SJay Foad  br label %exit
10092da4b6e5SJay Foadexit:
10102da4b6e5SJay Foad  %p.nnan = phi nnan [4 x float] [ %f1, %L1 ], [ %f2, %L2 ]
10112da4b6e5SJay Foad  ; CHECK: %p.nnan = phi nnan [4 x float] [ %f1, %L1 ], [ %f2, %L2 ]
10122da4b6e5SJay Foad  %p.ninf = phi ninf [2 x double] [ %d1, %L1 ], [ %d2, %L2 ]
10132da4b6e5SJay Foad  ; CHECK: %p.ninf = phi ninf [2 x double] [ %d1, %L1 ], [ %d2, %L2 ]
10142da4b6e5SJay Foad  %p.contract = phi contract [8 x half] [ %h1, %L1 ], [ %h2, %L2 ]
10152da4b6e5SJay Foad  ; CHECK: %p.contract = phi contract [8 x half] [ %h1, %L1 ], [ %h2, %L2 ]
10162da4b6e5SJay Foad  %p.nsz.reassoc = phi reassoc nsz [4 x float] [ %f1, %L1 ], [ %f2, %L2 ]
10172da4b6e5SJay Foad  ; CHECK: %p.nsz.reassoc = phi reassoc nsz [4 x float] [ %f1, %L1 ], [ %f2, %L2 ]
10182da4b6e5SJay Foad  %p.fast = phi fast [8 x half] [ %h2, %L1 ], [ %h1, %L2 ]
10192da4b6e5SJay Foad  ; CHECK: %p.fast = phi fast [8 x half] [ %h2, %L1 ], [ %h1, %L2 ]
10202da4b6e5SJay Foad  ret void
10212da4b6e5SJay Foad}
10222da4b6e5SJay Foad
1023fa54acedSSanjay Patel; Check various fast math flags and floating-point types on calls.
1024fa54acedSSanjay Patel
10252da4b6e5SJay Foaddeclare float @fmf_f32()
10262da4b6e5SJay Foaddeclare double @fmf_f64()
10272da4b6e5SJay Foaddeclare <4 x double> @fmf_v4f64()
1028fa54acedSSanjay Patel
1029fa54acedSSanjay Patel; CHECK-LABEL: fastMathFlagsForCalls(
1030fa54acedSSanjay Pateldefine void @fastMathFlagsForCalls(float %f, double %d1, <4 x double> %d2) {
10312da4b6e5SJay Foad  %call.fast = call fast float @fmf_f32()
10322da4b6e5SJay Foad  ; CHECK: %call.fast = call fast float @fmf_f32()
1033fa54acedSSanjay Patel
1034fa54acedSSanjay Patel  ; Throw in some other attributes to make sure those stay in the right places.
1035fa54acedSSanjay Patel
10362da4b6e5SJay Foad  %call.nsz.arcp = notail call nsz arcp double @fmf_f64()
10372da4b6e5SJay Foad  ; CHECK: %call.nsz.arcp = notail call nsz arcp double @fmf_f64()
1038fa54acedSSanjay Patel
10392da4b6e5SJay Foad  %call.nnan.ninf = tail call nnan ninf fastcc <4 x double> @fmf_v4f64()
10402da4b6e5SJay Foad  ; CHECK: %call.nnan.ninf = tail call nnan ninf fastcc <4 x double> @fmf_v4f64()
10412da4b6e5SJay Foad
10422da4b6e5SJay Foad  ret void
10432da4b6e5SJay Foad}
10442da4b6e5SJay Foad
10452da4b6e5SJay Foaddeclare [2 x float] @fmf_a2f32()
10462da4b6e5SJay Foaddeclare [2 x double] @fmf_a2f64()
10472da4b6e5SJay Foaddeclare [2 x <4 x double>] @fmf_a2v4f64()
10482da4b6e5SJay Foad
10492da4b6e5SJay Foad; CHECK-LABEL: fastMathFlagsForArrayCalls(
10502da4b6e5SJay Foaddefine void @fastMathFlagsForArrayCalls([2 x float] %f, [2 x double] %d1, [2 x <4 x double>] %d2) {
10512da4b6e5SJay Foad  %call.fast = call fast [2 x float] @fmf_a2f32()
10522da4b6e5SJay Foad  ; CHECK: %call.fast = call fast [2 x float] @fmf_a2f32()
10532da4b6e5SJay Foad
10542da4b6e5SJay Foad  ; Throw in some other attributes to make sure those stay in the right places.
10552da4b6e5SJay Foad
10562da4b6e5SJay Foad  %call.nsz.arcp = notail call nsz arcp [2 x double] @fmf_a2f64()
10572da4b6e5SJay Foad  ; CHECK: %call.nsz.arcp = notail call nsz arcp [2 x double] @fmf_a2f64()
10582da4b6e5SJay Foad
10592da4b6e5SJay Foad  %call.nnan.ninf = tail call nnan ninf fastcc [2 x <4 x double>] @fmf_a2v4f64()
10602da4b6e5SJay Foad  ; CHECK: %call.nnan.ninf = tail call nnan ninf fastcc [2 x <4 x double>] @fmf_a2v4f64()
1061fa54acedSSanjay Patel
1062fa54acedSSanjay Patel  ret void
1063fa54acedSSanjay Patel}
1064fa54acedSSanjay Patel
1065375fa138SDuncan P. N. Exon Smith;; Type System
1066375fa138SDuncan P. N. Exon Smith%opaquety = type opaque
1067375fa138SDuncan P. N. Exon Smithdefine void @typesystem() {
1068375fa138SDuncan P. N. Exon Smith  %p0 = bitcast i8* null to i32 (i32)*
1069375fa138SDuncan P. N. Exon Smith  ; CHECK: %p0 = bitcast i8* null to i32 (i32)*
1070375fa138SDuncan P. N. Exon Smith  %p1 = bitcast i8* null to void (i8*)*
1071375fa138SDuncan P. N. Exon Smith  ; CHECK: %p1 = bitcast i8* null to void (i8*)*
1072375fa138SDuncan P. N. Exon Smith  %p2 = bitcast i8* null to i32 (i8*, ...)*
1073375fa138SDuncan P. N. Exon Smith  ; CHECK: %p2 = bitcast i8* null to i32 (i8*, ...)*
1074375fa138SDuncan P. N. Exon Smith  %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)*
1075375fa138SDuncan P. N. Exon Smith  ; CHECK: %p3 = bitcast i8* null to { i32, i8 } (i8*, ...)*
1076375fa138SDuncan P. N. Exon Smith  %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)*
1077375fa138SDuncan P. N. Exon Smith  ; CHECK: %p4 = bitcast i8* null to <{ i32, i8 }> (i8*, ...)*
1078375fa138SDuncan P. N. Exon Smith  %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)*
1079375fa138SDuncan P. N. Exon Smith  ; CHECK: %p5 = bitcast i8* null to <{ i32, i8 }> (<{ i8*, i64 }>*, ...)*
1080375fa138SDuncan P. N. Exon Smith
1081375fa138SDuncan P. N. Exon Smith  %t0 = alloca i1942652
1082375fa138SDuncan P. N. Exon Smith  ; CHECK: %t0 = alloca i1942652
1083375fa138SDuncan P. N. Exon Smith  %t1 = alloca half
1084375fa138SDuncan P. N. Exon Smith  ; CHECK: %t1 = alloca half
1085375fa138SDuncan P. N. Exon Smith  %t2 = alloca float
1086375fa138SDuncan P. N. Exon Smith  ; CHECK: %t2 = alloca float
1087375fa138SDuncan P. N. Exon Smith  %t3 = alloca double
1088375fa138SDuncan P. N. Exon Smith  ; CHECK: %t3 = alloca double
1089375fa138SDuncan P. N. Exon Smith  %t4 = alloca fp128
1090375fa138SDuncan P. N. Exon Smith  ; CHECK: %t4 = alloca fp128
1091375fa138SDuncan P. N. Exon Smith  %t5 = alloca x86_fp80
1092375fa138SDuncan P. N. Exon Smith  ; CHECK: %t5 = alloca x86_fp80
1093375fa138SDuncan P. N. Exon Smith  %t6 = alloca ppc_fp128
1094375fa138SDuncan P. N. Exon Smith  ; CHECK: %t6 = alloca ppc_fp128
1095375fa138SDuncan P. N. Exon Smith  %t7 = alloca x86_mmx
1096375fa138SDuncan P. N. Exon Smith  ; CHECK: %t7 = alloca x86_mmx
1097375fa138SDuncan P. N. Exon Smith  %t8 = alloca %opaquety*
1098375fa138SDuncan P. N. Exon Smith  ; CHECK: %t8 = alloca %opaquety*
1099957c40dbSGraham Hunter  %t9 = alloca <4 x i32>
1100957c40dbSGraham Hunter  ; CHECK: %t9 = alloca <4 x i32>
1101957c40dbSGraham Hunter  %t10 = alloca <vscale x 4 x i32>
1102957c40dbSGraham Hunter  ; CHECK: %t10 = alloca <vscale x 4 x i32>
1103375fa138SDuncan P. N. Exon Smith
1104375fa138SDuncan P. N. Exon Smith  ret void
1105375fa138SDuncan P. N. Exon Smith}
1106375fa138SDuncan P. N. Exon Smith
11079ebd49a4SVedant Kumardeclare void @llvm.token(token)
11089ebd49a4SVedant Kumar; CHECK: declare void @llvm.token(token)
11099ebd49a4SVedant Kumar
1110375fa138SDuncan P. N. Exon Smith;; Inline Assembler Expressions
1111375fa138SDuncan P. N. Exon Smithdefine void @inlineasm(i32 %arg) {
1112375fa138SDuncan P. N. Exon Smith  call i32 asm "bswap $0", "=r,r"(i32 %arg)
1113375fa138SDuncan P. N. Exon Smith  ; CHECK: call i32 asm "bswap $0", "=r,r"(i32 %arg)
1114375fa138SDuncan P. N. Exon Smith  call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg)
1115375fa138SDuncan P. N. Exon Smith  ; CHECK: call i32 asm sideeffect "blt $1, $2, $3", "=r,r,rm"(i32 %arg, i32 %arg)
1116375fa138SDuncan P. N. Exon Smith  ret void
1117375fa138SDuncan P. N. Exon Smith}
1118375fa138SDuncan P. N. Exon Smith
1119375fa138SDuncan P. N. Exon Smith;; Instructions
1120375fa138SDuncan P. N. Exon Smith
1121375fa138SDuncan P. N. Exon Smith; Instructions -- Terminators
1122375fa138SDuncan P. N. Exon Smithdefine void @instructions.terminators(i8 %val) personality i32 -10 {
1123375fa138SDuncan P. N. Exon Smith  br i1 false, label %iftrue, label %iffalse
1124375fa138SDuncan P. N. Exon Smith  ; CHECK: br i1 false, label %iftrue, label %iffalse
1125375fa138SDuncan P. N. Exon Smith  br label %iftrue
1126375fa138SDuncan P. N. Exon Smith  ; CHECK: br label %iftrue
1127375fa138SDuncan P. N. Exon Smithiftrue:
1128375fa138SDuncan P. N. Exon Smith  ret void
1129375fa138SDuncan P. N. Exon Smith  ; CHECK: ret void
1130375fa138SDuncan P. N. Exon Smithiffalse:
1131375fa138SDuncan P. N. Exon Smith
1132375fa138SDuncan P. N. Exon Smith  switch i8 %val, label %defaultdest [
1133375fa138SDuncan P. N. Exon Smith  ; CHECK: switch i8 %val, label %defaultdest [
1134375fa138SDuncan P. N. Exon Smith         i8 0, label %defaultdest.0
1135375fa138SDuncan P. N. Exon Smith         ; CHECK: i8 0, label %defaultdest.0
1136375fa138SDuncan P. N. Exon Smith         i8 1, label %defaultdest.1
1137375fa138SDuncan P. N. Exon Smith         ; CHECK: i8 1, label %defaultdest.1
1138375fa138SDuncan P. N. Exon Smith         i8 2, label %defaultdest.2
1139375fa138SDuncan P. N. Exon Smith         ; CHECK: i8 2, label %defaultdest.2
1140375fa138SDuncan P. N. Exon Smith  ]
1141375fa138SDuncan P. N. Exon Smith  ; CHECK: ]
1142375fa138SDuncan P. N. Exon Smithdefaultdest:
1143375fa138SDuncan P. N. Exon Smith  ret void
1144375fa138SDuncan P. N. Exon Smithdefaultdest.0:
1145375fa138SDuncan P. N. Exon Smith  ret void
1146375fa138SDuncan P. N. Exon Smithdefaultdest.1:
1147375fa138SDuncan P. N. Exon Smith  ret void
1148375fa138SDuncan P. N. Exon Smithdefaultdest.2:
1149375fa138SDuncan P. N. Exon Smith
1150375fa138SDuncan P. N. Exon Smith  indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2]
1151375fa138SDuncan P. N. Exon Smith  ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2]
1152375fa138SDuncan P. N. Exon Smith  indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2]
1153375fa138SDuncan P. N. Exon Smith  ; CHECK: indirectbr i8* blockaddress(@instructions.terminators, %defaultdest.2), [label %defaultdest.2, label %defaultdest.2]
1154375fa138SDuncan P. N. Exon Smith
1155375fa138SDuncan P. N. Exon Smith  invoke fastcc void @f.fastcc()
1156375fa138SDuncan P. N. Exon Smith  ; CHECK: invoke fastcc void @f.fastcc()
1157375fa138SDuncan P. N. Exon Smith         to label %defaultdest unwind label %exc
1158375fa138SDuncan P. N. Exon Smith         ; CHECK: to label %defaultdest unwind label %exc
1159375fa138SDuncan P. N. Exon Smithexc:
1160375fa138SDuncan P. N. Exon Smith  %cleanup = landingpad i32 cleanup
1161375fa138SDuncan P. N. Exon Smith
1162375fa138SDuncan P. N. Exon Smith  resume i32 undef
1163375fa138SDuncan P. N. Exon Smith  ; CHECK: resume i32 undef
116475f50e15SZhengyang Liu  resume i32 poison
116575f50e15SZhengyang Liu  ; CHECK: resume i32 poison
1166375fa138SDuncan P. N. Exon Smith  unreachable
1167375fa138SDuncan P. N. Exon Smith  ; CHECK: unreachable
1168375fa138SDuncan P. N. Exon Smith
1169375fa138SDuncan P. N. Exon Smith  ret void
1170375fa138SDuncan P. N. Exon Smith}
1171375fa138SDuncan P. N. Exon Smith
11729ebd49a4SVedant Kumardefine i32 @instructions.win_eh.1() personality i32 -3 {
11739ebd49a4SVedant Kumarentry:
11749ebd49a4SVedant Kumar  %arg1 = alloca i32
11759ebd49a4SVedant Kumar  %arg2 = alloca i32
11768a1c45d6SDavid Majnemer  invoke void @f.ccc() to label %normal unwind label %catchswitch1
11778a1c45d6SDavid Majnemer  invoke void @f.ccc() to label %normal unwind label %catchswitch2
11788a1c45d6SDavid Majnemer  invoke void @f.ccc() to label %normal unwind label %catchswitch3
11798a1c45d6SDavid Majnemer
11808a1c45d6SDavid Majnemercatchswitch1:
1181bbfc7219SDavid Majnemer  %cs1 = catchswitch within none [label %catchpad1] unwind to caller
11829ebd49a4SVedant Kumar
11839ebd49a4SVedant Kumarcatchpad1:
11848a1c45d6SDavid Majnemer  catchpad within %cs1 []
11858a1c45d6SDavid Majnemer  br label %normal
11868a1c45d6SDavid Majnemer  ; CHECK: catchpad within %cs1 []
11878a1c45d6SDavid Majnemer  ; CHECK-NEXT: br label %normal
11888a1c45d6SDavid Majnemer
11898a1c45d6SDavid Majnemercatchswitch2:
11908a1c45d6SDavid Majnemer  %cs2 = catchswitch within none [label %catchpad2] unwind to caller
11919ebd49a4SVedant Kumar
11929ebd49a4SVedant Kumarcatchpad2:
11938a1c45d6SDavid Majnemer  catchpad within %cs2 [i32* %arg1]
11948a1c45d6SDavid Majnemer  br label %normal
11958a1c45d6SDavid Majnemer  ; CHECK: catchpad within %cs2 [i32* %arg1]
11968a1c45d6SDavid Majnemer  ; CHECK-NEXT: br label %normal
11978a1c45d6SDavid Majnemer
11988a1c45d6SDavid Majnemercatchswitch3:
11998a1c45d6SDavid Majnemer  %cs3 = catchswitch within none [label %catchpad3] unwind label %cleanuppad1
12009ebd49a4SVedant Kumar
12019ebd49a4SVedant Kumarcatchpad3:
12028a1c45d6SDavid Majnemer  catchpad within %cs3 [i32* %arg1, i32* %arg2]
12038a1c45d6SDavid Majnemer  br label %normal
12048a1c45d6SDavid Majnemer  ; CHECK: catchpad within %cs3 [i32* %arg1, i32* %arg2]
12058a1c45d6SDavid Majnemer  ; CHECK-NEXT: br label %normal
12069ebd49a4SVedant Kumar
12079ebd49a4SVedant Kumarcleanuppad1:
12088a1c45d6SDavid Majnemer  %clean.1 = cleanuppad within none []
1209bbfc7219SDavid Majnemer  unreachable
12108a1c45d6SDavid Majnemer  ; CHECK: %clean.1 = cleanuppad within none []
1211bbfc7219SDavid Majnemer  ; CHECK-NEXT: unreachable
12129ebd49a4SVedant Kumar
12139ebd49a4SVedant Kumarnormal:
12149ebd49a4SVedant Kumar  ret i32 0
12159ebd49a4SVedant Kumar}
12168a1c45d6SDavid Majnemer;
12179ebd49a4SVedant Kumardefine i32 @instructions.win_eh.2() personality i32 -4 {
12189ebd49a4SVedant Kumarentry:
12198a1c45d6SDavid Majnemer  invoke void @f.ccc() to label %invoke.cont unwind label %catchswitch
12209ebd49a4SVedant Kumar
12219ebd49a4SVedant Kumarinvoke.cont:
12229ebd49a4SVedant Kumar  invoke void @f.ccc() to label %continue unwind label %cleanup
12239ebd49a4SVedant Kumar
12249ebd49a4SVedant Kumarcleanup:
12258a1c45d6SDavid Majnemer  %clean = cleanuppad within none []
12268a1c45d6SDavid Majnemer  ; CHECK: %clean = cleanuppad within none []
12278a1c45d6SDavid Majnemer  cleanupret from %clean unwind to caller
12288a1c45d6SDavid Majnemer  ; CHECK: cleanupret from %clean unwind to caller
12298a1c45d6SDavid Majnemer
12308a1c45d6SDavid Majnemercatchswitch:
12318a1c45d6SDavid Majnemer  %cs = catchswitch within none [label %catchpad] unwind label %terminate
12329ebd49a4SVedant Kumar
12339ebd49a4SVedant Kumarcatchpad:
12348a1c45d6SDavid Majnemer  %catch = catchpad within %cs []
12358a1c45d6SDavid Majnemer  br label %body
12368a1c45d6SDavid Majnemer  ; CHECK: %catch = catchpad within %cs []
12378a1c45d6SDavid Majnemer  ; CHECK-NEXT: br label %body
12389ebd49a4SVedant Kumar
12399ebd49a4SVedant Kumarbody:
1240e28885e6SJoseph Tremoulet  invoke void @f.ccc() [ "funclet"(token %catch) ]
1241e28885e6SJoseph Tremoulet    to label %continue unwind label %terminate.inner
12428a1c45d6SDavid Majnemer  catchret from %catch to label %return
12438a1c45d6SDavid Majnemer  ; CHECK: catchret from %catch to label %return
12449ebd49a4SVedant Kumar
12459ebd49a4SVedant Kumarreturn:
12469ebd49a4SVedant Kumar  ret i32 0
12479ebd49a4SVedant Kumar
124806125e52SJoseph Tremouletterminate.inner:
124906125e52SJoseph Tremoulet  cleanuppad within %catch []
1250bbfc7219SDavid Majnemer  unreachable
125106125e52SJoseph Tremoulet  ; CHECK: cleanuppad within %catch []
125206125e52SJoseph Tremoulet  ; CHECK-NEXT: unreachable
125306125e52SJoseph Tremoulet
125406125e52SJoseph Tremouletterminate:
125506125e52SJoseph Tremoulet  cleanuppad within none []
125606125e52SJoseph Tremoulet  unreachable
125706125e52SJoseph Tremoulet  ; CHECK: cleanuppad within none []
1258bbfc7219SDavid Majnemer  ; CHECK-NEXT: unreachable
12599ebd49a4SVedant Kumar
12609ebd49a4SVedant Kumarcontinue:
12619ebd49a4SVedant Kumar  ret i32 0
12629ebd49a4SVedant Kumar}
12639ebd49a4SVedant Kumar
1264cbde0d9cSCameron McInally; Instructions -- Unary Operations
1265e87d7166Saqjunedefine void @instructions.unops(double %op1) {
1266cbde0d9cSCameron McInally  fneg double %op1
1267cbde0d9cSCameron McInally  ; CHECK: fneg double %op1
1268cbde0d9cSCameron McInally  ret void
1269cbde0d9cSCameron McInally}
1270cbde0d9cSCameron McInally
1271375fa138SDuncan P. N. Exon Smith; Instructions -- Binary Operations
1272375fa138SDuncan P. N. Exon Smithdefine void @instructions.binops(i8 %op1, i8 %op2) {
1273375fa138SDuncan P. N. Exon Smith  ; nuw x nsw
1274375fa138SDuncan P. N. Exon Smith  add i8 %op1, %op2
1275375fa138SDuncan P. N. Exon Smith  ; CHECK: add i8 %op1, %op2
1276375fa138SDuncan P. N. Exon Smith  add nuw i8 %op1, %op2
1277375fa138SDuncan P. N. Exon Smith  ; CHECK: add nuw i8 %op1, %op2
1278375fa138SDuncan P. N. Exon Smith  add nsw i8 %op1, %op2
1279375fa138SDuncan P. N. Exon Smith  ; CHECK: add nsw i8 %op1, %op2
1280375fa138SDuncan P. N. Exon Smith  add nuw nsw i8 %op1, %op2
1281375fa138SDuncan P. N. Exon Smith  ; CHECK: add nuw nsw i8 %op1, %op2
1282375fa138SDuncan P. N. Exon Smith  sub i8 %op1, %op2
1283375fa138SDuncan P. N. Exon Smith  ; CHECK: sub i8 %op1, %op2
1284375fa138SDuncan P. N. Exon Smith  sub nuw i8 %op1, %op2
1285375fa138SDuncan P. N. Exon Smith  ; CHECK: sub nuw i8 %op1, %op2
1286375fa138SDuncan P. N. Exon Smith  sub nsw i8 %op1, %op2
1287375fa138SDuncan P. N. Exon Smith  ; CHECK: sub nsw i8 %op1, %op2
1288375fa138SDuncan P. N. Exon Smith  sub nuw nsw i8 %op1, %op2
1289375fa138SDuncan P. N. Exon Smith  ; CHECK: sub nuw nsw i8 %op1, %op2
1290375fa138SDuncan P. N. Exon Smith  mul i8 %op1, %op2
1291375fa138SDuncan P. N. Exon Smith  ; CHECK: mul i8 %op1, %op2
1292375fa138SDuncan P. N. Exon Smith  mul nuw i8 %op1, %op2
1293375fa138SDuncan P. N. Exon Smith  ; CHECK: mul nuw i8 %op1, %op2
1294375fa138SDuncan P. N. Exon Smith  mul nsw i8 %op1, %op2
1295375fa138SDuncan P. N. Exon Smith  ; CHECK: mul nsw i8 %op1, %op2
1296375fa138SDuncan P. N. Exon Smith  mul nuw nsw i8 %op1, %op2
1297375fa138SDuncan P. N. Exon Smith  ; CHECK: mul nuw nsw i8 %op1, %op2
1298375fa138SDuncan P. N. Exon Smith
1299375fa138SDuncan P. N. Exon Smith  ; exact
1300375fa138SDuncan P. N. Exon Smith  udiv i8 %op1, %op2
1301375fa138SDuncan P. N. Exon Smith  ; CHECK: udiv i8 %op1, %op2
1302375fa138SDuncan P. N. Exon Smith  udiv exact i8 %op1, %op2
1303375fa138SDuncan P. N. Exon Smith  ; CHECK: udiv exact i8 %op1, %op2
1304375fa138SDuncan P. N. Exon Smith  sdiv i8 %op1, %op2
1305375fa138SDuncan P. N. Exon Smith  ; CHECK: sdiv i8 %op1, %op2
1306375fa138SDuncan P. N. Exon Smith  sdiv exact i8 %op1, %op2
1307375fa138SDuncan P. N. Exon Smith  ; CHECK: sdiv exact i8 %op1, %op2
1308375fa138SDuncan P. N. Exon Smith
1309375fa138SDuncan P. N. Exon Smith  ; none
1310375fa138SDuncan P. N. Exon Smith  urem i8 %op1, %op2
1311375fa138SDuncan P. N. Exon Smith  ; CHECK: urem i8 %op1, %op2
1312375fa138SDuncan P. N. Exon Smith  srem i8 %op1, %op2
1313375fa138SDuncan P. N. Exon Smith  ; CHECK: srem i8 %op1, %op2
1314375fa138SDuncan P. N. Exon Smith
1315375fa138SDuncan P. N. Exon Smith  ret void
1316375fa138SDuncan P. N. Exon Smith}
1317375fa138SDuncan P. N. Exon Smith
1318375fa138SDuncan P. N. Exon Smith; Instructions -- Bitwise Binary Operations
1319375fa138SDuncan P. N. Exon Smithdefine void @instructions.bitwise_binops(i8 %op1, i8 %op2) {
1320375fa138SDuncan P. N. Exon Smith  ; nuw x nsw
1321375fa138SDuncan P. N. Exon Smith  shl i8 %op1, %op2
1322375fa138SDuncan P. N. Exon Smith  ; CHECK: shl i8 %op1, %op2
1323375fa138SDuncan P. N. Exon Smith  shl nuw i8 %op1, %op2
1324375fa138SDuncan P. N. Exon Smith  ; CHECK: shl nuw i8 %op1, %op2
1325375fa138SDuncan P. N. Exon Smith  shl nsw i8 %op1, %op2
1326375fa138SDuncan P. N. Exon Smith  ; CHECK: shl nsw i8 %op1, %op2
1327375fa138SDuncan P. N. Exon Smith  shl nuw nsw i8 %op1, %op2
1328375fa138SDuncan P. N. Exon Smith  ; CHECK: shl nuw nsw i8 %op1, %op2
1329375fa138SDuncan P. N. Exon Smith
1330375fa138SDuncan P. N. Exon Smith  ; exact
1331375fa138SDuncan P. N. Exon Smith  lshr i8 %op1, %op2
1332375fa138SDuncan P. N. Exon Smith  ; CHECK: lshr i8 %op1, %op2
1333375fa138SDuncan P. N. Exon Smith  lshr exact i8 %op1, %op2
1334375fa138SDuncan P. N. Exon Smith  ; CHECK: lshr exact i8 %op1, %op2
1335375fa138SDuncan P. N. Exon Smith  ashr i8 %op1, %op2
1336375fa138SDuncan P. N. Exon Smith  ; CHECK: ashr i8 %op1, %op2
1337375fa138SDuncan P. N. Exon Smith  ashr exact i8 %op1, %op2
1338375fa138SDuncan P. N. Exon Smith  ; CHECK: ashr exact i8 %op1, %op2
1339375fa138SDuncan P. N. Exon Smith
1340375fa138SDuncan P. N. Exon Smith  ; none
1341375fa138SDuncan P. N. Exon Smith  and i8 %op1, %op2
1342375fa138SDuncan P. N. Exon Smith  ; CHECK: and i8 %op1, %op2
1343375fa138SDuncan P. N. Exon Smith  or i8 %op1, %op2
1344375fa138SDuncan P. N. Exon Smith  ; CHECK: or i8 %op1, %op2
1345375fa138SDuncan P. N. Exon Smith  xor i8 %op1, %op2
1346375fa138SDuncan P. N. Exon Smith  ; CHECK: xor i8 %op1, %op2
1347375fa138SDuncan P. N. Exon Smith
1348375fa138SDuncan P. N. Exon Smith  ret void
1349375fa138SDuncan P. N. Exon Smith}
1350375fa138SDuncan P. N. Exon Smith
1351375fa138SDuncan P. N. Exon Smith; Instructions -- Vector Operations
1352375fa138SDuncan P. N. Exon Smithdefine void @instructions.vectorops(<4 x float> %vec, <4 x float> %vec2) {
1353375fa138SDuncan P. N. Exon Smith  extractelement <4 x float> %vec, i8 0
1354375fa138SDuncan P. N. Exon Smith  ; CHECK: extractelement <4 x float> %vec, i8 0
1355375fa138SDuncan P. N. Exon Smith  insertelement <4 x float> %vec, float 3.500000e+00, i8 0
1356375fa138SDuncan P. N. Exon Smith  ; CHECK: insertelement <4 x float> %vec, float 3.500000e+00, i8 0
1357375fa138SDuncan P. N. Exon Smith  shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer
1358375fa138SDuncan P. N. Exon Smith  ; CHECK: shufflevector <4 x float> %vec, <4 x float> %vec2, <2 x i32> zeroinitializer
1359375fa138SDuncan P. N. Exon Smith
1360375fa138SDuncan P. N. Exon Smith  ret void
1361375fa138SDuncan P. N. Exon Smith}
1362375fa138SDuncan P. N. Exon Smith
1363375fa138SDuncan P. N. Exon Smith; Instructions -- Aggregate Operations
1364375fa138SDuncan P. N. Exon Smithdefine void @instructions.aggregateops({ i8, i32 } %up, <{ i8, i32 }> %p,
1365375fa138SDuncan P. N. Exon Smith                                       [3 x i8] %arr, { i8, { i32 }} %n,
1366375fa138SDuncan P. N. Exon Smith                                       <2 x i8*> %pvec, <2 x i64> %offsets) {
1367375fa138SDuncan P. N. Exon Smith  extractvalue { i8, i32 } %up, 0
1368375fa138SDuncan P. N. Exon Smith  ; CHECK: extractvalue { i8, i32 } %up, 0
1369375fa138SDuncan P. N. Exon Smith  extractvalue <{ i8, i32 }> %p, 1
1370375fa138SDuncan P. N. Exon Smith  ; CHECK: extractvalue <{ i8, i32 }> %p, 1
1371375fa138SDuncan P. N. Exon Smith  extractvalue [3 x i8] %arr, 2
1372375fa138SDuncan P. N. Exon Smith  ; CHECK: extractvalue [3 x i8] %arr, 2
1373375fa138SDuncan P. N. Exon Smith  extractvalue { i8, { i32 } } %n, 1, 0
1374375fa138SDuncan P. N. Exon Smith  ; CHECK: extractvalue { i8, { i32 } } %n, 1, 0
1375375fa138SDuncan P. N. Exon Smith
1376375fa138SDuncan P. N. Exon Smith  insertvalue { i8, i32 } %up, i8 1, 0
1377375fa138SDuncan P. N. Exon Smith  ; CHECK: insertvalue { i8, i32 } %up, i8 1, 0
1378375fa138SDuncan P. N. Exon Smith  insertvalue <{ i8, i32 }> %p, i32 2, 1
1379375fa138SDuncan P. N. Exon Smith  ; CHECK: insertvalue <{ i8, i32 }> %p, i32 2, 1
1380375fa138SDuncan P. N. Exon Smith  insertvalue [3 x i8] %arr, i8 0, 0
1381375fa138SDuncan P. N. Exon Smith  ; CHECK: insertvalue [3 x i8] %arr, i8 0, 0
1382375fa138SDuncan P. N. Exon Smith  insertvalue { i8, { i32 } } %n, i32 0, 1, 0
1383375fa138SDuncan P. N. Exon Smith  ; CHECK: insertvalue { i8, { i32 } } %n, i32 0, 1, 0
1384375fa138SDuncan P. N. Exon Smith
1385375fa138SDuncan P. N. Exon Smith  %up.ptr = alloca { i8, i32 }
1386375fa138SDuncan P. N. Exon Smith  %p.ptr = alloca <{ i8, i32 }>
1387375fa138SDuncan P. N. Exon Smith  %arr.ptr = alloca [3 x i8]
1388375fa138SDuncan P. N. Exon Smith  %n.ptr = alloca { i8, { i32 } }
1389375fa138SDuncan P. N. Exon Smith
1390375fa138SDuncan P. N. Exon Smith  getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0
1391375fa138SDuncan P. N. Exon Smith  ; CHECK: getelementptr { i8, i32 }, { i8, i32 }* %up.ptr, i8 0
1392375fa138SDuncan P. N. Exon Smith  getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1
1393375fa138SDuncan P. N. Exon Smith  ; CHECK: getelementptr <{ i8, i32 }>, <{ i8, i32 }>* %p.ptr, i8 1
1394375fa138SDuncan P. N. Exon Smith  getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2
1395375fa138SDuncan P. N. Exon Smith  ; CHECK: getelementptr [3 x i8], [3 x i8]* %arr.ptr, i8 2
1396375fa138SDuncan P. N. Exon Smith  getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1
1397375fa138SDuncan P. N. Exon Smith  ; CHECK: getelementptr { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 0, i32 1
1398375fa138SDuncan P. N. Exon Smith  getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0
1399375fa138SDuncan P. N. Exon Smith  ; CHECK: getelementptr inbounds { i8, { i32 } }, { i8, { i32 } }* %n.ptr, i32 1, i32 0
1400375fa138SDuncan P. N. Exon Smith  getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets
1401375fa138SDuncan P. N. Exon Smith  ; CHECK: getelementptr i8, <2 x i8*> %pvec, <2 x i64> %offsets
1402375fa138SDuncan P. N. Exon Smith
1403375fa138SDuncan P. N. Exon Smith  ret void
1404375fa138SDuncan P. N. Exon Smith}
1405375fa138SDuncan P. N. Exon Smith
1406375fa138SDuncan P. N. Exon Smith; Instructions -- Memory Access and Addressing Operations
1407375fa138SDuncan P. N. Exon Smith!7 = !{i32 1}
1408375fa138SDuncan P. N. Exon Smith!8 = !{}
1409375fa138SDuncan P. N. Exon Smith!9 = !{i64 4}
1410375fa138SDuncan P. N. Exon Smithdefine void @instructions.memops(i32** %base) {
1411375fa138SDuncan P. N. Exon Smith  alloca i32, i8 4, align 4
1412375fa138SDuncan P. N. Exon Smith  ; CHECK: alloca i32, i8 4, align 4
1413375fa138SDuncan P. N. Exon Smith  alloca inalloca i32, i8 4, align 4
1414375fa138SDuncan P. N. Exon Smith  ; CHECK: alloca inalloca i32, i8 4, align 4
1415375fa138SDuncan P. N. Exon Smith
1416375fa138SDuncan P. N. Exon Smith  load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1417375fa138SDuncan P. N. Exon Smith  ; CHECK: load i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1418375fa138SDuncan P. N. Exon Smith  load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1419375fa138SDuncan P. N. Exon Smith  ; CHECK: load volatile i32*, i32** %base, align 8, !invariant.load !7, !nontemporal !8, !nonnull !7, !dereferenceable !9, !dereferenceable_or_null !9
1420375fa138SDuncan P. N. Exon Smith
1421375fa138SDuncan P. N. Exon Smith  store i32* null, i32** %base, align 4, !nontemporal !8
1422375fa138SDuncan P. N. Exon Smith  ; CHECK: store i32* null, i32** %base, align 4, !nontemporal !8
1423375fa138SDuncan P. N. Exon Smith  store volatile i32* null, i32** %base, align 4, !nontemporal !8
1424375fa138SDuncan P. N. Exon Smith  ; CHECK: store volatile i32* null, i32** %base, align 4, !nontemporal !8
1425375fa138SDuncan P. N. Exon Smith
1426375fa138SDuncan P. N. Exon Smith  ret void
1427375fa138SDuncan P. N. Exon Smith}
1428375fa138SDuncan P. N. Exon Smith
1429375fa138SDuncan P. N. Exon Smith; Instructions -- Conversion Operations
1430375fa138SDuncan P. N. Exon Smithdefine void @instructions.conversions() {
1431375fa138SDuncan P. N. Exon Smith  trunc i32 -1 to i1
1432375fa138SDuncan P. N. Exon Smith  ; CHECK: trunc i32 -1 to i1
1433375fa138SDuncan P. N. Exon Smith  zext i32 -1 to i64
1434375fa138SDuncan P. N. Exon Smith  ; CHECK: zext i32 -1 to i64
1435375fa138SDuncan P. N. Exon Smith  sext i32 -1 to i64
1436375fa138SDuncan P. N. Exon Smith  ; CHECK: sext i32 -1 to i64
1437375fa138SDuncan P. N. Exon Smith  fptrunc float undef to half
1438375fa138SDuncan P. N. Exon Smith  ; CHECK: fptrunc float undef to half
1439375fa138SDuncan P. N. Exon Smith  fpext half undef to float
1440375fa138SDuncan P. N. Exon Smith  ; CHECK: fpext half undef to float
1441375fa138SDuncan P. N. Exon Smith  fptoui float undef to i32
1442375fa138SDuncan P. N. Exon Smith  ; CHECK: fptoui float undef to i32
1443375fa138SDuncan P. N. Exon Smith  fptosi float undef to i32
1444375fa138SDuncan P. N. Exon Smith  ; CHECK: fptosi float undef to i32
144575f50e15SZhengyang Liu  fptrunc float poison to half
144675f50e15SZhengyang Liu  ; CHECK: fptrunc float poison to half
144775f50e15SZhengyang Liu  fpext half poison to float
144875f50e15SZhengyang Liu  ; CHECK: fpext half poison to float
144975f50e15SZhengyang Liu  fptoui float poison to i32
145075f50e15SZhengyang Liu  ; CHECK: fptoui float poison to i32
145175f50e15SZhengyang Liu  fptosi float poison to i32
145275f50e15SZhengyang Liu  ; CHECK: fptosi float poison to i32
1453375fa138SDuncan P. N. Exon Smith  uitofp i32 1 to float
1454375fa138SDuncan P. N. Exon Smith  ; CHECK: uitofp i32 1 to float
1455375fa138SDuncan P. N. Exon Smith  sitofp i32 -1 to float
1456375fa138SDuncan P. N. Exon Smith  ; CHECK: sitofp i32 -1 to float
1457375fa138SDuncan P. N. Exon Smith  ptrtoint i8* null to i64
1458375fa138SDuncan P. N. Exon Smith  ; CHECK: ptrtoint i8* null to i64
1459375fa138SDuncan P. N. Exon Smith  inttoptr i64 0 to i8*
1460375fa138SDuncan P. N. Exon Smith  ; CHECK: inttoptr i64 0 to i8*
1461375fa138SDuncan P. N. Exon Smith  bitcast i32 0 to i32
1462375fa138SDuncan P. N. Exon Smith  ; CHECK: bitcast i32 0 to i32
1463375fa138SDuncan P. N. Exon Smith  addrspacecast i32* null to i32 addrspace(1)*
1464375fa138SDuncan P. N. Exon Smith  ; CHECK: addrspacecast i32* null to i32 addrspace(1)*
1465375fa138SDuncan P. N. Exon Smith
1466375fa138SDuncan P. N. Exon Smith  ret void
1467375fa138SDuncan P. N. Exon Smith}
1468375fa138SDuncan P. N. Exon Smith
1469375fa138SDuncan P. N. Exon Smith; Instructions -- Other Operations
1470e87d7166Saqjunedefine void @instructions.other(i32 %op1, i32 %op2, half %fop1, half %fop2, <2 x i32> %vop, i8* %pop) {
1471375fa138SDuncan P. N. Exon Smithentry:
1472375fa138SDuncan P. N. Exon Smith  icmp eq  i32 %op1, %op2
1473375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp eq  i32 %op1, %op2
1474375fa138SDuncan P. N. Exon Smith  icmp ne  i32 %op1, %op2
1475375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp ne  i32 %op1, %op2
1476375fa138SDuncan P. N. Exon Smith  icmp ugt i32 %op1, %op2
1477375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp ugt i32 %op1, %op2
1478375fa138SDuncan P. N. Exon Smith  icmp uge i32 %op1, %op2
1479375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp uge i32 %op1, %op2
1480375fa138SDuncan P. N. Exon Smith  icmp ult i32 %op1, %op2
1481375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp ult i32 %op1, %op2
1482375fa138SDuncan P. N. Exon Smith  icmp ule i32 %op1, %op2
1483375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp ule i32 %op1, %op2
1484375fa138SDuncan P. N. Exon Smith  icmp sgt i32 %op1, %op2
1485375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp sgt i32 %op1, %op2
1486375fa138SDuncan P. N. Exon Smith  icmp sge i32 %op1, %op2
1487375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp sge i32 %op1, %op2
1488375fa138SDuncan P. N. Exon Smith  icmp slt i32 %op1, %op2
1489375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp slt i32 %op1, %op2
1490375fa138SDuncan P. N. Exon Smith  icmp sle i32 %op1, %op2
1491375fa138SDuncan P. N. Exon Smith  ; CHECK: icmp sle i32 %op1, %op2
1492375fa138SDuncan P. N. Exon Smith
1493375fa138SDuncan P. N. Exon Smith  fcmp false half %fop1, %fop2
1494375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp false half %fop1, %fop2
1495375fa138SDuncan P. N. Exon Smith  fcmp oeq   half %fop1, %fop2
1496375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp oeq   half %fop1, %fop2
1497375fa138SDuncan P. N. Exon Smith  fcmp ogt   half %fop1, %fop2
1498375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ogt   half %fop1, %fop2
1499375fa138SDuncan P. N. Exon Smith  fcmp oge   half %fop1, %fop2
1500375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp oge   half %fop1, %fop2
1501375fa138SDuncan P. N. Exon Smith  fcmp olt   half %fop1, %fop2
1502375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp olt   half %fop1, %fop2
1503375fa138SDuncan P. N. Exon Smith  fcmp ole   half %fop1, %fop2
1504375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ole   half %fop1, %fop2
1505375fa138SDuncan P. N. Exon Smith  fcmp one   half %fop1, %fop2
1506375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp one   half %fop1, %fop2
1507375fa138SDuncan P. N. Exon Smith  fcmp ord   half %fop1, %fop2
1508375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ord   half %fop1, %fop2
1509375fa138SDuncan P. N. Exon Smith  fcmp ueq   half %fop1, %fop2
1510375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ueq   half %fop1, %fop2
1511375fa138SDuncan P. N. Exon Smith  fcmp ugt   half %fop1, %fop2
1512375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ugt   half %fop1, %fop2
1513375fa138SDuncan P. N. Exon Smith  fcmp uge   half %fop1, %fop2
1514375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp uge   half %fop1, %fop2
1515375fa138SDuncan P. N. Exon Smith  fcmp ult   half %fop1, %fop2
1516375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ult   half %fop1, %fop2
1517375fa138SDuncan P. N. Exon Smith  fcmp ule   half %fop1, %fop2
1518375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp ule   half %fop1, %fop2
1519375fa138SDuncan P. N. Exon Smith  fcmp une   half %fop1, %fop2
1520375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp une   half %fop1, %fop2
1521375fa138SDuncan P. N. Exon Smith  fcmp uno   half %fop1, %fop2
1522375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp uno   half %fop1, %fop2
1523375fa138SDuncan P. N. Exon Smith  fcmp true  half %fop1, %fop2
1524375fa138SDuncan P. N. Exon Smith  ; CHECK: fcmp true  half %fop1, %fop2
1525375fa138SDuncan P. N. Exon Smith
1526375fa138SDuncan P. N. Exon Smith  br label %exit
1527375fa138SDuncan P. N. Exon SmithL1:
1528375fa138SDuncan P. N. Exon Smith  %v1 = add i32 %op1, %op2
1529375fa138SDuncan P. N. Exon Smith  br label %exit
1530375fa138SDuncan P. N. Exon SmithL2:
1531375fa138SDuncan P. N. Exon Smith  %v2 = add i32 %op1, %op2
1532375fa138SDuncan P. N. Exon Smith  br label %exit
1533375fa138SDuncan P. N. Exon Smithexit:
1534375fa138SDuncan P. N. Exon Smith  phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ]
1535375fa138SDuncan P. N. Exon Smith  ; CHECK: phi i32 [ %v1, %L1 ], [ %v2, %L2 ], [ %op1, %entry ]
1536375fa138SDuncan P. N. Exon Smith
1537375fa138SDuncan P. N. Exon Smith  select i1 true, i32 0, i32 1
1538375fa138SDuncan P. N. Exon Smith  ; CHECK: select i1 true, i32 0, i32 1
1539375fa138SDuncan P. N. Exon Smith  select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
1540375fa138SDuncan P. N. Exon Smith  ; CHECK: select <2 x i1> <i1 true, i1 false>, <2 x i8> <i8 2, i8 3>, <2 x i8> <i8 3, i8 2>
1541375fa138SDuncan P. N. Exon Smith
1542375fa138SDuncan P. N. Exon Smith  call void @f.nobuiltin() builtin
154342861faaSAugie Fackler  ; CHECK: call void @f.nobuiltin() #50
1544375fa138SDuncan P. N. Exon Smith
1545375fa138SDuncan P. N. Exon Smith  call fastcc noalias i32* @f.noalias() noinline
1546375fa138SDuncan P. N. Exon Smith  ; CHECK: call fastcc noalias i32* @f.noalias() #12
1547375fa138SDuncan P. N. Exon Smith  tail call ghccc nonnull i32* @f.nonnull() minsize
1548375fa138SDuncan P. N. Exon Smith  ; CHECK: tail call ghccc nonnull i32* @f.nonnull() #7
1549375fa138SDuncan P. N. Exon Smith
1550e87d7166Saqjune  freeze i32 %op1
1551e87d7166Saqjune  ; CHECK: freeze i32 %op1
1552e87d7166Saqjune  freeze i32 10
1553e87d7166Saqjune  ; CHECK: freeze i32 10
1554e87d7166Saqjune  freeze half %fop1
1555e87d7166Saqjune  ; CHECK: freeze half %fop1
1556e87d7166Saqjune  freeze <2 x i32> %vop
1557e87d7166Saqjune  ; CHECK: freeze <2 x i32> %vop
1558e87d7166Saqjune  freeze i8* %pop
1559e87d7166Saqjune  ; CHECK: freeze i8* %pop
1560375fa138SDuncan P. N. Exon Smith  ret void
1561375fa138SDuncan P. N. Exon Smith}
1562375fa138SDuncan P. N. Exon Smith
15639a0c9402SMatt Arsenaultdefine void @instructions.call_musttail(i8* inalloca(i8) %val) {
15649a0c9402SMatt Arsenault  musttail call void @f.param.inalloca(i8* inalloca(i8) %val)
15659a0c9402SMatt Arsenault  ; CHECK: musttail call void @f.param.inalloca(i8* inalloca(i8) %val)
1566375fa138SDuncan P. N. Exon Smith
1567375fa138SDuncan P. N. Exon Smith  ret void
1568375fa138SDuncan P. N. Exon Smith}
1569375fa138SDuncan P. N. Exon Smith
15705cfcce12SAkira Hatanakadefine void @instructions.call_notail() {
15715cfcce12SAkira Hatanaka  notail call void @f1()
15725cfcce12SAkira Hatanaka  ; CHECK: notail call void @f1()
15735cfcce12SAkira Hatanaka
15745cfcce12SAkira Hatanaka  ret void
15755cfcce12SAkira Hatanaka}
15765cfcce12SAkira Hatanaka
1577375fa138SDuncan P. N. Exon Smithdefine void @instructions.landingpad() personality i32 -2 {
1578375fa138SDuncan P. N. Exon Smith  invoke void @llvm.donothing() to label %proceed unwind label %catch1
1579375fa138SDuncan P. N. Exon Smith  invoke void @llvm.donothing() to label %proceed unwind label %catch2
1580375fa138SDuncan P. N. Exon Smith  invoke void @llvm.donothing() to label %proceed unwind label %catch3
1581375fa138SDuncan P. N. Exon Smith  invoke void @llvm.donothing() to label %proceed unwind label %catch4
1582375fa138SDuncan P. N. Exon Smith
1583375fa138SDuncan P. N. Exon Smithcatch1:
1584375fa138SDuncan P. N. Exon Smith  landingpad i32
1585375fa138SDuncan P. N. Exon Smith  ; CHECK: landingpad i32
1586375fa138SDuncan P. N. Exon Smith             cleanup
1587375fa138SDuncan P. N. Exon Smith             ; CHECK: cleanup
1588375fa138SDuncan P. N. Exon Smith  br label %proceed
1589375fa138SDuncan P. N. Exon Smith
1590375fa138SDuncan P. N. Exon Smithcatch2:
1591375fa138SDuncan P. N. Exon Smith  landingpad i32
1592375fa138SDuncan P. N. Exon Smith  ; CHECK: landingpad i32
1593375fa138SDuncan P. N. Exon Smith             cleanup
1594375fa138SDuncan P. N. Exon Smith             ; CHECK: cleanup
1595375fa138SDuncan P. N. Exon Smith             catch i32* null
1596375fa138SDuncan P. N. Exon Smith             ; CHECK: catch i32* null
1597375fa138SDuncan P. N. Exon Smith  br label %proceed
1598375fa138SDuncan P. N. Exon Smith
1599375fa138SDuncan P. N. Exon Smithcatch3:
1600375fa138SDuncan P. N. Exon Smith  landingpad i32
1601375fa138SDuncan P. N. Exon Smith  ; CHECK: landingpad i32
1602375fa138SDuncan P. N. Exon Smith             cleanup
1603375fa138SDuncan P. N. Exon Smith             ; CHECK: cleanup
1604375fa138SDuncan P. N. Exon Smith             catch i32* null
1605375fa138SDuncan P. N. Exon Smith             ; CHECK: catch i32* null
1606375fa138SDuncan P. N. Exon Smith             catch i32* null
1607375fa138SDuncan P. N. Exon Smith             ; CHECK: catch i32* null
1608375fa138SDuncan P. N. Exon Smith  br label %proceed
1609375fa138SDuncan P. N. Exon Smith
1610375fa138SDuncan P. N. Exon Smithcatch4:
1611375fa138SDuncan P. N. Exon Smith  landingpad i32
1612375fa138SDuncan P. N. Exon Smith  ; CHECK: landingpad i32
1613375fa138SDuncan P. N. Exon Smith             filter [2 x i32] zeroinitializer
1614375fa138SDuncan P. N. Exon Smith             ; CHECK: filter [2 x i32] zeroinitializer
1615375fa138SDuncan P. N. Exon Smith  br label %proceed
1616375fa138SDuncan P. N. Exon Smith
1617375fa138SDuncan P. N. Exon Smithproceed:
1618375fa138SDuncan P. N. Exon Smith  ret void
1619375fa138SDuncan P. N. Exon Smith}
1620375fa138SDuncan P. N. Exon Smith
1621375fa138SDuncan P. N. Exon Smith;; Intrinsic Functions
1622375fa138SDuncan P. N. Exon Smith
1623375fa138SDuncan P. N. Exon Smith; Intrinsic Functions -- Variable Argument Handling
1624375fa138SDuncan P. N. Exon Smithdeclare void @llvm.va_start(i8*)
1625375fa138SDuncan P. N. Exon Smithdeclare void @llvm.va_copy(i8*, i8*)
1626375fa138SDuncan P. N. Exon Smithdeclare void @llvm.va_end(i8*)
1627375fa138SDuncan P. N. Exon Smithdefine void @instructions.va_arg(i8* %v, ...) {
1628375fa138SDuncan P. N. Exon Smith  %ap = alloca i8*
1629375fa138SDuncan P. N. Exon Smith  %ap2 = bitcast i8** %ap to i8*
1630375fa138SDuncan P. N. Exon Smith
1631375fa138SDuncan P. N. Exon Smith  call void @llvm.va_start(i8* %ap2)
1632375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.va_start(i8* %ap2)
1633375fa138SDuncan P. N. Exon Smith
1634375fa138SDuncan P. N. Exon Smith  va_arg i8* %ap2, i32
1635375fa138SDuncan P. N. Exon Smith  ; CHECK: va_arg i8* %ap2, i32
1636375fa138SDuncan P. N. Exon Smith
1637375fa138SDuncan P. N. Exon Smith  call void @llvm.va_copy(i8* %v, i8* %ap2)
1638375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.va_copy(i8* %v, i8* %ap2)
1639375fa138SDuncan P. N. Exon Smith
1640375fa138SDuncan P. N. Exon Smith  call void @llvm.va_end(i8* %ap2)
1641375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.va_end(i8* %ap2)
1642375fa138SDuncan P. N. Exon Smith
1643375fa138SDuncan P. N. Exon Smith  ret void
1644375fa138SDuncan P. N. Exon Smith}
1645375fa138SDuncan P. N. Exon Smith
1646375fa138SDuncan P. N. Exon Smith; Intrinsic Functions -- Accurate Garbage Collection
1647375fa138SDuncan P. N. Exon Smithdeclare void @llvm.gcroot(i8**, i8*)
1648375fa138SDuncan P. N. Exon Smithdeclare i8* @llvm.gcread(i8*, i8**)
1649375fa138SDuncan P. N. Exon Smithdeclare void @llvm.gcwrite(i8*, i8*, i8**)
1650375fa138SDuncan P. N. Exon Smithdefine void @intrinsics.gc() gc "shadow-stack" {
1651375fa138SDuncan P. N. Exon Smith  %ptrloc = alloca i8*
1652375fa138SDuncan P. N. Exon Smith  call void @llvm.gcroot(i8** %ptrloc, i8* null)
1653375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.gcroot(i8** %ptrloc, i8* null)
1654375fa138SDuncan P. N. Exon Smith
1655375fa138SDuncan P. N. Exon Smith  call i8* @llvm.gcread(i8* null, i8** %ptrloc)
1656375fa138SDuncan P. N. Exon Smith  ; CHECK: call i8* @llvm.gcread(i8* null, i8** %ptrloc)
1657375fa138SDuncan P. N. Exon Smith
1658375fa138SDuncan P. N. Exon Smith  %ref = alloca i8
1659375fa138SDuncan P. N. Exon Smith  call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc)
1660375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.gcwrite(i8* %ref, i8* null, i8** %ptrloc)
1661375fa138SDuncan P. N. Exon Smith
1662375fa138SDuncan P. N. Exon Smith  ret void
1663375fa138SDuncan P. N. Exon Smith}
1664375fa138SDuncan P. N. Exon Smith
1665375fa138SDuncan P. N. Exon Smith; Intrinsic Functions -- Code Generation
1666375fa138SDuncan P. N. Exon Smithdeclare i8* @llvm.returnaddress(i32)
1667375fa138SDuncan P. N. Exon Smithdeclare i8* @llvm.frameaddress(i32)
1668375fa138SDuncan P. N. Exon Smithdeclare i32 @llvm.read_register.i32(metadata)
1669375fa138SDuncan P. N. Exon Smithdeclare i64 @llvm.read_register.i64(metadata)
1670375fa138SDuncan P. N. Exon Smithdeclare void @llvm.write_register.i32(metadata, i32)
1671375fa138SDuncan P. N. Exon Smithdeclare void @llvm.write_register.i64(metadata, i64)
1672375fa138SDuncan P. N. Exon Smithdeclare i8* @llvm.stacksave()
1673375fa138SDuncan P. N. Exon Smithdeclare void @llvm.stackrestore(i8*)
1674dbc0a5dfSJF Bastiendeclare void @llvm.prefetch.p0i8(i8*, i32, i32, i32)
1675375fa138SDuncan P. N. Exon Smithdeclare void @llvm.pcmarker(i32)
1676375fa138SDuncan P. N. Exon Smithdeclare i64 @llvm.readcyclecounter()
1677375fa138SDuncan P. N. Exon Smithdeclare void @llvm.clear_cache(i8*, i8*)
1678375fa138SDuncan P. N. Exon Smithdeclare void @llvm.instrprof_increment(i8*, i64, i32, i32)
1679375fa138SDuncan P. N. Exon Smith
1680375fa138SDuncan P. N. Exon Smith!10 = !{!"rax"}
1681375fa138SDuncan P. N. Exon Smithdefine void @intrinsics.codegen() {
1682375fa138SDuncan P. N. Exon Smith  call i8* @llvm.returnaddress(i32 1)
1683375fa138SDuncan P. N. Exon Smith  ; CHECK: call i8* @llvm.returnaddress(i32 1)
1684375fa138SDuncan P. N. Exon Smith  call i8* @llvm.frameaddress(i32 1)
1685006cf8c0SChristudasan Devadasan  ; CHECK: call i8* @llvm.frameaddress.p0i8(i32 1)
1686375fa138SDuncan P. N. Exon Smith
1687375fa138SDuncan P. N. Exon Smith  call i32 @llvm.read_register.i32(metadata !10)
1688375fa138SDuncan P. N. Exon Smith  ; CHECK: call i32 @llvm.read_register.i32(metadata !10)
1689375fa138SDuncan P. N. Exon Smith  call i64 @llvm.read_register.i64(metadata !10)
1690375fa138SDuncan P. N. Exon Smith  ; CHECK: call i64 @llvm.read_register.i64(metadata !10)
1691375fa138SDuncan P. N. Exon Smith  call void @llvm.write_register.i32(metadata !10, i32 0)
1692375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.write_register.i32(metadata !10, i32 0)
1693375fa138SDuncan P. N. Exon Smith  call void @llvm.write_register.i64(metadata !10, i64 0)
1694375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.write_register.i64(metadata !10, i64 0)
1695375fa138SDuncan P. N. Exon Smith
1696375fa138SDuncan P. N. Exon Smith  %stack = call i8* @llvm.stacksave()
1697375fa138SDuncan P. N. Exon Smith  ; CHECK: %stack = call i8* @llvm.stacksave()
1698375fa138SDuncan P. N. Exon Smith  call void @llvm.stackrestore(i8* %stack)
1699375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.stackrestore(i8* %stack)
1700375fa138SDuncan P. N. Exon Smith
1701dbc0a5dfSJF Bastien  call void @llvm.prefetch.p0i8(i8* %stack, i32 0, i32 3, i32 0)
1702dbc0a5dfSJF Bastien  ; CHECK: call void @llvm.prefetch.p0i8(i8* %stack, i32 0, i32 3, i32 0)
1703375fa138SDuncan P. N. Exon Smith
1704375fa138SDuncan P. N. Exon Smith  call void @llvm.pcmarker(i32 1)
1705375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.pcmarker(i32 1)
1706375fa138SDuncan P. N. Exon Smith
1707375fa138SDuncan P. N. Exon Smith  call i64 @llvm.readcyclecounter()
1708375fa138SDuncan P. N. Exon Smith  ; CHECK: call i64 @llvm.readcyclecounter()
1709375fa138SDuncan P. N. Exon Smith
1710375fa138SDuncan P. N. Exon Smith  call void @llvm.clear_cache(i8* null, i8* null)
1711375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.clear_cache(i8* null, i8* null)
1712375fa138SDuncan P. N. Exon Smith
1713375fa138SDuncan P. N. Exon Smith  call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0)
1714375fa138SDuncan P. N. Exon Smith  ; CHECK: call void @llvm.instrprof_increment(i8* null, i64 0, i32 0, i32 0)
1715375fa138SDuncan P. N. Exon Smith
1716375fa138SDuncan P. N. Exon Smith  ret void
1717375fa138SDuncan P. N. Exon Smith}
1718375fa138SDuncan P. N. Exon Smith
1719375fa138SDuncan P. N. Exon Smithdeclare void @llvm.localescape(...)
1720375fa138SDuncan P. N. Exon Smithdeclare i8* @llvm.localrecover(i8* %func, i8* %fp, i32 %idx)
1721375fa138SDuncan P. N. Exon Smithdefine void @intrinsics.localescape() {
1722375fa138SDuncan P. N. Exon Smith  %static.alloca = alloca i32
1723375fa138SDuncan P. N. Exon Smith  call void (...) @llvm.localescape(i32* %static.alloca)
1724375fa138SDuncan P. N. Exon Smith  ; CHECK: call void (...) @llvm.localescape(i32* %static.alloca)
1725375fa138SDuncan P. N. Exon Smith
1726375fa138SDuncan P. N. Exon Smith  call void @intrinsics.localrecover()
1727375fa138SDuncan P. N. Exon Smith
1728375fa138SDuncan P. N. Exon Smith  ret void
1729375fa138SDuncan P. N. Exon Smith}
1730375fa138SDuncan P. N. Exon Smithdefine void @intrinsics.localrecover() {
1731375fa138SDuncan P. N. Exon Smith  %func = bitcast void ()* @intrinsics.localescape to i8*
1732375fa138SDuncan P. N. Exon Smith  %fp = call i8* @llvm.frameaddress(i32 1)
1733375fa138SDuncan P. N. Exon Smith  call i8* @llvm.localrecover(i8* %func, i8* %fp, i32 0)
1734375fa138SDuncan P. N. Exon Smith  ; CHECK: call i8* @llvm.localrecover(i8* %func, i8* %fp, i32 0)
1735375fa138SDuncan P. N. Exon Smith
1736375fa138SDuncan P. N. Exon Smith  ret void
1737375fa138SDuncan P. N. Exon Smith}
1738375fa138SDuncan P. N. Exon Smith
1739375fa138SDuncan P. N. Exon Smith; We need this function to provide `uses' for some metadata tests.
1740375fa138SDuncan P. N. Exon Smithdefine void @misc.metadata() {
1741375fa138SDuncan P. N. Exon Smith  call void @f1(), !srcloc !11
1742375fa138SDuncan P. N. Exon Smith  call void @f1(), !srcloc !12
1743375fa138SDuncan P. N. Exon Smith  call void @f1(), !srcloc !13
1744375fa138SDuncan P. N. Exon Smith  call void @f1(), !srcloc !14
1745375fa138SDuncan P. N. Exon Smith  ret void
1746375fa138SDuncan P. N. Exon Smith}
1747375fa138SDuncan P. N. Exon Smith
1748b513a9faSSanjoy Dasdeclare void @op_bundle_callee_0()
1749b513a9faSSanjoy Dasdeclare void @op_bundle_callee_1(i32,i32)
1750b513a9faSSanjoy Das
1751b513a9faSSanjoy Dasdefine void @call_with_operand_bundle0(i32* %ptr) {
1752b513a9faSSanjoy Das; CHECK-LABEL: call_with_operand_bundle0(
1753b513a9faSSanjoy Das entry:
1754b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1755b513a9faSSanjoy Das  %x = add i32 42, 1
1756b513a9faSSanjoy Das  call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float  0.000000e+00, i64 100, i32 %l) ]
1757b513a9faSSanjoy Das; CHECK: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float  0.000000e+00, i64 100, i32 %l) ]
1758b513a9faSSanjoy Das  ret void
1759b513a9faSSanjoy Das}
1760b513a9faSSanjoy Das
1761b513a9faSSanjoy Dasdefine void @call_with_operand_bundle1(i32* %ptr) {
1762b513a9faSSanjoy Das; CHECK-LABEL: call_with_operand_bundle1(
1763b513a9faSSanjoy Das entry:
1764b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1765b513a9faSSanjoy Das  %x = add i32 42, 1
1766b513a9faSSanjoy Das
1767b513a9faSSanjoy Das  call void @op_bundle_callee_0()
1768b513a9faSSanjoy Das  call void @op_bundle_callee_0() [ "foo"() ]
1769b513a9faSSanjoy Das  call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float  0.000000e+00, i64 100, i32 %l) ]
1770b513a9faSSanjoy Das; CHECK: @op_bundle_callee_0(){{$}}
1771b513a9faSSanjoy Das; CHECK-NEXT: call void @op_bundle_callee_0() [ "foo"() ]
1772b513a9faSSanjoy Das; CHECK-NEXT: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float  0.000000e+00, i64 100, i32 %l) ]
1773b513a9faSSanjoy Das  ret void
1774b513a9faSSanjoy Das}
1775b513a9faSSanjoy Das
1776b513a9faSSanjoy Dasdefine void @call_with_operand_bundle2(i32* %ptr) {
1777b513a9faSSanjoy Das; CHECK-LABEL: call_with_operand_bundle2(
1778b513a9faSSanjoy Das entry:
1779b513a9faSSanjoy Das  call void @op_bundle_callee_0() [ "foo"() ]
1780b513a9faSSanjoy Das; CHECK: call void @op_bundle_callee_0() [ "foo"() ]
1781b513a9faSSanjoy Das  ret void
1782b513a9faSSanjoy Das}
1783b513a9faSSanjoy Das
1784b513a9faSSanjoy Dasdefine void @call_with_operand_bundle3(i32* %ptr) {
1785b513a9faSSanjoy Das; CHECK-LABEL: call_with_operand_bundle3(
1786b513a9faSSanjoy Das entry:
1787b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1788b513a9faSSanjoy Das  %x = add i32 42, 1
1789b513a9faSSanjoy Das  call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float  0.000000e+00, i32 %l) ]
1790b513a9faSSanjoy Das; CHECK: call void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float  0.000000e+00, i32 %l) ]
1791b513a9faSSanjoy Das  ret void
1792b513a9faSSanjoy Das}
1793b513a9faSSanjoy Das
1794b513a9faSSanjoy Dasdefine void @call_with_operand_bundle4(i32* %ptr) {
1795b513a9faSSanjoy Das; CHECK-LABEL: call_with_operand_bundle4(
1796b513a9faSSanjoy Das entry:
1797b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1798b513a9faSSanjoy Das  %x = add i32 42, 1
1799b513a9faSSanjoy Das  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) ]
1800b513a9faSSanjoy Das; 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) ]
1801b513a9faSSanjoy Das  ret void
1802b513a9faSSanjoy Das}
1803b513a9faSSanjoy Das
1804b513a9faSSanjoy Das; Invoke versions of the above tests:
1805b513a9faSSanjoy Das
1806b513a9faSSanjoy Das
1807b513a9faSSanjoy Dasdefine void @invoke_with_operand_bundle0(i32* %ptr) personality i8 3 {
1808b513a9faSSanjoy Das; CHECK-LABEL: @invoke_with_operand_bundle0(
1809b513a9faSSanjoy Das entry:
1810b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1811b513a9faSSanjoy Das  %x = add i32 42, 1
1812b513a9faSSanjoy Das  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
1813b513a9faSSanjoy Das; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "bar"(float  0.000000e+00, i64 100, i32 %l) ]
1814b513a9faSSanjoy Das
1815b513a9faSSanjoy Dasexception:
1816b513a9faSSanjoy Das  %cleanup = landingpad i8 cleanup
1817b513a9faSSanjoy Das  br label %normal
1818b513a9faSSanjoy Dasnormal:
1819b513a9faSSanjoy Das  ret void
1820b513a9faSSanjoy Das}
1821b513a9faSSanjoy Das
1822b513a9faSSanjoy Dasdefine void @invoke_with_operand_bundle1(i32* %ptr) personality i8 3 {
1823b513a9faSSanjoy Das; CHECK-LABEL: @invoke_with_operand_bundle1(
1824b513a9faSSanjoy Das entry:
1825b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1826b513a9faSSanjoy Das  %x = add i32 42, 1
1827b513a9faSSanjoy Das
1828b513a9faSSanjoy Das  invoke void @op_bundle_callee_0() to label %normal unwind label %exception
1829b513a9faSSanjoy Das; CHECK: invoke void @op_bundle_callee_0(){{$}}
1830b513a9faSSanjoy Das
1831b513a9faSSanjoy Dasexception:
1832b513a9faSSanjoy Das  %cleanup = landingpad i8 cleanup
1833b513a9faSSanjoy Das  br label %normal
1834b513a9faSSanjoy Das
1835b513a9faSSanjoy Dasnormal:
1836b513a9faSSanjoy Das  invoke void @op_bundle_callee_0() [ "foo"() ] to label %normal1 unwind label %exception1
1837b513a9faSSanjoy Das; CHECK: invoke void @op_bundle_callee_0() [ "foo"() ]
1838b513a9faSSanjoy Das
1839b513a9faSSanjoy Dasexception1:
1840b513a9faSSanjoy Das  %cleanup1 = landingpad i8 cleanup
1841b513a9faSSanjoy Das  br label %normal1
1842b513a9faSSanjoy Das
1843b513a9faSSanjoy Dasnormal1:
1844b513a9faSSanjoy Das  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
1845b513a9faSSanjoy Das; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float  0.000000e+00, i32 %l) ]
1846b513a9faSSanjoy Das
1847b513a9faSSanjoy Dasexception2:
1848b513a9faSSanjoy Das  %cleanup2 = landingpad i8 cleanup
1849b513a9faSSanjoy Das  br label %normal2
1850b513a9faSSanjoy Das
1851b513a9faSSanjoy Dasnormal2:
1852b513a9faSSanjoy Das  ret void
1853b513a9faSSanjoy Das}
1854b513a9faSSanjoy Das
1855b513a9faSSanjoy Dasdefine void @invoke_with_operand_bundle2(i32* %ptr) personality i8 3 {
1856b513a9faSSanjoy Das; CHECK-LABEL: @invoke_with_operand_bundle2(
1857b513a9faSSanjoy Das entry:
1858b513a9faSSanjoy Das  invoke void @op_bundle_callee_0() [ "foo"() ] to label %normal unwind label %exception
1859b513a9faSSanjoy Das; CHECK: invoke void @op_bundle_callee_0() [ "foo"() ]
1860b513a9faSSanjoy Das
1861b513a9faSSanjoy Dasexception:
1862b513a9faSSanjoy Das  %cleanup = landingpad i8 cleanup
1863b513a9faSSanjoy Das  br label %normal
1864b513a9faSSanjoy Dasnormal:
1865b513a9faSSanjoy Das  ret void
1866b513a9faSSanjoy Das}
1867b513a9faSSanjoy Das
1868b513a9faSSanjoy Dasdefine void @invoke_with_operand_bundle3(i32* %ptr) personality i8 3 {
1869b513a9faSSanjoy Das; CHECK-LABEL: @invoke_with_operand_bundle3(
1870b513a9faSSanjoy Das entry:
1871b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1872b513a9faSSanjoy Das  %x = add i32 42, 1
1873b513a9faSSanjoy Das  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
1874b513a9faSSanjoy Das; CHECK: invoke void @op_bundle_callee_0() [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float  0.000000e+00, i32 %l) ]
1875b513a9faSSanjoy Das
1876b513a9faSSanjoy Dasexception:
1877b513a9faSSanjoy Das  %cleanup = landingpad i8 cleanup
1878b513a9faSSanjoy Das  br label %normal
1879b513a9faSSanjoy Dasnormal:
1880b513a9faSSanjoy Das  ret void
1881b513a9faSSanjoy Das}
1882b513a9faSSanjoy Das
1883b513a9faSSanjoy Dasdefine void @invoke_with_operand_bundle4(i32* %ptr) personality i8 3 {
1884b513a9faSSanjoy Das; CHECK-LABEL: @invoke_with_operand_bundle4(
1885b513a9faSSanjoy Das entry:
1886b513a9faSSanjoy Das  %l = load i32, i32* %ptr
1887b513a9faSSanjoy Das  %x = add i32 42, 1
1888b513a9faSSanjoy Das  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) ]
1889b513a9faSSanjoy Das        to label %normal unwind label %exception
1890b513a9faSSanjoy Das; 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) ]
1891b513a9faSSanjoy Das
1892b513a9faSSanjoy Dasexception:
1893b513a9faSSanjoy Das  %cleanup = landingpad i8 cleanup
1894b513a9faSSanjoy Das  br label %normal
1895b513a9faSSanjoy Dasnormal:
1896b513a9faSSanjoy Das  ret void
1897b513a9faSSanjoy Das}
1898b513a9faSSanjoy Das
18997cf63826SMehdi Aminideclare void @vaargs_func(...)
19007cf63826SMehdi Aminidefine void @invoke_with_operand_bundle_vaarg(i32* %ptr) personality i8 3 {
19017cf63826SMehdi Amini; CHECK-LABEL: @invoke_with_operand_bundle_vaarg(
19027cf63826SMehdi Amini entry:
19037cf63826SMehdi Amini  %l = load i32, i32* %ptr
19047cf63826SMehdi Amini  %x = add i32 42, 1
19057cf63826SMehdi Amini  invoke void (...) @vaargs_func(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float  0.000000e+00, i32 %l) ]
19067cf63826SMehdi Amini        to label %normal unwind label %exception
19077cf63826SMehdi Amini; CHECK: invoke void (...) @vaargs_func(i32 10, i32 %x) [ "foo"(i32 42, i64 100, i32 %x), "foo"(i32 42, float  0.000000e+00, i32 %l) ]
19087cf63826SMehdi Amini
19097cf63826SMehdi Aminiexception:
19107cf63826SMehdi Amini  %cleanup = landingpad i8 cleanup
19117cf63826SMehdi Amini  br label %normal
19127cf63826SMehdi Amininormal:
19137cf63826SMehdi Amini  ret void
19147cf63826SMehdi Amini}
19157cf63826SMehdi Amini
19167cf63826SMehdi Amini
191784c9f991SNicolai Haehnledeclare void @f.writeonly() writeonly
1918cc0a4cdcSHideto Ueno; CHECK: declare void @f.writeonly() #41
1919b513a9faSSanjoy Das
1920b19b57eaSMatt Arsenaultdeclare void @f.speculatable() speculatable
1921cc0a4cdcSHideto Ueno; CHECK: declare void @f.speculatable() #42
1922b19b57eaSMatt Arsenault
1923d93620bfSPeter Collingbourne;; Constant Expressions
1924d93620bfSPeter Collingbourne
1925d93620bfSPeter Collingbournedefine i8** @constexpr() {
1926d93620bfSPeter Collingbourne  ; CHECK: ret i8** getelementptr inbounds ({ [4 x i8*], [4 x i8*] }, { [4 x i8*], [4 x i8*] }* null, i32 0, inrange i32 1, i32 2)
1927d93620bfSPeter Collingbourne  ret i8** getelementptr inbounds ({ [4 x i8*], [4 x i8*] }, { [4 x i8*], [4 x i8*] }* null, i32 0, inrange i32 1, i32 2)
1928d93620bfSPeter Collingbourne}
1929d93620bfSPeter Collingbourne
1930b689cc64SKevin P. Nealdefine void @instructions.strictfp() strictfp {
1931b689cc64SKevin P. Neal  call void @f.strictfp() strictfp
1932b689cc64SKevin P. Neal  ; CHECK: call void @f.strictfp() #43
1933b689cc64SKevin P. Neal
1934b689cc64SKevin P. Neal  ret void
1935b689cc64SKevin P. Neal}
1936b689cc64SKevin P. Neal
193728033302SMarco Elverdeclare void @f.nosanitize_coverage() nosanitize_coverage
193828033302SMarco Elver; CHECK: declare void @f.nosanitize_coverage() #44
193928033302SMarco Elver
1940b0391dfcSAlexander Potapenkodeclare void @f.disable_sanitizer_instrumentation() disable_sanitizer_instrumentation
1941b0391dfcSAlexander Potapenko; CHECK: declare void @f.disable_sanitizer_instrumentation() #45
1942b0391dfcSAlexander Potapenko
1943caf1316fSMatt Arsenault; immarg attribute
1944caf1316fSMatt Arsenaultdeclare void @llvm.test.immarg.intrinsic(i32 immarg)
1945caf1316fSMatt Arsenault; CHECK: declare void @llvm.test.immarg.intrinsic(i32 immarg)
1946caf1316fSMatt Arsenault
1947b7141207STim Northover; byval attribute with type
1948b7141207STim Northover%named_type = type [8 x i8]
1949b7141207STim Northoverdeclare void @byval_type(i32* byval(i32) align 2)
1950b7141207STim Northoverdeclare void @byval_type2({ i8, i8* }* byval({ i8, i8* }))
1951b7141207STim Northoverdeclare void @byval_named_type(%named_type* byval(%named_type))
1952b7141207STim Northover; CHECK: declare void @byval_type(i32* byval(i32) align 2)
1953b7141207STim Northover; CHECK: declare void @byval_type2({ i8, i8* }* byval({ i8, i8* }))
1954b7141207STim Northover; CHECK: declare void @byval_named_type([8 x i8]* byval([8 x i8]))
1955b7141207STim Northover
1956aade28eaSAugie Facklerdeclare void @f.allocsize_one(i32) allocsize(0)
1957aade28eaSAugie Facklerdeclare void @f.allocsize_two(i32, i32) allocsize(1, 0)
1958aade28eaSAugie Fackler; CHECK: Function Attrs: allocsize(0)
1959aade28eaSAugie Fackler; CHECK: declare void @f.allocsize_one(i32)
1960aade28eaSAugie Fackler; CHECK: Function Attrs: allocsize(1,0)
1961aade28eaSAugie Fackler; CHECK: declare void @f.allocsize_two(i32, i32)
1962aade28eaSAugie Fackler
196317ce89faSTong Zhangdeclare void @f.nosanitize_bounds() nosanitize_bounds
196417ce89faSTong Zhang; CHECK: declare void @f.nosanitize_bounds() #48
196517ce89faSTong Zhang
196642861faaSAugie Facklerdeclare void @f.allockind() allockind("alloc,uninitialized")
196742861faaSAugie Fackler; CHECK: declare void @f.allockind() #49
196842861faaSAugie Fackler
1969375fa138SDuncan P. N. Exon Smith; CHECK: attributes #0 = { alignstack=4 }
1970375fa138SDuncan P. N. Exon Smith; CHECK: attributes #1 = { alignstack=8 }
1971375fa138SDuncan P. N. Exon Smith; CHECK: attributes #2 = { alwaysinline }
1972375fa138SDuncan P. N. Exon Smith; CHECK: attributes #3 = { cold }
1973375fa138SDuncan P. N. Exon Smith; CHECK: attributes #4 = { convergent }
1974375fa138SDuncan P. N. Exon Smith; CHECK: attributes #5 = { inlinehint }
1975375fa138SDuncan P. N. Exon Smith; CHECK: attributes #6 = { jumptable }
1976375fa138SDuncan P. N. Exon Smith; CHECK: attributes #7 = { minsize }
1977375fa138SDuncan P. N. Exon Smith; CHECK: attributes #8 = { naked }
1978375fa138SDuncan P. N. Exon Smith; CHECK: attributes #9 = { nobuiltin }
1979375fa138SDuncan P. N. Exon Smith; CHECK: attributes #10 = { noduplicate }
1980375fa138SDuncan P. N. Exon Smith; CHECK: attributes #11 = { noimplicitfloat }
1981375fa138SDuncan P. N. Exon Smith; CHECK: attributes #12 = { noinline }
1982375fa138SDuncan P. N. Exon Smith; CHECK: attributes #13 = { nonlazybind }
1983375fa138SDuncan P. N. Exon Smith; CHECK: attributes #14 = { noredzone }
1984375fa138SDuncan P. N. Exon Smith; CHECK: attributes #15 = { noreturn }
1985375fa138SDuncan P. N. Exon Smith; CHECK: attributes #16 = { nounwind }
1986375fa138SDuncan P. N. Exon Smith; CHECK: attributes #17 = { noinline optnone }
1987375fa138SDuncan P. N. Exon Smith; CHECK: attributes #18 = { optsize }
1988375fa138SDuncan P. N. Exon Smith; CHECK: attributes #19 = { readnone }
1989375fa138SDuncan P. N. Exon Smith; CHECK: attributes #20 = { readonly }
1990375fa138SDuncan P. N. Exon Smith; CHECK: attributes #21 = { returns_twice }
1991375fa138SDuncan P. N. Exon Smith; CHECK: attributes #22 = { safestack }
1992375fa138SDuncan P. N. Exon Smith; CHECK: attributes #23 = { sanitize_address }
1993375fa138SDuncan P. N. Exon Smith; CHECK: attributes #24 = { sanitize_memory }
1994375fa138SDuncan P. N. Exon Smith; CHECK: attributes #25 = { sanitize_thread }
1995375fa138SDuncan P. N. Exon Smith; CHECK: attributes #26 = { ssp }
1996375fa138SDuncan P. N. Exon Smith; CHECK: attributes #27 = { sspreq }
1997375fa138SDuncan P. N. Exon Smith; CHECK: attributes #28 = { sspstrong }
1998375fa138SDuncan P. N. Exon Smith; CHECK: attributes #29 = { "thunk" }
1999375fa138SDuncan P. N. Exon Smith; CHECK: attributes #30 = { uwtable }
2000375fa138SDuncan P. N. Exon Smith; CHECK: attributes #31 = { "cpu"="cortex-a8" }
2001e6f87ca8SJames Molloy; CHECK: attributes #32 = { norecurse }
2002fb3f4907SVaivaswatha Nagaraj; CHECK: attributes #33 = { inaccessiblememonly }
2003fb3f4907SVaivaswatha Nagaraj; CHECK: attributes #34 = { inaccessiblemem_or_argmemonly }
2004a81fff8aSJohannes Doerfert; CHECK: attributes #35 = { nocallback nofree nosync nounwind readnone willreturn }
2005a81fff8aSJohannes Doerfert; CHECK: attributes #36 = { nocallback nofree nosync nounwind willreturn }
2006fbfb1c79Ssstefan1; CHECK: attributes #37 = { argmemonly nounwind readonly }
2007fbfb1c79Ssstefan1; CHECK: attributes #38 = { argmemonly nounwind }
2008cc0a4cdcSHideto Ueno; CHECK: attributes #39 = { nounwind readonly }
2009a81fff8aSJohannes Doerfert; CHECK: attributes #40 = { inaccessiblemem_or_argmemonly nocallback nofree nosync nounwind willreturn }
2010cc0a4cdcSHideto Ueno; CHECK: attributes #41 = { writeonly }
2011cc0a4cdcSHideto Ueno; CHECK: attributes #42 = { speculatable }
2012b689cc64SKevin P. Neal; CHECK: attributes #43 = { strictfp }
201328033302SMarco Elver; CHECK: attributes #44 = { nosanitize_coverage }
2014b0391dfcSAlexander Potapenko; CHECK: attributes #45 = { disable_sanitizer_instrumentation }
2015aade28eaSAugie Fackler; CHECK: attributes #46 = { allocsize(0) }
2016aade28eaSAugie Fackler; CHECK: attributes #47 = { allocsize(1,0) }
201717ce89faSTong Zhang; CHECK: attributes #48 = { nosanitize_bounds }
201842861faaSAugie Fackler; CHECK: attributes #49 = { allockind("alloc,uninitialized") }
201942861faaSAugie Fackler; CHECK: attributes #50 = { builtin }
2020375fa138SDuncan P. N. Exon Smith
2021375fa138SDuncan P. N. Exon Smith;; Metadata
2022375fa138SDuncan P. N. Exon Smith
2023375fa138SDuncan P. N. Exon Smith; Metadata -- Module flags
2024375fa138SDuncan P. N. Exon Smith!llvm.module.flags = !{!0, !1, !2, !4, !5, !6}
2025375fa138SDuncan P. N. Exon Smith; CHECK: !llvm.module.flags = !{!0, !1, !2, !4, !5, !6}
2026375fa138SDuncan P. N. Exon Smith
2027375fa138SDuncan P. N. Exon Smith!0 = !{i32 1, !"mod1", i32 0}
2028375fa138SDuncan P. N. Exon Smith; CHECK: !0 = !{i32 1, !"mod1", i32 0}
2029375fa138SDuncan P. N. Exon Smith!1 = !{i32 2, !"mod2", i32 0}
2030375fa138SDuncan P. N. Exon Smith; CHECK: !1 = !{i32 2, !"mod2", i32 0}
2031375fa138SDuncan P. N. Exon Smith!2 = !{i32 3, !"mod3", !3}
2032375fa138SDuncan P. N. Exon Smith; CHECK: !2 = !{i32 3, !"mod3", !3}
2033375fa138SDuncan P. N. Exon Smith!3 = !{!"mod6", !0}
2034375fa138SDuncan P. N. Exon Smith; CHECK: !3 = !{!"mod6", !0}
2035375fa138SDuncan P. N. Exon Smith!4 = !{i32 4, !"mod4", i32 0}
2036375fa138SDuncan P. N. Exon Smith; CHECK: !4 = !{i32 4, !"mod4", i32 0}
2037375fa138SDuncan P. N. Exon Smith!5 = !{i32 5, !"mod5", !0}
2038375fa138SDuncan P. N. Exon Smith; CHECK: !5 = !{i32 5, !"mod5", !0}
2039375fa138SDuncan P. N. Exon Smith!6 = !{i32 6, !"mod6", !0}
2040375fa138SDuncan P. N. Exon Smith; CHECK: !6 = !{i32 6, !"mod6", !0}
2041375fa138SDuncan P. N. Exon Smith
2042375fa138SDuncan P. N. Exon Smith; Metadata -- Check `distinct'
2043375fa138SDuncan P. N. Exon Smith!11 = distinct !{}
2044375fa138SDuncan P. N. Exon Smith; CHECK: !11 = distinct !{}
2045375fa138SDuncan P. N. Exon Smith!12 = distinct !{}
2046375fa138SDuncan P. N. Exon Smith; CHECK: !12 = distinct !{}
2047375fa138SDuncan P. N. Exon Smith!13 = !{!11}
2048375fa138SDuncan P. N. Exon Smith; CHECK: !13 = !{!11}
2049375fa138SDuncan P. N. Exon Smith!14 = !{!12}
2050375fa138SDuncan P. N. Exon Smith; CHECK: !14 = !{!12}
2051