1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "\b(sp)\b" --filter "^\s*(ld[^r]|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"
2 ; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
3 ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+outline-atomics -O0 | FileCheck %s --check-prefixes=CHECK,-O0
4 ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+outline-atomics -O1 | FileCheck %s --check-prefixes=CHECK,-O1
6 define dso_local i8 @cmpxchg_i8_aligned_monotonic_monotonic(i8 %expected, i8 %new, ptr %ptr) {
7 ; CHECK-LABEL: cmpxchg_i8_aligned_monotonic_monotonic:
8 ; CHECK: bl __aarch64_cas1_relax
9 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
10 %r = extractvalue { i8, i1 } %pair, 0
14 define dso_local i8 @cmpxchg_i8_aligned_monotonic_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
15 ; CHECK-LABEL: cmpxchg_i8_aligned_monotonic_monotonic_weak:
16 ; CHECK: bl __aarch64_cas1_relax
17 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
18 %r = extractvalue { i8, i1 } %pair, 0
22 define dso_local i8 @cmpxchg_i8_aligned_monotonic_acquire(i8 %expected, i8 %new, ptr %ptr) {
23 ; CHECK-LABEL: cmpxchg_i8_aligned_monotonic_acquire:
24 ; CHECK: bl __aarch64_cas1_acq
25 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
26 %r = extractvalue { i8, i1 } %pair, 0
30 define dso_local i8 @cmpxchg_i8_aligned_monotonic_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
31 ; CHECK-LABEL: cmpxchg_i8_aligned_monotonic_acquire_weak:
32 ; CHECK: bl __aarch64_cas1_acq
33 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
34 %r = extractvalue { i8, i1 } %pair, 0
38 define dso_local i8 @cmpxchg_i8_aligned_monotonic_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
39 ; CHECK-LABEL: cmpxchg_i8_aligned_monotonic_seq_cst:
40 ; CHECK: bl __aarch64_cas1_acq_rel
41 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
42 %r = extractvalue { i8, i1 } %pair, 0
46 define dso_local i8 @cmpxchg_i8_aligned_monotonic_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
47 ; CHECK-LABEL: cmpxchg_i8_aligned_monotonic_seq_cst_weak:
48 ; CHECK: bl __aarch64_cas1_acq_rel
49 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
50 %r = extractvalue { i8, i1 } %pair, 0
54 define dso_local i8 @cmpxchg_i8_aligned_acquire_monotonic(i8 %expected, i8 %new, ptr %ptr) {
55 ; CHECK-LABEL: cmpxchg_i8_aligned_acquire_monotonic:
56 ; CHECK: bl __aarch64_cas1_acq
57 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
58 %r = extractvalue { i8, i1 } %pair, 0
62 define dso_local i8 @cmpxchg_i8_aligned_acquire_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
63 ; CHECK-LABEL: cmpxchg_i8_aligned_acquire_monotonic_weak:
64 ; CHECK: bl __aarch64_cas1_acq
65 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
66 %r = extractvalue { i8, i1 } %pair, 0
70 define dso_local i8 @cmpxchg_i8_aligned_acquire_acquire(i8 %expected, i8 %new, ptr %ptr) {
71 ; CHECK-LABEL: cmpxchg_i8_aligned_acquire_acquire:
72 ; CHECK: bl __aarch64_cas1_acq
73 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
74 %r = extractvalue { i8, i1 } %pair, 0
78 define dso_local i8 @cmpxchg_i8_aligned_acquire_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
79 ; CHECK-LABEL: cmpxchg_i8_aligned_acquire_acquire_weak:
80 ; CHECK: bl __aarch64_cas1_acq
81 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
82 %r = extractvalue { i8, i1 } %pair, 0
86 define dso_local i8 @cmpxchg_i8_aligned_acquire_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
87 ; CHECK-LABEL: cmpxchg_i8_aligned_acquire_seq_cst:
88 ; CHECK: bl __aarch64_cas1_acq_rel
89 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
90 %r = extractvalue { i8, i1 } %pair, 0
94 define dso_local i8 @cmpxchg_i8_aligned_acquire_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
95 ; CHECK-LABEL: cmpxchg_i8_aligned_acquire_seq_cst_weak:
96 ; CHECK: bl __aarch64_cas1_acq_rel
97 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
98 %r = extractvalue { i8, i1 } %pair, 0
102 define dso_local i8 @cmpxchg_i8_aligned_release_monotonic(i8 %expected, i8 %new, ptr %ptr) {
103 ; CHECK-LABEL: cmpxchg_i8_aligned_release_monotonic:
104 ; CHECK: bl __aarch64_cas1_rel
105 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
106 %r = extractvalue { i8, i1 } %pair, 0
110 define dso_local i8 @cmpxchg_i8_aligned_release_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
111 ; CHECK-LABEL: cmpxchg_i8_aligned_release_monotonic_weak:
112 ; CHECK: bl __aarch64_cas1_rel
113 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
114 %r = extractvalue { i8, i1 } %pair, 0
118 define dso_local i8 @cmpxchg_i8_aligned_release_acquire(i8 %expected, i8 %new, ptr %ptr) {
119 ; CHECK-LABEL: cmpxchg_i8_aligned_release_acquire:
120 ; CHECK: bl __aarch64_cas1_acq_rel
121 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release acquire, align 1
122 %r = extractvalue { i8, i1 } %pair, 0
126 define dso_local i8 @cmpxchg_i8_aligned_release_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
127 ; CHECK-LABEL: cmpxchg_i8_aligned_release_acquire_weak:
128 ; CHECK: bl __aarch64_cas1_acq_rel
129 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release acquire, align 1
130 %r = extractvalue { i8, i1 } %pair, 0
134 define dso_local i8 @cmpxchg_i8_aligned_release_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
135 ; CHECK-LABEL: cmpxchg_i8_aligned_release_seq_cst:
136 ; CHECK: bl __aarch64_cas1_acq_rel
137 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
138 %r = extractvalue { i8, i1 } %pair, 0
142 define dso_local i8 @cmpxchg_i8_aligned_release_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
143 ; CHECK-LABEL: cmpxchg_i8_aligned_release_seq_cst_weak:
144 ; CHECK: bl __aarch64_cas1_acq_rel
145 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
146 %r = extractvalue { i8, i1 } %pair, 0
150 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_monotonic(i8 %expected, i8 %new, ptr %ptr) {
151 ; CHECK-LABEL: cmpxchg_i8_aligned_acq_rel_monotonic:
152 ; CHECK: bl __aarch64_cas1_acq_rel
153 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
154 %r = extractvalue { i8, i1 } %pair, 0
158 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
159 ; CHECK-LABEL: cmpxchg_i8_aligned_acq_rel_monotonic_weak:
160 ; CHECK: bl __aarch64_cas1_acq_rel
161 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
162 %r = extractvalue { i8, i1 } %pair, 0
166 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_acquire(i8 %expected, i8 %new, ptr %ptr) {
167 ; CHECK-LABEL: cmpxchg_i8_aligned_acq_rel_acquire:
168 ; CHECK: bl __aarch64_cas1_acq_rel
169 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
170 %r = extractvalue { i8, i1 } %pair, 0
174 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
175 ; CHECK-LABEL: cmpxchg_i8_aligned_acq_rel_acquire_weak:
176 ; CHECK: bl __aarch64_cas1_acq_rel
177 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
178 %r = extractvalue { i8, i1 } %pair, 0
182 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
183 ; CHECK-LABEL: cmpxchg_i8_aligned_acq_rel_seq_cst:
184 ; CHECK: bl __aarch64_cas1_acq_rel
185 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
186 %r = extractvalue { i8, i1 } %pair, 0
190 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
191 ; CHECK-LABEL: cmpxchg_i8_aligned_acq_rel_seq_cst_weak:
192 ; CHECK: bl __aarch64_cas1_acq_rel
193 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
194 %r = extractvalue { i8, i1 } %pair, 0
198 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_monotonic(i8 %expected, i8 %new, ptr %ptr) {
199 ; CHECK-LABEL: cmpxchg_i8_aligned_seq_cst_monotonic:
200 ; CHECK: bl __aarch64_cas1_acq_rel
201 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
202 %r = extractvalue { i8, i1 } %pair, 0
206 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
207 ; CHECK-LABEL: cmpxchg_i8_aligned_seq_cst_monotonic_weak:
208 ; CHECK: bl __aarch64_cas1_acq_rel
209 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
210 %r = extractvalue { i8, i1 } %pair, 0
214 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_acquire(i8 %expected, i8 %new, ptr %ptr) {
215 ; CHECK-LABEL: cmpxchg_i8_aligned_seq_cst_acquire:
216 ; CHECK: bl __aarch64_cas1_acq_rel
217 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
218 %r = extractvalue { i8, i1 } %pair, 0
222 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
223 ; CHECK-LABEL: cmpxchg_i8_aligned_seq_cst_acquire_weak:
224 ; CHECK: bl __aarch64_cas1_acq_rel
225 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
226 %r = extractvalue { i8, i1 } %pair, 0
230 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
231 ; CHECK-LABEL: cmpxchg_i8_aligned_seq_cst_seq_cst:
232 ; CHECK: bl __aarch64_cas1_acq_rel
233 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
234 %r = extractvalue { i8, i1 } %pair, 0
238 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
239 ; CHECK-LABEL: cmpxchg_i8_aligned_seq_cst_seq_cst_weak:
240 ; CHECK: bl __aarch64_cas1_acq_rel
241 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
242 %r = extractvalue { i8, i1 } %pair, 0
246 define dso_local i16 @cmpxchg_i16_aligned_monotonic_monotonic(i16 %expected, i16 %new, ptr %ptr) {
247 ; CHECK-LABEL: cmpxchg_i16_aligned_monotonic_monotonic:
248 ; CHECK: bl __aarch64_cas2_relax
249 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 2
250 %r = extractvalue { i16, i1 } %pair, 0
254 define dso_local i16 @cmpxchg_i16_aligned_monotonic_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
255 ; CHECK-LABEL: cmpxchg_i16_aligned_monotonic_monotonic_weak:
256 ; CHECK: bl __aarch64_cas2_relax
257 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 2
258 %r = extractvalue { i16, i1 } %pair, 0
262 define dso_local i16 @cmpxchg_i16_aligned_monotonic_acquire(i16 %expected, i16 %new, ptr %ptr) {
263 ; CHECK-LABEL: cmpxchg_i16_aligned_monotonic_acquire:
264 ; CHECK: bl __aarch64_cas2_acq
265 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 2
266 %r = extractvalue { i16, i1 } %pair, 0
270 define dso_local i16 @cmpxchg_i16_aligned_monotonic_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
271 ; CHECK-LABEL: cmpxchg_i16_aligned_monotonic_acquire_weak:
272 ; CHECK: bl __aarch64_cas2_acq
273 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 2
274 %r = extractvalue { i16, i1 } %pair, 0
278 define dso_local i16 @cmpxchg_i16_aligned_monotonic_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
279 ; CHECK-LABEL: cmpxchg_i16_aligned_monotonic_seq_cst:
280 ; CHECK: bl __aarch64_cas2_acq_rel
281 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 2
282 %r = extractvalue { i16, i1 } %pair, 0
286 define dso_local i16 @cmpxchg_i16_aligned_monotonic_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
287 ; CHECK-LABEL: cmpxchg_i16_aligned_monotonic_seq_cst_weak:
288 ; CHECK: bl __aarch64_cas2_acq_rel
289 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 2
290 %r = extractvalue { i16, i1 } %pair, 0
294 define dso_local i16 @cmpxchg_i16_aligned_acquire_monotonic(i16 %expected, i16 %new, ptr %ptr) {
295 ; CHECK-LABEL: cmpxchg_i16_aligned_acquire_monotonic:
296 ; CHECK: bl __aarch64_cas2_acq
297 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 2
298 %r = extractvalue { i16, i1 } %pair, 0
302 define dso_local i16 @cmpxchg_i16_aligned_acquire_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
303 ; CHECK-LABEL: cmpxchg_i16_aligned_acquire_monotonic_weak:
304 ; CHECK: bl __aarch64_cas2_acq
305 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 2
306 %r = extractvalue { i16, i1 } %pair, 0
310 define dso_local i16 @cmpxchg_i16_aligned_acquire_acquire(i16 %expected, i16 %new, ptr %ptr) {
311 ; CHECK-LABEL: cmpxchg_i16_aligned_acquire_acquire:
312 ; CHECK: bl __aarch64_cas2_acq
313 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire acquire, align 2
314 %r = extractvalue { i16, i1 } %pair, 0
318 define dso_local i16 @cmpxchg_i16_aligned_acquire_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
319 ; CHECK-LABEL: cmpxchg_i16_aligned_acquire_acquire_weak:
320 ; CHECK: bl __aarch64_cas2_acq
321 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire acquire, align 2
322 %r = extractvalue { i16, i1 } %pair, 0
326 define dso_local i16 @cmpxchg_i16_aligned_acquire_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
327 ; CHECK-LABEL: cmpxchg_i16_aligned_acquire_seq_cst:
328 ; CHECK: bl __aarch64_cas2_acq_rel
329 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 2
330 %r = extractvalue { i16, i1 } %pair, 0
334 define dso_local i16 @cmpxchg_i16_aligned_acquire_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
335 ; CHECK-LABEL: cmpxchg_i16_aligned_acquire_seq_cst_weak:
336 ; CHECK: bl __aarch64_cas2_acq_rel
337 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 2
338 %r = extractvalue { i16, i1 } %pair, 0
342 define dso_local i16 @cmpxchg_i16_aligned_release_monotonic(i16 %expected, i16 %new, ptr %ptr) {
343 ; CHECK-LABEL: cmpxchg_i16_aligned_release_monotonic:
344 ; CHECK: bl __aarch64_cas2_rel
345 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release monotonic, align 2
346 %r = extractvalue { i16, i1 } %pair, 0
350 define dso_local i16 @cmpxchg_i16_aligned_release_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
351 ; CHECK-LABEL: cmpxchg_i16_aligned_release_monotonic_weak:
352 ; CHECK: bl __aarch64_cas2_rel
353 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release monotonic, align 2
354 %r = extractvalue { i16, i1 } %pair, 0
358 define dso_local i16 @cmpxchg_i16_aligned_release_acquire(i16 %expected, i16 %new, ptr %ptr) {
359 ; CHECK-LABEL: cmpxchg_i16_aligned_release_acquire:
360 ; CHECK: bl __aarch64_cas2_acq_rel
361 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release acquire, align 2
362 %r = extractvalue { i16, i1 } %pair, 0
366 define dso_local i16 @cmpxchg_i16_aligned_release_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
367 ; CHECK-LABEL: cmpxchg_i16_aligned_release_acquire_weak:
368 ; CHECK: bl __aarch64_cas2_acq_rel
369 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release acquire, align 2
370 %r = extractvalue { i16, i1 } %pair, 0
374 define dso_local i16 @cmpxchg_i16_aligned_release_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
375 ; CHECK-LABEL: cmpxchg_i16_aligned_release_seq_cst:
376 ; CHECK: bl __aarch64_cas2_acq_rel
377 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release seq_cst, align 2
378 %r = extractvalue { i16, i1 } %pair, 0
382 define dso_local i16 @cmpxchg_i16_aligned_release_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
383 ; CHECK-LABEL: cmpxchg_i16_aligned_release_seq_cst_weak:
384 ; CHECK: bl __aarch64_cas2_acq_rel
385 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release seq_cst, align 2
386 %r = extractvalue { i16, i1 } %pair, 0
390 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_monotonic(i16 %expected, i16 %new, ptr %ptr) {
391 ; CHECK-LABEL: cmpxchg_i16_aligned_acq_rel_monotonic:
392 ; CHECK: bl __aarch64_cas2_acq_rel
393 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 2
394 %r = extractvalue { i16, i1 } %pair, 0
398 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
399 ; CHECK-LABEL: cmpxchg_i16_aligned_acq_rel_monotonic_weak:
400 ; CHECK: bl __aarch64_cas2_acq_rel
401 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 2
402 %r = extractvalue { i16, i1 } %pair, 0
406 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_acquire(i16 %expected, i16 %new, ptr %ptr) {
407 ; CHECK-LABEL: cmpxchg_i16_aligned_acq_rel_acquire:
408 ; CHECK: bl __aarch64_cas2_acq_rel
409 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 2
410 %r = extractvalue { i16, i1 } %pair, 0
414 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
415 ; CHECK-LABEL: cmpxchg_i16_aligned_acq_rel_acquire_weak:
416 ; CHECK: bl __aarch64_cas2_acq_rel
417 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 2
418 %r = extractvalue { i16, i1 } %pair, 0
422 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
423 ; CHECK-LABEL: cmpxchg_i16_aligned_acq_rel_seq_cst:
424 ; CHECK: bl __aarch64_cas2_acq_rel
425 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 2
426 %r = extractvalue { i16, i1 } %pair, 0
430 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
431 ; CHECK-LABEL: cmpxchg_i16_aligned_acq_rel_seq_cst_weak:
432 ; CHECK: bl __aarch64_cas2_acq_rel
433 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 2
434 %r = extractvalue { i16, i1 } %pair, 0
438 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_monotonic(i16 %expected, i16 %new, ptr %ptr) {
439 ; CHECK-LABEL: cmpxchg_i16_aligned_seq_cst_monotonic:
440 ; CHECK: bl __aarch64_cas2_acq_rel
441 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 2
442 %r = extractvalue { i16, i1 } %pair, 0
446 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
447 ; CHECK-LABEL: cmpxchg_i16_aligned_seq_cst_monotonic_weak:
448 ; CHECK: bl __aarch64_cas2_acq_rel
449 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 2
450 %r = extractvalue { i16, i1 } %pair, 0
454 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_acquire(i16 %expected, i16 %new, ptr %ptr) {
455 ; CHECK-LABEL: cmpxchg_i16_aligned_seq_cst_acquire:
456 ; CHECK: bl __aarch64_cas2_acq_rel
457 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 2
458 %r = extractvalue { i16, i1 } %pair, 0
462 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
463 ; CHECK-LABEL: cmpxchg_i16_aligned_seq_cst_acquire_weak:
464 ; CHECK: bl __aarch64_cas2_acq_rel
465 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 2
466 %r = extractvalue { i16, i1 } %pair, 0
470 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
471 ; CHECK-LABEL: cmpxchg_i16_aligned_seq_cst_seq_cst:
472 ; CHECK: bl __aarch64_cas2_acq_rel
473 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 2
474 %r = extractvalue { i16, i1 } %pair, 0
478 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
479 ; CHECK-LABEL: cmpxchg_i16_aligned_seq_cst_seq_cst_weak:
480 ; CHECK: bl __aarch64_cas2_acq_rel
481 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 2
482 %r = extractvalue { i16, i1 } %pair, 0
486 define dso_local i32 @cmpxchg_i32_aligned_monotonic_monotonic(i32 %expected, i32 %new, ptr %ptr) {
487 ; CHECK-LABEL: cmpxchg_i32_aligned_monotonic_monotonic:
488 ; CHECK: bl __aarch64_cas4_relax
489 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 4
490 %r = extractvalue { i32, i1 } %pair, 0
494 define dso_local i32 @cmpxchg_i32_aligned_monotonic_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
495 ; CHECK-LABEL: cmpxchg_i32_aligned_monotonic_monotonic_weak:
496 ; CHECK: bl __aarch64_cas4_relax
497 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 4
498 %r = extractvalue { i32, i1 } %pair, 0
502 define dso_local i32 @cmpxchg_i32_aligned_monotonic_acquire(i32 %expected, i32 %new, ptr %ptr) {
503 ; CHECK-LABEL: cmpxchg_i32_aligned_monotonic_acquire:
504 ; CHECK: bl __aarch64_cas4_acq
505 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 4
506 %r = extractvalue { i32, i1 } %pair, 0
510 define dso_local i32 @cmpxchg_i32_aligned_monotonic_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
511 ; CHECK-LABEL: cmpxchg_i32_aligned_monotonic_acquire_weak:
512 ; CHECK: bl __aarch64_cas4_acq
513 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 4
514 %r = extractvalue { i32, i1 } %pair, 0
518 define dso_local i32 @cmpxchg_i32_aligned_monotonic_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
519 ; CHECK-LABEL: cmpxchg_i32_aligned_monotonic_seq_cst:
520 ; CHECK: bl __aarch64_cas4_acq_rel
521 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 4
522 %r = extractvalue { i32, i1 } %pair, 0
526 define dso_local i32 @cmpxchg_i32_aligned_monotonic_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
527 ; CHECK-LABEL: cmpxchg_i32_aligned_monotonic_seq_cst_weak:
528 ; CHECK: bl __aarch64_cas4_acq_rel
529 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 4
530 %r = extractvalue { i32, i1 } %pair, 0
534 define dso_local i32 @cmpxchg_i32_aligned_acquire_monotonic(i32 %expected, i32 %new, ptr %ptr) {
535 ; CHECK-LABEL: cmpxchg_i32_aligned_acquire_monotonic:
536 ; CHECK: bl __aarch64_cas4_acq
537 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 4
538 %r = extractvalue { i32, i1 } %pair, 0
542 define dso_local i32 @cmpxchg_i32_aligned_acquire_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
543 ; CHECK-LABEL: cmpxchg_i32_aligned_acquire_monotonic_weak:
544 ; CHECK: bl __aarch64_cas4_acq
545 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 4
546 %r = extractvalue { i32, i1 } %pair, 0
550 define dso_local i32 @cmpxchg_i32_aligned_acquire_acquire(i32 %expected, i32 %new, ptr %ptr) {
551 ; CHECK-LABEL: cmpxchg_i32_aligned_acquire_acquire:
552 ; CHECK: bl __aarch64_cas4_acq
553 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire acquire, align 4
554 %r = extractvalue { i32, i1 } %pair, 0
558 define dso_local i32 @cmpxchg_i32_aligned_acquire_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
559 ; CHECK-LABEL: cmpxchg_i32_aligned_acquire_acquire_weak:
560 ; CHECK: bl __aarch64_cas4_acq
561 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire acquire, align 4
562 %r = extractvalue { i32, i1 } %pair, 0
566 define dso_local i32 @cmpxchg_i32_aligned_acquire_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
567 ; CHECK-LABEL: cmpxchg_i32_aligned_acquire_seq_cst:
568 ; CHECK: bl __aarch64_cas4_acq_rel
569 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 4
570 %r = extractvalue { i32, i1 } %pair, 0
574 define dso_local i32 @cmpxchg_i32_aligned_acquire_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
575 ; CHECK-LABEL: cmpxchg_i32_aligned_acquire_seq_cst_weak:
576 ; CHECK: bl __aarch64_cas4_acq_rel
577 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 4
578 %r = extractvalue { i32, i1 } %pair, 0
582 define dso_local i32 @cmpxchg_i32_aligned_release_monotonic(i32 %expected, i32 %new, ptr %ptr) {
583 ; CHECK-LABEL: cmpxchg_i32_aligned_release_monotonic:
584 ; CHECK: bl __aarch64_cas4_rel
585 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release monotonic, align 4
586 %r = extractvalue { i32, i1 } %pair, 0
590 define dso_local i32 @cmpxchg_i32_aligned_release_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
591 ; CHECK-LABEL: cmpxchg_i32_aligned_release_monotonic_weak:
592 ; CHECK: bl __aarch64_cas4_rel
593 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release monotonic, align 4
594 %r = extractvalue { i32, i1 } %pair, 0
598 define dso_local i32 @cmpxchg_i32_aligned_release_acquire(i32 %expected, i32 %new, ptr %ptr) {
599 ; CHECK-LABEL: cmpxchg_i32_aligned_release_acquire:
600 ; CHECK: bl __aarch64_cas4_acq_rel
601 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release acquire, align 4
602 %r = extractvalue { i32, i1 } %pair, 0
606 define dso_local i32 @cmpxchg_i32_aligned_release_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
607 ; CHECK-LABEL: cmpxchg_i32_aligned_release_acquire_weak:
608 ; CHECK: bl __aarch64_cas4_acq_rel
609 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release acquire, align 4
610 %r = extractvalue { i32, i1 } %pair, 0
614 define dso_local i32 @cmpxchg_i32_aligned_release_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
615 ; CHECK-LABEL: cmpxchg_i32_aligned_release_seq_cst:
616 ; CHECK: bl __aarch64_cas4_acq_rel
617 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release seq_cst, align 4
618 %r = extractvalue { i32, i1 } %pair, 0
622 define dso_local i32 @cmpxchg_i32_aligned_release_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
623 ; CHECK-LABEL: cmpxchg_i32_aligned_release_seq_cst_weak:
624 ; CHECK: bl __aarch64_cas4_acq_rel
625 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release seq_cst, align 4
626 %r = extractvalue { i32, i1 } %pair, 0
630 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_monotonic(i32 %expected, i32 %new, ptr %ptr) {
631 ; CHECK-LABEL: cmpxchg_i32_aligned_acq_rel_monotonic:
632 ; CHECK: bl __aarch64_cas4_acq_rel
633 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 4
634 %r = extractvalue { i32, i1 } %pair, 0
638 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
639 ; CHECK-LABEL: cmpxchg_i32_aligned_acq_rel_monotonic_weak:
640 ; CHECK: bl __aarch64_cas4_acq_rel
641 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 4
642 %r = extractvalue { i32, i1 } %pair, 0
646 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_acquire(i32 %expected, i32 %new, ptr %ptr) {
647 ; CHECK-LABEL: cmpxchg_i32_aligned_acq_rel_acquire:
648 ; CHECK: bl __aarch64_cas4_acq_rel
649 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 4
650 %r = extractvalue { i32, i1 } %pair, 0
654 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
655 ; CHECK-LABEL: cmpxchg_i32_aligned_acq_rel_acquire_weak:
656 ; CHECK: bl __aarch64_cas4_acq_rel
657 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 4
658 %r = extractvalue { i32, i1 } %pair, 0
662 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
663 ; CHECK-LABEL: cmpxchg_i32_aligned_acq_rel_seq_cst:
664 ; CHECK: bl __aarch64_cas4_acq_rel
665 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 4
666 %r = extractvalue { i32, i1 } %pair, 0
670 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
671 ; CHECK-LABEL: cmpxchg_i32_aligned_acq_rel_seq_cst_weak:
672 ; CHECK: bl __aarch64_cas4_acq_rel
673 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 4
674 %r = extractvalue { i32, i1 } %pair, 0
678 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_monotonic(i32 %expected, i32 %new, ptr %ptr) {
679 ; CHECK-LABEL: cmpxchg_i32_aligned_seq_cst_monotonic:
680 ; CHECK: bl __aarch64_cas4_acq_rel
681 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 4
682 %r = extractvalue { i32, i1 } %pair, 0
686 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
687 ; CHECK-LABEL: cmpxchg_i32_aligned_seq_cst_monotonic_weak:
688 ; CHECK: bl __aarch64_cas4_acq_rel
689 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 4
690 %r = extractvalue { i32, i1 } %pair, 0
694 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_acquire(i32 %expected, i32 %new, ptr %ptr) {
695 ; CHECK-LABEL: cmpxchg_i32_aligned_seq_cst_acquire:
696 ; CHECK: bl __aarch64_cas4_acq_rel
697 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 4
698 %r = extractvalue { i32, i1 } %pair, 0
702 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
703 ; CHECK-LABEL: cmpxchg_i32_aligned_seq_cst_acquire_weak:
704 ; CHECK: bl __aarch64_cas4_acq_rel
705 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 4
706 %r = extractvalue { i32, i1 } %pair, 0
710 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
711 ; CHECK-LABEL: cmpxchg_i32_aligned_seq_cst_seq_cst:
712 ; CHECK: bl __aarch64_cas4_acq_rel
713 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 4
714 %r = extractvalue { i32, i1 } %pair, 0
718 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
719 ; CHECK-LABEL: cmpxchg_i32_aligned_seq_cst_seq_cst_weak:
720 ; CHECK: bl __aarch64_cas4_acq_rel
721 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 4
722 %r = extractvalue { i32, i1 } %pair, 0
726 define dso_local i64 @cmpxchg_i64_aligned_monotonic_monotonic(i64 %expected, i64 %new, ptr %ptr) {
727 ; CHECK-LABEL: cmpxchg_i64_aligned_monotonic_monotonic:
728 ; CHECK: bl __aarch64_cas8_relax
729 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 8
730 %r = extractvalue { i64, i1 } %pair, 0
734 define dso_local i64 @cmpxchg_i64_aligned_monotonic_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
735 ; CHECK-LABEL: cmpxchg_i64_aligned_monotonic_monotonic_weak:
736 ; CHECK: bl __aarch64_cas8_relax
737 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 8
738 %r = extractvalue { i64, i1 } %pair, 0
742 define dso_local i64 @cmpxchg_i64_aligned_monotonic_acquire(i64 %expected, i64 %new, ptr %ptr) {
743 ; CHECK-LABEL: cmpxchg_i64_aligned_monotonic_acquire:
744 ; CHECK: bl __aarch64_cas8_acq
745 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 8
746 %r = extractvalue { i64, i1 } %pair, 0
750 define dso_local i64 @cmpxchg_i64_aligned_monotonic_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
751 ; CHECK-LABEL: cmpxchg_i64_aligned_monotonic_acquire_weak:
752 ; CHECK: bl __aarch64_cas8_acq
753 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 8
754 %r = extractvalue { i64, i1 } %pair, 0
758 define dso_local i64 @cmpxchg_i64_aligned_monotonic_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
759 ; CHECK-LABEL: cmpxchg_i64_aligned_monotonic_seq_cst:
760 ; CHECK: bl __aarch64_cas8_acq_rel
761 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 8
762 %r = extractvalue { i64, i1 } %pair, 0
766 define dso_local i64 @cmpxchg_i64_aligned_monotonic_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
767 ; CHECK-LABEL: cmpxchg_i64_aligned_monotonic_seq_cst_weak:
768 ; CHECK: bl __aarch64_cas8_acq_rel
769 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 8
770 %r = extractvalue { i64, i1 } %pair, 0
774 define dso_local i64 @cmpxchg_i64_aligned_acquire_monotonic(i64 %expected, i64 %new, ptr %ptr) {
775 ; CHECK-LABEL: cmpxchg_i64_aligned_acquire_monotonic:
776 ; CHECK: bl __aarch64_cas8_acq
777 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 8
778 %r = extractvalue { i64, i1 } %pair, 0
782 define dso_local i64 @cmpxchg_i64_aligned_acquire_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
783 ; CHECK-LABEL: cmpxchg_i64_aligned_acquire_monotonic_weak:
784 ; CHECK: bl __aarch64_cas8_acq
785 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 8
786 %r = extractvalue { i64, i1 } %pair, 0
790 define dso_local i64 @cmpxchg_i64_aligned_acquire_acquire(i64 %expected, i64 %new, ptr %ptr) {
791 ; CHECK-LABEL: cmpxchg_i64_aligned_acquire_acquire:
792 ; CHECK: bl __aarch64_cas8_acq
793 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire acquire, align 8
794 %r = extractvalue { i64, i1 } %pair, 0
798 define dso_local i64 @cmpxchg_i64_aligned_acquire_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
799 ; CHECK-LABEL: cmpxchg_i64_aligned_acquire_acquire_weak:
800 ; CHECK: bl __aarch64_cas8_acq
801 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire acquire, align 8
802 %r = extractvalue { i64, i1 } %pair, 0
806 define dso_local i64 @cmpxchg_i64_aligned_acquire_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
807 ; CHECK-LABEL: cmpxchg_i64_aligned_acquire_seq_cst:
808 ; CHECK: bl __aarch64_cas8_acq_rel
809 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 8
810 %r = extractvalue { i64, i1 } %pair, 0
814 define dso_local i64 @cmpxchg_i64_aligned_acquire_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
815 ; CHECK-LABEL: cmpxchg_i64_aligned_acquire_seq_cst_weak:
816 ; CHECK: bl __aarch64_cas8_acq_rel
817 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 8
818 %r = extractvalue { i64, i1 } %pair, 0
822 define dso_local i64 @cmpxchg_i64_aligned_release_monotonic(i64 %expected, i64 %new, ptr %ptr) {
823 ; CHECK-LABEL: cmpxchg_i64_aligned_release_monotonic:
824 ; CHECK: bl __aarch64_cas8_rel
825 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release monotonic, align 8
826 %r = extractvalue { i64, i1 } %pair, 0
830 define dso_local i64 @cmpxchg_i64_aligned_release_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
831 ; CHECK-LABEL: cmpxchg_i64_aligned_release_monotonic_weak:
832 ; CHECK: bl __aarch64_cas8_rel
833 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release monotonic, align 8
834 %r = extractvalue { i64, i1 } %pair, 0
838 define dso_local i64 @cmpxchg_i64_aligned_release_acquire(i64 %expected, i64 %new, ptr %ptr) {
839 ; CHECK-LABEL: cmpxchg_i64_aligned_release_acquire:
840 ; CHECK: bl __aarch64_cas8_acq_rel
841 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release acquire, align 8
842 %r = extractvalue { i64, i1 } %pair, 0
846 define dso_local i64 @cmpxchg_i64_aligned_release_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
847 ; CHECK-LABEL: cmpxchg_i64_aligned_release_acquire_weak:
848 ; CHECK: bl __aarch64_cas8_acq_rel
849 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release acquire, align 8
850 %r = extractvalue { i64, i1 } %pair, 0
854 define dso_local i64 @cmpxchg_i64_aligned_release_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
855 ; CHECK-LABEL: cmpxchg_i64_aligned_release_seq_cst:
856 ; CHECK: bl __aarch64_cas8_acq_rel
857 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release seq_cst, align 8
858 %r = extractvalue { i64, i1 } %pair, 0
862 define dso_local i64 @cmpxchg_i64_aligned_release_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
863 ; CHECK-LABEL: cmpxchg_i64_aligned_release_seq_cst_weak:
864 ; CHECK: bl __aarch64_cas8_acq_rel
865 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release seq_cst, align 8
866 %r = extractvalue { i64, i1 } %pair, 0
870 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_monotonic(i64 %expected, i64 %new, ptr %ptr) {
871 ; CHECK-LABEL: cmpxchg_i64_aligned_acq_rel_monotonic:
872 ; CHECK: bl __aarch64_cas8_acq_rel
873 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 8
874 %r = extractvalue { i64, i1 } %pair, 0
878 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
879 ; CHECK-LABEL: cmpxchg_i64_aligned_acq_rel_monotonic_weak:
880 ; CHECK: bl __aarch64_cas8_acq_rel
881 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 8
882 %r = extractvalue { i64, i1 } %pair, 0
886 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_acquire(i64 %expected, i64 %new, ptr %ptr) {
887 ; CHECK-LABEL: cmpxchg_i64_aligned_acq_rel_acquire:
888 ; CHECK: bl __aarch64_cas8_acq_rel
889 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 8
890 %r = extractvalue { i64, i1 } %pair, 0
894 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
895 ; CHECK-LABEL: cmpxchg_i64_aligned_acq_rel_acquire_weak:
896 ; CHECK: bl __aarch64_cas8_acq_rel
897 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 8
898 %r = extractvalue { i64, i1 } %pair, 0
902 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
903 ; CHECK-LABEL: cmpxchg_i64_aligned_acq_rel_seq_cst:
904 ; CHECK: bl __aarch64_cas8_acq_rel
905 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 8
906 %r = extractvalue { i64, i1 } %pair, 0
910 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
911 ; CHECK-LABEL: cmpxchg_i64_aligned_acq_rel_seq_cst_weak:
912 ; CHECK: bl __aarch64_cas8_acq_rel
913 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 8
914 %r = extractvalue { i64, i1 } %pair, 0
918 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_monotonic(i64 %expected, i64 %new, ptr %ptr) {
919 ; CHECK-LABEL: cmpxchg_i64_aligned_seq_cst_monotonic:
920 ; CHECK: bl __aarch64_cas8_acq_rel
921 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 8
922 %r = extractvalue { i64, i1 } %pair, 0
926 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
927 ; CHECK-LABEL: cmpxchg_i64_aligned_seq_cst_monotonic_weak:
928 ; CHECK: bl __aarch64_cas8_acq_rel
929 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 8
930 %r = extractvalue { i64, i1 } %pair, 0
934 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_acquire(i64 %expected, i64 %new, ptr %ptr) {
935 ; CHECK-LABEL: cmpxchg_i64_aligned_seq_cst_acquire:
936 ; CHECK: bl __aarch64_cas8_acq_rel
937 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 8
938 %r = extractvalue { i64, i1 } %pair, 0
942 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
943 ; CHECK-LABEL: cmpxchg_i64_aligned_seq_cst_acquire_weak:
944 ; CHECK: bl __aarch64_cas8_acq_rel
945 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 8
946 %r = extractvalue { i64, i1 } %pair, 0
950 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
951 ; CHECK-LABEL: cmpxchg_i64_aligned_seq_cst_seq_cst:
952 ; CHECK: bl __aarch64_cas8_acq_rel
953 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 8
954 %r = extractvalue { i64, i1 } %pair, 0
958 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
959 ; CHECK-LABEL: cmpxchg_i64_aligned_seq_cst_seq_cst_weak:
960 ; CHECK: bl __aarch64_cas8_acq_rel
961 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 8
962 %r = extractvalue { i64, i1 } %pair, 0
966 define dso_local i128 @cmpxchg_i128_aligned_monotonic_monotonic(i128 %expected, i128 %new, ptr %ptr) {
967 ; CHECK-LABEL: cmpxchg_i128_aligned_monotonic_monotonic:
968 ; CHECK: bl __aarch64_cas16_relax
969 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 16
970 %r = extractvalue { i128, i1 } %pair, 0
974 define dso_local i128 @cmpxchg_i128_aligned_monotonic_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
975 ; CHECK-LABEL: cmpxchg_i128_aligned_monotonic_monotonic_weak:
976 ; CHECK: bl __aarch64_cas16_relax
977 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 16
978 %r = extractvalue { i128, i1 } %pair, 0
982 define dso_local i128 @cmpxchg_i128_aligned_monotonic_acquire(i128 %expected, i128 %new, ptr %ptr) {
983 ; CHECK-LABEL: cmpxchg_i128_aligned_monotonic_acquire:
984 ; CHECK: bl __aarch64_cas16_acq
985 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 16
986 %r = extractvalue { i128, i1 } %pair, 0
990 define dso_local i128 @cmpxchg_i128_aligned_monotonic_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
991 ; CHECK-LABEL: cmpxchg_i128_aligned_monotonic_acquire_weak:
992 ; CHECK: bl __aarch64_cas16_acq
993 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 16
994 %r = extractvalue { i128, i1 } %pair, 0
998 define dso_local i128 @cmpxchg_i128_aligned_monotonic_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
999 ; CHECK-LABEL: cmpxchg_i128_aligned_monotonic_seq_cst:
1000 ; CHECK: bl __aarch64_cas16_acq_rel
1001 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 16
1002 %r = extractvalue { i128, i1 } %pair, 0
1006 define dso_local i128 @cmpxchg_i128_aligned_monotonic_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
1007 ; CHECK-LABEL: cmpxchg_i128_aligned_monotonic_seq_cst_weak:
1008 ; CHECK: bl __aarch64_cas16_acq_rel
1009 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 16
1010 %r = extractvalue { i128, i1 } %pair, 0
1014 define dso_local i128 @cmpxchg_i128_aligned_acquire_monotonic(i128 %expected, i128 %new, ptr %ptr) {
1015 ; CHECK-LABEL: cmpxchg_i128_aligned_acquire_monotonic:
1016 ; CHECK: bl __aarch64_cas16_acq
1017 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 16
1018 %r = extractvalue { i128, i1 } %pair, 0
1022 define dso_local i128 @cmpxchg_i128_aligned_acquire_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
1023 ; CHECK-LABEL: cmpxchg_i128_aligned_acquire_monotonic_weak:
1024 ; CHECK: bl __aarch64_cas16_acq
1025 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 16
1026 %r = extractvalue { i128, i1 } %pair, 0
1030 define dso_local i128 @cmpxchg_i128_aligned_acquire_acquire(i128 %expected, i128 %new, ptr %ptr) {
1031 ; CHECK-LABEL: cmpxchg_i128_aligned_acquire_acquire:
1032 ; CHECK: bl __aarch64_cas16_acq
1033 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire acquire, align 16
1034 %r = extractvalue { i128, i1 } %pair, 0
1038 define dso_local i128 @cmpxchg_i128_aligned_acquire_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
1039 ; CHECK-LABEL: cmpxchg_i128_aligned_acquire_acquire_weak:
1040 ; CHECK: bl __aarch64_cas16_acq
1041 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire acquire, align 16
1042 %r = extractvalue { i128, i1 } %pair, 0
1046 define dso_local i128 @cmpxchg_i128_aligned_acquire_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
1047 ; CHECK-LABEL: cmpxchg_i128_aligned_acquire_seq_cst:
1048 ; CHECK: bl __aarch64_cas16_acq_rel
1049 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 16
1050 %r = extractvalue { i128, i1 } %pair, 0
1054 define dso_local i128 @cmpxchg_i128_aligned_acquire_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
1055 ; CHECK-LABEL: cmpxchg_i128_aligned_acquire_seq_cst_weak:
1056 ; CHECK: bl __aarch64_cas16_acq_rel
1057 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 16
1058 %r = extractvalue { i128, i1 } %pair, 0
1062 define dso_local i128 @cmpxchg_i128_aligned_release_monotonic(i128 %expected, i128 %new, ptr %ptr) {
1063 ; CHECK-LABEL: cmpxchg_i128_aligned_release_monotonic:
1064 ; CHECK: bl __aarch64_cas16_rel
1065 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release monotonic, align 16
1066 %r = extractvalue { i128, i1 } %pair, 0
1070 define dso_local i128 @cmpxchg_i128_aligned_release_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
1071 ; CHECK-LABEL: cmpxchg_i128_aligned_release_monotonic_weak:
1072 ; CHECK: bl __aarch64_cas16_rel
1073 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release monotonic, align 16
1074 %r = extractvalue { i128, i1 } %pair, 0
1078 define dso_local i128 @cmpxchg_i128_aligned_release_acquire(i128 %expected, i128 %new, ptr %ptr) {
1079 ; CHECK-LABEL: cmpxchg_i128_aligned_release_acquire:
1080 ; CHECK: bl __aarch64_cas16_acq_rel
1081 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release acquire, align 16
1082 %r = extractvalue { i128, i1 } %pair, 0
1086 define dso_local i128 @cmpxchg_i128_aligned_release_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
1087 ; CHECK-LABEL: cmpxchg_i128_aligned_release_acquire_weak:
1088 ; CHECK: bl __aarch64_cas16_acq_rel
1089 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release acquire, align 16
1090 %r = extractvalue { i128, i1 } %pair, 0
1094 define dso_local i128 @cmpxchg_i128_aligned_release_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
1095 ; CHECK-LABEL: cmpxchg_i128_aligned_release_seq_cst:
1096 ; CHECK: bl __aarch64_cas16_acq_rel
1097 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release seq_cst, align 16
1098 %r = extractvalue { i128, i1 } %pair, 0
1102 define dso_local i128 @cmpxchg_i128_aligned_release_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
1103 ; CHECK-LABEL: cmpxchg_i128_aligned_release_seq_cst_weak:
1104 ; CHECK: bl __aarch64_cas16_acq_rel
1105 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release seq_cst, align 16
1106 %r = extractvalue { i128, i1 } %pair, 0
1110 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_monotonic(i128 %expected, i128 %new, ptr %ptr) {
1111 ; CHECK-LABEL: cmpxchg_i128_aligned_acq_rel_monotonic:
1112 ; CHECK: bl __aarch64_cas16_acq_rel
1113 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 16
1114 %r = extractvalue { i128, i1 } %pair, 0
1118 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
1119 ; CHECK-LABEL: cmpxchg_i128_aligned_acq_rel_monotonic_weak:
1120 ; CHECK: bl __aarch64_cas16_acq_rel
1121 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 16
1122 %r = extractvalue { i128, i1 } %pair, 0
1126 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_acquire(i128 %expected, i128 %new, ptr %ptr) {
1127 ; CHECK-LABEL: cmpxchg_i128_aligned_acq_rel_acquire:
1128 ; CHECK: bl __aarch64_cas16_acq_rel
1129 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 16
1130 %r = extractvalue { i128, i1 } %pair, 0
1134 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
1135 ; CHECK-LABEL: cmpxchg_i128_aligned_acq_rel_acquire_weak:
1136 ; CHECK: bl __aarch64_cas16_acq_rel
1137 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 16
1138 %r = extractvalue { i128, i1 } %pair, 0
1142 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
1143 ; CHECK-LABEL: cmpxchg_i128_aligned_acq_rel_seq_cst:
1144 ; CHECK: bl __aarch64_cas16_acq_rel
1145 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 16
1146 %r = extractvalue { i128, i1 } %pair, 0
1150 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
1151 ; CHECK-LABEL: cmpxchg_i128_aligned_acq_rel_seq_cst_weak:
1152 ; CHECK: bl __aarch64_cas16_acq_rel
1153 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 16
1154 %r = extractvalue { i128, i1 } %pair, 0
1158 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_monotonic(i128 %expected, i128 %new, ptr %ptr) {
1159 ; CHECK-LABEL: cmpxchg_i128_aligned_seq_cst_monotonic:
1160 ; CHECK: bl __aarch64_cas16_acq_rel
1161 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 16
1162 %r = extractvalue { i128, i1 } %pair, 0
1166 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
1167 ; CHECK-LABEL: cmpxchg_i128_aligned_seq_cst_monotonic_weak:
1168 ; CHECK: bl __aarch64_cas16_acq_rel
1169 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 16
1170 %r = extractvalue { i128, i1 } %pair, 0
1174 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_acquire(i128 %expected, i128 %new, ptr %ptr) {
1175 ; CHECK-LABEL: cmpxchg_i128_aligned_seq_cst_acquire:
1176 ; CHECK: bl __aarch64_cas16_acq_rel
1177 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 16
1178 %r = extractvalue { i128, i1 } %pair, 0
1182 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
1183 ; CHECK-LABEL: cmpxchg_i128_aligned_seq_cst_acquire_weak:
1184 ; CHECK: bl __aarch64_cas16_acq_rel
1185 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 16
1186 %r = extractvalue { i128, i1 } %pair, 0
1190 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
1191 ; CHECK-LABEL: cmpxchg_i128_aligned_seq_cst_seq_cst:
1192 ; CHECK: bl __aarch64_cas16_acq_rel
1193 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 16
1194 %r = extractvalue { i128, i1 } %pair, 0
1198 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
1199 ; CHECK-LABEL: cmpxchg_i128_aligned_seq_cst_seq_cst_weak:
1200 ; CHECK: bl __aarch64_cas16_acq_rel
1201 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 16
1202 %r = extractvalue { i128, i1 } %pair, 0
1206 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_monotonic(i8 %expected, i8 %new, ptr %ptr) {
1207 ; CHECK-LABEL: cmpxchg_i8_unaligned_monotonic_monotonic:
1208 ; CHECK: bl __aarch64_cas1_relax
1209 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
1210 %r = extractvalue { i8, i1 } %pair, 0
1214 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
1215 ; CHECK-LABEL: cmpxchg_i8_unaligned_monotonic_monotonic_weak:
1216 ; CHECK: bl __aarch64_cas1_relax
1217 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
1218 %r = extractvalue { i8, i1 } %pair, 0
1222 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_acquire(i8 %expected, i8 %new, ptr %ptr) {
1223 ; CHECK-LABEL: cmpxchg_i8_unaligned_monotonic_acquire:
1224 ; CHECK: bl __aarch64_cas1_acq
1225 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
1226 %r = extractvalue { i8, i1 } %pair, 0
1230 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
1231 ; CHECK-LABEL: cmpxchg_i8_unaligned_monotonic_acquire_weak:
1232 ; CHECK: bl __aarch64_cas1_acq
1233 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
1234 %r = extractvalue { i8, i1 } %pair, 0
1238 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
1239 ; CHECK-LABEL: cmpxchg_i8_unaligned_monotonic_seq_cst:
1240 ; CHECK: bl __aarch64_cas1_acq_rel
1241 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
1242 %r = extractvalue { i8, i1 } %pair, 0
1246 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
1247 ; CHECK-LABEL: cmpxchg_i8_unaligned_monotonic_seq_cst_weak:
1248 ; CHECK: bl __aarch64_cas1_acq_rel
1249 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
1250 %r = extractvalue { i8, i1 } %pair, 0
1254 define dso_local i8 @cmpxchg_i8_unaligned_acquire_monotonic(i8 %expected, i8 %new, ptr %ptr) {
1255 ; CHECK-LABEL: cmpxchg_i8_unaligned_acquire_monotonic:
1256 ; CHECK: bl __aarch64_cas1_acq
1257 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
1258 %r = extractvalue { i8, i1 } %pair, 0
1262 define dso_local i8 @cmpxchg_i8_unaligned_acquire_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
1263 ; CHECK-LABEL: cmpxchg_i8_unaligned_acquire_monotonic_weak:
1264 ; CHECK: bl __aarch64_cas1_acq
1265 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
1266 %r = extractvalue { i8, i1 } %pair, 0
1270 define dso_local i8 @cmpxchg_i8_unaligned_acquire_acquire(i8 %expected, i8 %new, ptr %ptr) {
1271 ; CHECK-LABEL: cmpxchg_i8_unaligned_acquire_acquire:
1272 ; CHECK: bl __aarch64_cas1_acq
1273 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
1274 %r = extractvalue { i8, i1 } %pair, 0
1278 define dso_local i8 @cmpxchg_i8_unaligned_acquire_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
1279 ; CHECK-LABEL: cmpxchg_i8_unaligned_acquire_acquire_weak:
1280 ; CHECK: bl __aarch64_cas1_acq
1281 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
1282 %r = extractvalue { i8, i1 } %pair, 0
1286 define dso_local i8 @cmpxchg_i8_unaligned_acquire_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
1287 ; CHECK-LABEL: cmpxchg_i8_unaligned_acquire_seq_cst:
1288 ; CHECK: bl __aarch64_cas1_acq_rel
1289 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
1290 %r = extractvalue { i8, i1 } %pair, 0
1294 define dso_local i8 @cmpxchg_i8_unaligned_acquire_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
1295 ; CHECK-LABEL: cmpxchg_i8_unaligned_acquire_seq_cst_weak:
1296 ; CHECK: bl __aarch64_cas1_acq_rel
1297 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
1298 %r = extractvalue { i8, i1 } %pair, 0
1302 define dso_local i8 @cmpxchg_i8_unaligned_release_monotonic(i8 %expected, i8 %new, ptr %ptr) {
1303 ; CHECK-LABEL: cmpxchg_i8_unaligned_release_monotonic:
1304 ; CHECK: bl __aarch64_cas1_rel
1305 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
1306 %r = extractvalue { i8, i1 } %pair, 0
1310 define dso_local i8 @cmpxchg_i8_unaligned_release_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
1311 ; CHECK-LABEL: cmpxchg_i8_unaligned_release_monotonic_weak:
1312 ; CHECK: bl __aarch64_cas1_rel
1313 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
1314 %r = extractvalue { i8, i1 } %pair, 0
1318 define dso_local i8 @cmpxchg_i8_unaligned_release_acquire(i8 %expected, i8 %new, ptr %ptr) {
1319 ; CHECK-LABEL: cmpxchg_i8_unaligned_release_acquire:
1320 ; CHECK: bl __aarch64_cas1_acq_rel
1321 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release acquire, align 1
1322 %r = extractvalue { i8, i1 } %pair, 0
1326 define dso_local i8 @cmpxchg_i8_unaligned_release_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
1327 ; CHECK-LABEL: cmpxchg_i8_unaligned_release_acquire_weak:
1328 ; CHECK: bl __aarch64_cas1_acq_rel
1329 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release acquire, align 1
1330 %r = extractvalue { i8, i1 } %pair, 0
1334 define dso_local i8 @cmpxchg_i8_unaligned_release_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
1335 ; CHECK-LABEL: cmpxchg_i8_unaligned_release_seq_cst:
1336 ; CHECK: bl __aarch64_cas1_acq_rel
1337 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
1338 %r = extractvalue { i8, i1 } %pair, 0
1342 define dso_local i8 @cmpxchg_i8_unaligned_release_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
1343 ; CHECK-LABEL: cmpxchg_i8_unaligned_release_seq_cst_weak:
1344 ; CHECK: bl __aarch64_cas1_acq_rel
1345 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
1346 %r = extractvalue { i8, i1 } %pair, 0
1350 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_monotonic(i8 %expected, i8 %new, ptr %ptr) {
1351 ; CHECK-LABEL: cmpxchg_i8_unaligned_acq_rel_monotonic:
1352 ; CHECK: bl __aarch64_cas1_acq_rel
1353 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
1354 %r = extractvalue { i8, i1 } %pair, 0
1358 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
1359 ; CHECK-LABEL: cmpxchg_i8_unaligned_acq_rel_monotonic_weak:
1360 ; CHECK: bl __aarch64_cas1_acq_rel
1361 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
1362 %r = extractvalue { i8, i1 } %pair, 0
1366 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_acquire(i8 %expected, i8 %new, ptr %ptr) {
1367 ; CHECK-LABEL: cmpxchg_i8_unaligned_acq_rel_acquire:
1368 ; CHECK: bl __aarch64_cas1_acq_rel
1369 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
1370 %r = extractvalue { i8, i1 } %pair, 0
1374 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
1375 ; CHECK-LABEL: cmpxchg_i8_unaligned_acq_rel_acquire_weak:
1376 ; CHECK: bl __aarch64_cas1_acq_rel
1377 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
1378 %r = extractvalue { i8, i1 } %pair, 0
1382 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
1383 ; CHECK-LABEL: cmpxchg_i8_unaligned_acq_rel_seq_cst:
1384 ; CHECK: bl __aarch64_cas1_acq_rel
1385 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
1386 %r = extractvalue { i8, i1 } %pair, 0
1390 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
1391 ; CHECK-LABEL: cmpxchg_i8_unaligned_acq_rel_seq_cst_weak:
1392 ; CHECK: bl __aarch64_cas1_acq_rel
1393 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
1394 %r = extractvalue { i8, i1 } %pair, 0
1398 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_monotonic(i8 %expected, i8 %new, ptr %ptr) {
1399 ; CHECK-LABEL: cmpxchg_i8_unaligned_seq_cst_monotonic:
1400 ; CHECK: bl __aarch64_cas1_acq_rel
1401 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
1402 %r = extractvalue { i8, i1 } %pair, 0
1406 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
1407 ; CHECK-LABEL: cmpxchg_i8_unaligned_seq_cst_monotonic_weak:
1408 ; CHECK: bl __aarch64_cas1_acq_rel
1409 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
1410 %r = extractvalue { i8, i1 } %pair, 0
1414 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_acquire(i8 %expected, i8 %new, ptr %ptr) {
1415 ; CHECK-LABEL: cmpxchg_i8_unaligned_seq_cst_acquire:
1416 ; CHECK: bl __aarch64_cas1_acq_rel
1417 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
1418 %r = extractvalue { i8, i1 } %pair, 0
1422 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
1423 ; CHECK-LABEL: cmpxchg_i8_unaligned_seq_cst_acquire_weak:
1424 ; CHECK: bl __aarch64_cas1_acq_rel
1425 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
1426 %r = extractvalue { i8, i1 } %pair, 0
1430 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
1431 ; CHECK-LABEL: cmpxchg_i8_unaligned_seq_cst_seq_cst:
1432 ; CHECK: bl __aarch64_cas1_acq_rel
1433 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
1434 %r = extractvalue { i8, i1 } %pair, 0
1438 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
1439 ; CHECK-LABEL: cmpxchg_i8_unaligned_seq_cst_seq_cst_weak:
1440 ; CHECK: bl __aarch64_cas1_acq_rel
1441 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
1442 %r = extractvalue { i8, i1 } %pair, 0
1446 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_monotonic(i16 %expected, i16 %new, ptr %ptr) {
1447 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_monotonic:
1448 ; CHECK: bl __atomic_compare_exchange
1449 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 1
1450 %r = extractvalue { i16, i1 } %pair, 0
1454 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
1455 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_monotonic_weak:
1456 ; CHECK: bl __atomic_compare_exchange
1457 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 1
1458 %r = extractvalue { i16, i1 } %pair, 0
1462 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_acquire(i16 %expected, i16 %new, ptr %ptr) {
1463 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_acquire:
1464 ; CHECK: bl __atomic_compare_exchange
1465 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 1
1466 %r = extractvalue { i16, i1 } %pair, 0
1470 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
1471 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_acquire_weak:
1472 ; CHECK: bl __atomic_compare_exchange
1473 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 1
1474 %r = extractvalue { i16, i1 } %pair, 0
1478 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
1479 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_seq_cst:
1480 ; CHECK: bl __atomic_compare_exchange
1481 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 1
1482 %r = extractvalue { i16, i1 } %pair, 0
1486 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
1487 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_seq_cst_weak:
1488 ; CHECK: bl __atomic_compare_exchange
1489 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 1
1490 %r = extractvalue { i16, i1 } %pair, 0
1494 define dso_local i16 @cmpxchg_i16_unaligned_acquire_monotonic(i16 %expected, i16 %new, ptr %ptr) {
1495 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_monotonic:
1496 ; CHECK: bl __atomic_compare_exchange
1497 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 1
1498 %r = extractvalue { i16, i1 } %pair, 0
1502 define dso_local i16 @cmpxchg_i16_unaligned_acquire_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
1503 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_monotonic_weak:
1504 ; CHECK: bl __atomic_compare_exchange
1505 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 1
1506 %r = extractvalue { i16, i1 } %pair, 0
1510 define dso_local i16 @cmpxchg_i16_unaligned_acquire_acquire(i16 %expected, i16 %new, ptr %ptr) {
1511 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_acquire:
1512 ; CHECK: bl __atomic_compare_exchange
1513 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire acquire, align 1
1514 %r = extractvalue { i16, i1 } %pair, 0
1518 define dso_local i16 @cmpxchg_i16_unaligned_acquire_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
1519 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_acquire_weak:
1520 ; CHECK: bl __atomic_compare_exchange
1521 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire acquire, align 1
1522 %r = extractvalue { i16, i1 } %pair, 0
1526 define dso_local i16 @cmpxchg_i16_unaligned_acquire_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
1527 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_seq_cst:
1528 ; CHECK: bl __atomic_compare_exchange
1529 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 1
1530 %r = extractvalue { i16, i1 } %pair, 0
1534 define dso_local i16 @cmpxchg_i16_unaligned_acquire_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
1535 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_seq_cst_weak:
1536 ; CHECK: bl __atomic_compare_exchange
1537 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 1
1538 %r = extractvalue { i16, i1 } %pair, 0
1542 define dso_local i16 @cmpxchg_i16_unaligned_release_monotonic(i16 %expected, i16 %new, ptr %ptr) {
1543 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_monotonic:
1544 ; CHECK: bl __atomic_compare_exchange
1545 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release monotonic, align 1
1546 %r = extractvalue { i16, i1 } %pair, 0
1550 define dso_local i16 @cmpxchg_i16_unaligned_release_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
1551 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_monotonic_weak:
1552 ; CHECK: bl __atomic_compare_exchange
1553 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release monotonic, align 1
1554 %r = extractvalue { i16, i1 } %pair, 0
1558 define dso_local i16 @cmpxchg_i16_unaligned_release_acquire(i16 %expected, i16 %new, ptr %ptr) {
1559 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_acquire:
1560 ; CHECK: bl __atomic_compare_exchange
1561 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release acquire, align 1
1562 %r = extractvalue { i16, i1 } %pair, 0
1566 define dso_local i16 @cmpxchg_i16_unaligned_release_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
1567 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_acquire_weak:
1568 ; CHECK: bl __atomic_compare_exchange
1569 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release acquire, align 1
1570 %r = extractvalue { i16, i1 } %pair, 0
1574 define dso_local i16 @cmpxchg_i16_unaligned_release_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
1575 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_seq_cst:
1576 ; CHECK: bl __atomic_compare_exchange
1577 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release seq_cst, align 1
1578 %r = extractvalue { i16, i1 } %pair, 0
1582 define dso_local i16 @cmpxchg_i16_unaligned_release_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
1583 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_seq_cst_weak:
1584 ; CHECK: bl __atomic_compare_exchange
1585 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release seq_cst, align 1
1586 %r = extractvalue { i16, i1 } %pair, 0
1590 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_monotonic(i16 %expected, i16 %new, ptr %ptr) {
1591 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_monotonic:
1592 ; CHECK: bl __atomic_compare_exchange
1593 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 1
1594 %r = extractvalue { i16, i1 } %pair, 0
1598 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
1599 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_monotonic_weak:
1600 ; CHECK: bl __atomic_compare_exchange
1601 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 1
1602 %r = extractvalue { i16, i1 } %pair, 0
1606 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_acquire(i16 %expected, i16 %new, ptr %ptr) {
1607 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_acquire:
1608 ; CHECK: bl __atomic_compare_exchange
1609 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 1
1610 %r = extractvalue { i16, i1 } %pair, 0
1614 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
1615 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_acquire_weak:
1616 ; CHECK: bl __atomic_compare_exchange
1617 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 1
1618 %r = extractvalue { i16, i1 } %pair, 0
1622 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
1623 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_seq_cst:
1624 ; CHECK: bl __atomic_compare_exchange
1625 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 1
1626 %r = extractvalue { i16, i1 } %pair, 0
1630 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
1631 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_seq_cst_weak:
1632 ; CHECK: bl __atomic_compare_exchange
1633 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 1
1634 %r = extractvalue { i16, i1 } %pair, 0
1638 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_monotonic(i16 %expected, i16 %new, ptr %ptr) {
1639 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_monotonic:
1640 ; CHECK: bl __atomic_compare_exchange
1641 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 1
1642 %r = extractvalue { i16, i1 } %pair, 0
1646 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
1647 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_monotonic_weak:
1648 ; CHECK: bl __atomic_compare_exchange
1649 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 1
1650 %r = extractvalue { i16, i1 } %pair, 0
1654 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_acquire(i16 %expected, i16 %new, ptr %ptr) {
1655 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_acquire:
1656 ; CHECK: bl __atomic_compare_exchange
1657 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 1
1658 %r = extractvalue { i16, i1 } %pair, 0
1662 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
1663 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_acquire_weak:
1664 ; CHECK: bl __atomic_compare_exchange
1665 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 1
1666 %r = extractvalue { i16, i1 } %pair, 0
1670 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
1671 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_seq_cst:
1672 ; CHECK: bl __atomic_compare_exchange
1673 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 1
1674 %r = extractvalue { i16, i1 } %pair, 0
1678 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
1679 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_seq_cst_weak:
1680 ; CHECK: bl __atomic_compare_exchange
1681 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 1
1682 %r = extractvalue { i16, i1 } %pair, 0
1686 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1687 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_monotonic:
1688 ; CHECK: bl __atomic_compare_exchange
1689 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 1
1690 %r = extractvalue { i32, i1 } %pair, 0
1694 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1695 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_monotonic_weak:
1696 ; CHECK: bl __atomic_compare_exchange
1697 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 1
1698 %r = extractvalue { i32, i1 } %pair, 0
1702 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_acquire(i32 %expected, i32 %new, ptr %ptr) {
1703 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_acquire:
1704 ; CHECK: bl __atomic_compare_exchange
1705 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 1
1706 %r = extractvalue { i32, i1 } %pair, 0
1710 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1711 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_acquire_weak:
1712 ; CHECK: bl __atomic_compare_exchange
1713 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 1
1714 %r = extractvalue { i32, i1 } %pair, 0
1718 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1719 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_seq_cst:
1720 ; CHECK: bl __atomic_compare_exchange
1721 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 1
1722 %r = extractvalue { i32, i1 } %pair, 0
1726 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1727 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_seq_cst_weak:
1728 ; CHECK: bl __atomic_compare_exchange
1729 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 1
1730 %r = extractvalue { i32, i1 } %pair, 0
1734 define dso_local i32 @cmpxchg_i32_unaligned_acquire_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1735 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_monotonic:
1736 ; CHECK: bl __atomic_compare_exchange
1737 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 1
1738 %r = extractvalue { i32, i1 } %pair, 0
1742 define dso_local i32 @cmpxchg_i32_unaligned_acquire_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1743 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_monotonic_weak:
1744 ; CHECK: bl __atomic_compare_exchange
1745 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 1
1746 %r = extractvalue { i32, i1 } %pair, 0
1750 define dso_local i32 @cmpxchg_i32_unaligned_acquire_acquire(i32 %expected, i32 %new, ptr %ptr) {
1751 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_acquire:
1752 ; CHECK: bl __atomic_compare_exchange
1753 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire acquire, align 1
1754 %r = extractvalue { i32, i1 } %pair, 0
1758 define dso_local i32 @cmpxchg_i32_unaligned_acquire_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1759 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_acquire_weak:
1760 ; CHECK: bl __atomic_compare_exchange
1761 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire acquire, align 1
1762 %r = extractvalue { i32, i1 } %pair, 0
1766 define dso_local i32 @cmpxchg_i32_unaligned_acquire_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1767 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_seq_cst:
1768 ; CHECK: bl __atomic_compare_exchange
1769 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 1
1770 %r = extractvalue { i32, i1 } %pair, 0
1774 define dso_local i32 @cmpxchg_i32_unaligned_acquire_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1775 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_seq_cst_weak:
1776 ; CHECK: bl __atomic_compare_exchange
1777 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 1
1778 %r = extractvalue { i32, i1 } %pair, 0
1782 define dso_local i32 @cmpxchg_i32_unaligned_release_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1783 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_monotonic:
1784 ; CHECK: bl __atomic_compare_exchange
1785 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release monotonic, align 1
1786 %r = extractvalue { i32, i1 } %pair, 0
1790 define dso_local i32 @cmpxchg_i32_unaligned_release_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1791 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_monotonic_weak:
1792 ; CHECK: bl __atomic_compare_exchange
1793 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release monotonic, align 1
1794 %r = extractvalue { i32, i1 } %pair, 0
1798 define dso_local i32 @cmpxchg_i32_unaligned_release_acquire(i32 %expected, i32 %new, ptr %ptr) {
1799 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_acquire:
1800 ; CHECK: bl __atomic_compare_exchange
1801 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release acquire, align 1
1802 %r = extractvalue { i32, i1 } %pair, 0
1806 define dso_local i32 @cmpxchg_i32_unaligned_release_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1807 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_acquire_weak:
1808 ; CHECK: bl __atomic_compare_exchange
1809 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release acquire, align 1
1810 %r = extractvalue { i32, i1 } %pair, 0
1814 define dso_local i32 @cmpxchg_i32_unaligned_release_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1815 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_seq_cst:
1816 ; CHECK: bl __atomic_compare_exchange
1817 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release seq_cst, align 1
1818 %r = extractvalue { i32, i1 } %pair, 0
1822 define dso_local i32 @cmpxchg_i32_unaligned_release_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1823 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_seq_cst_weak:
1824 ; CHECK: bl __atomic_compare_exchange
1825 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release seq_cst, align 1
1826 %r = extractvalue { i32, i1 } %pair, 0
1830 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1831 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_monotonic:
1832 ; CHECK: bl __atomic_compare_exchange
1833 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 1
1834 %r = extractvalue { i32, i1 } %pair, 0
1838 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1839 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_monotonic_weak:
1840 ; CHECK: bl __atomic_compare_exchange
1841 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 1
1842 %r = extractvalue { i32, i1 } %pair, 0
1846 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_acquire(i32 %expected, i32 %new, ptr %ptr) {
1847 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_acquire:
1848 ; CHECK: bl __atomic_compare_exchange
1849 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 1
1850 %r = extractvalue { i32, i1 } %pair, 0
1854 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1855 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_acquire_weak:
1856 ; CHECK: bl __atomic_compare_exchange
1857 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 1
1858 %r = extractvalue { i32, i1 } %pair, 0
1862 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1863 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_seq_cst:
1864 ; CHECK: bl __atomic_compare_exchange
1865 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 1
1866 %r = extractvalue { i32, i1 } %pair, 0
1870 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1871 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_seq_cst_weak:
1872 ; CHECK: bl __atomic_compare_exchange
1873 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 1
1874 %r = extractvalue { i32, i1 } %pair, 0
1878 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1879 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_monotonic:
1880 ; CHECK: bl __atomic_compare_exchange
1881 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 1
1882 %r = extractvalue { i32, i1 } %pair, 0
1886 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1887 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_monotonic_weak:
1888 ; CHECK: bl __atomic_compare_exchange
1889 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 1
1890 %r = extractvalue { i32, i1 } %pair, 0
1894 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_acquire(i32 %expected, i32 %new, ptr %ptr) {
1895 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_acquire:
1896 ; CHECK: bl __atomic_compare_exchange
1897 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 1
1898 %r = extractvalue { i32, i1 } %pair, 0
1902 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1903 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_acquire_weak:
1904 ; CHECK: bl __atomic_compare_exchange
1905 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 1
1906 %r = extractvalue { i32, i1 } %pair, 0
1910 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1911 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_seq_cst:
1912 ; CHECK: bl __atomic_compare_exchange
1913 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 1
1914 %r = extractvalue { i32, i1 } %pair, 0
1918 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1919 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_seq_cst_weak:
1920 ; CHECK: bl __atomic_compare_exchange
1921 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 1
1922 %r = extractvalue { i32, i1 } %pair, 0
1926 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1927 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_monotonic:
1928 ; CHECK: bl __atomic_compare_exchange
1929 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 1
1930 %r = extractvalue { i64, i1 } %pair, 0
1934 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1935 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_monotonic_weak:
1936 ; CHECK: bl __atomic_compare_exchange
1937 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 1
1938 %r = extractvalue { i64, i1 } %pair, 0
1942 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_acquire(i64 %expected, i64 %new, ptr %ptr) {
1943 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_acquire:
1944 ; CHECK: bl __atomic_compare_exchange
1945 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 1
1946 %r = extractvalue { i64, i1 } %pair, 0
1950 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1951 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_acquire_weak:
1952 ; CHECK: bl __atomic_compare_exchange
1953 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 1
1954 %r = extractvalue { i64, i1 } %pair, 0
1958 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
1959 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_seq_cst:
1960 ; CHECK: bl __atomic_compare_exchange
1961 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 1
1962 %r = extractvalue { i64, i1 } %pair, 0
1966 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
1967 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_seq_cst_weak:
1968 ; CHECK: bl __atomic_compare_exchange
1969 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 1
1970 %r = extractvalue { i64, i1 } %pair, 0
1974 define dso_local i64 @cmpxchg_i64_unaligned_acquire_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1975 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_monotonic:
1976 ; CHECK: bl __atomic_compare_exchange
1977 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 1
1978 %r = extractvalue { i64, i1 } %pair, 0
1982 define dso_local i64 @cmpxchg_i64_unaligned_acquire_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1983 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_monotonic_weak:
1984 ; CHECK: bl __atomic_compare_exchange
1985 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 1
1986 %r = extractvalue { i64, i1 } %pair, 0
1990 define dso_local i64 @cmpxchg_i64_unaligned_acquire_acquire(i64 %expected, i64 %new, ptr %ptr) {
1991 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_acquire:
1992 ; CHECK: bl __atomic_compare_exchange
1993 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire acquire, align 1
1994 %r = extractvalue { i64, i1 } %pair, 0
1998 define dso_local i64 @cmpxchg_i64_unaligned_acquire_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1999 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_acquire_weak:
2000 ; CHECK: bl __atomic_compare_exchange
2001 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire acquire, align 1
2002 %r = extractvalue { i64, i1 } %pair, 0
2006 define dso_local i64 @cmpxchg_i64_unaligned_acquire_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
2007 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_seq_cst:
2008 ; CHECK: bl __atomic_compare_exchange
2009 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 1
2010 %r = extractvalue { i64, i1 } %pair, 0
2014 define dso_local i64 @cmpxchg_i64_unaligned_acquire_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
2015 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_seq_cst_weak:
2016 ; CHECK: bl __atomic_compare_exchange
2017 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 1
2018 %r = extractvalue { i64, i1 } %pair, 0
2022 define dso_local i64 @cmpxchg_i64_unaligned_release_monotonic(i64 %expected, i64 %new, ptr %ptr) {
2023 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_monotonic:
2024 ; CHECK: bl __atomic_compare_exchange
2025 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release monotonic, align 1
2026 %r = extractvalue { i64, i1 } %pair, 0
2030 define dso_local i64 @cmpxchg_i64_unaligned_release_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
2031 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_monotonic_weak:
2032 ; CHECK: bl __atomic_compare_exchange
2033 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release monotonic, align 1
2034 %r = extractvalue { i64, i1 } %pair, 0
2038 define dso_local i64 @cmpxchg_i64_unaligned_release_acquire(i64 %expected, i64 %new, ptr %ptr) {
2039 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_acquire:
2040 ; CHECK: bl __atomic_compare_exchange
2041 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release acquire, align 1
2042 %r = extractvalue { i64, i1 } %pair, 0
2046 define dso_local i64 @cmpxchg_i64_unaligned_release_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
2047 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_acquire_weak:
2048 ; CHECK: bl __atomic_compare_exchange
2049 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release acquire, align 1
2050 %r = extractvalue { i64, i1 } %pair, 0
2054 define dso_local i64 @cmpxchg_i64_unaligned_release_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
2055 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_seq_cst:
2056 ; CHECK: bl __atomic_compare_exchange
2057 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release seq_cst, align 1
2058 %r = extractvalue { i64, i1 } %pair, 0
2062 define dso_local i64 @cmpxchg_i64_unaligned_release_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
2063 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_seq_cst_weak:
2064 ; CHECK: bl __atomic_compare_exchange
2065 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release seq_cst, align 1
2066 %r = extractvalue { i64, i1 } %pair, 0
2070 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_monotonic(i64 %expected, i64 %new, ptr %ptr) {
2071 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_monotonic:
2072 ; CHECK: bl __atomic_compare_exchange
2073 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 1
2074 %r = extractvalue { i64, i1 } %pair, 0
2078 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
2079 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_monotonic_weak:
2080 ; CHECK: bl __atomic_compare_exchange
2081 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 1
2082 %r = extractvalue { i64, i1 } %pair, 0
2086 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_acquire(i64 %expected, i64 %new, ptr %ptr) {
2087 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_acquire:
2088 ; CHECK: bl __atomic_compare_exchange
2089 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 1
2090 %r = extractvalue { i64, i1 } %pair, 0
2094 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
2095 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_acquire_weak:
2096 ; CHECK: bl __atomic_compare_exchange
2097 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 1
2098 %r = extractvalue { i64, i1 } %pair, 0
2102 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
2103 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_seq_cst:
2104 ; CHECK: bl __atomic_compare_exchange
2105 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 1
2106 %r = extractvalue { i64, i1 } %pair, 0
2110 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
2111 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_seq_cst_weak:
2112 ; CHECK: bl __atomic_compare_exchange
2113 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 1
2114 %r = extractvalue { i64, i1 } %pair, 0
2118 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_monotonic(i64 %expected, i64 %new, ptr %ptr) {
2119 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_monotonic:
2120 ; CHECK: bl __atomic_compare_exchange
2121 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 1
2122 %r = extractvalue { i64, i1 } %pair, 0
2126 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
2127 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_monotonic_weak:
2128 ; CHECK: bl __atomic_compare_exchange
2129 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 1
2130 %r = extractvalue { i64, i1 } %pair, 0
2134 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_acquire(i64 %expected, i64 %new, ptr %ptr) {
2135 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_acquire:
2136 ; CHECK: bl __atomic_compare_exchange
2137 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 1
2138 %r = extractvalue { i64, i1 } %pair, 0
2142 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
2143 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_acquire_weak:
2144 ; CHECK: bl __atomic_compare_exchange
2145 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 1
2146 %r = extractvalue { i64, i1 } %pair, 0
2150 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
2151 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_seq_cst:
2152 ; CHECK: bl __atomic_compare_exchange
2153 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 1
2154 %r = extractvalue { i64, i1 } %pair, 0
2158 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
2159 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_seq_cst_weak:
2160 ; CHECK: bl __atomic_compare_exchange
2161 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 1
2162 %r = extractvalue { i64, i1 } %pair, 0
2166 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2167 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_monotonic:
2168 ; CHECK: bl __atomic_compare_exchange
2169 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 1
2170 %r = extractvalue { i128, i1 } %pair, 0
2174 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2175 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_monotonic_weak:
2176 ; CHECK: bl __atomic_compare_exchange
2177 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 1
2178 %r = extractvalue { i128, i1 } %pair, 0
2182 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_acquire(i128 %expected, i128 %new, ptr %ptr) {
2183 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_acquire:
2184 ; CHECK: bl __atomic_compare_exchange
2185 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 1
2186 %r = extractvalue { i128, i1 } %pair, 0
2190 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2191 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_acquire_weak:
2192 ; CHECK: bl __atomic_compare_exchange
2193 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 1
2194 %r = extractvalue { i128, i1 } %pair, 0
2198 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2199 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_seq_cst:
2200 ; CHECK: bl __atomic_compare_exchange
2201 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 1
2202 %r = extractvalue { i128, i1 } %pair, 0
2206 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2207 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_seq_cst_weak:
2208 ; CHECK: bl __atomic_compare_exchange
2209 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 1
2210 %r = extractvalue { i128, i1 } %pair, 0
2214 define dso_local i128 @cmpxchg_i128_unaligned_acquire_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2215 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_monotonic:
2216 ; CHECK: bl __atomic_compare_exchange
2217 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 1
2218 %r = extractvalue { i128, i1 } %pair, 0
2222 define dso_local i128 @cmpxchg_i128_unaligned_acquire_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2223 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_monotonic_weak:
2224 ; CHECK: bl __atomic_compare_exchange
2225 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 1
2226 %r = extractvalue { i128, i1 } %pair, 0
2230 define dso_local i128 @cmpxchg_i128_unaligned_acquire_acquire(i128 %expected, i128 %new, ptr %ptr) {
2231 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_acquire:
2232 ; CHECK: bl __atomic_compare_exchange
2233 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire acquire, align 1
2234 %r = extractvalue { i128, i1 } %pair, 0
2238 define dso_local i128 @cmpxchg_i128_unaligned_acquire_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2239 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_acquire_weak:
2240 ; CHECK: bl __atomic_compare_exchange
2241 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire acquire, align 1
2242 %r = extractvalue { i128, i1 } %pair, 0
2246 define dso_local i128 @cmpxchg_i128_unaligned_acquire_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2247 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_seq_cst:
2248 ; CHECK: bl __atomic_compare_exchange
2249 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 1
2250 %r = extractvalue { i128, i1 } %pair, 0
2254 define dso_local i128 @cmpxchg_i128_unaligned_acquire_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2255 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_seq_cst_weak:
2256 ; CHECK: bl __atomic_compare_exchange
2257 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 1
2258 %r = extractvalue { i128, i1 } %pair, 0
2262 define dso_local i128 @cmpxchg_i128_unaligned_release_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2263 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_monotonic:
2264 ; CHECK: bl __atomic_compare_exchange
2265 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release monotonic, align 1
2266 %r = extractvalue { i128, i1 } %pair, 0
2270 define dso_local i128 @cmpxchg_i128_unaligned_release_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2271 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_monotonic_weak:
2272 ; CHECK: bl __atomic_compare_exchange
2273 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release monotonic, align 1
2274 %r = extractvalue { i128, i1 } %pair, 0
2278 define dso_local i128 @cmpxchg_i128_unaligned_release_acquire(i128 %expected, i128 %new, ptr %ptr) {
2279 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_acquire:
2280 ; CHECK: bl __atomic_compare_exchange
2281 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release acquire, align 1
2282 %r = extractvalue { i128, i1 } %pair, 0
2286 define dso_local i128 @cmpxchg_i128_unaligned_release_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2287 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_acquire_weak:
2288 ; CHECK: bl __atomic_compare_exchange
2289 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release acquire, align 1
2290 %r = extractvalue { i128, i1 } %pair, 0
2294 define dso_local i128 @cmpxchg_i128_unaligned_release_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2295 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_seq_cst:
2296 ; CHECK: bl __atomic_compare_exchange
2297 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release seq_cst, align 1
2298 %r = extractvalue { i128, i1 } %pair, 0
2302 define dso_local i128 @cmpxchg_i128_unaligned_release_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2303 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_seq_cst_weak:
2304 ; CHECK: bl __atomic_compare_exchange
2305 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release seq_cst, align 1
2306 %r = extractvalue { i128, i1 } %pair, 0
2310 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2311 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_monotonic:
2312 ; CHECK: bl __atomic_compare_exchange
2313 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 1
2314 %r = extractvalue { i128, i1 } %pair, 0
2318 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2319 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_monotonic_weak:
2320 ; CHECK: bl __atomic_compare_exchange
2321 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 1
2322 %r = extractvalue { i128, i1 } %pair, 0
2326 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_acquire(i128 %expected, i128 %new, ptr %ptr) {
2327 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_acquire:
2328 ; CHECK: bl __atomic_compare_exchange
2329 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 1
2330 %r = extractvalue { i128, i1 } %pair, 0
2334 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2335 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_acquire_weak:
2336 ; CHECK: bl __atomic_compare_exchange
2337 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 1
2338 %r = extractvalue { i128, i1 } %pair, 0
2342 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2343 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_seq_cst:
2344 ; CHECK: bl __atomic_compare_exchange
2345 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 1
2346 %r = extractvalue { i128, i1 } %pair, 0
2350 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2351 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_seq_cst_weak:
2352 ; CHECK: bl __atomic_compare_exchange
2353 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 1
2354 %r = extractvalue { i128, i1 } %pair, 0
2358 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2359 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_monotonic:
2360 ; CHECK: bl __atomic_compare_exchange
2361 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 1
2362 %r = extractvalue { i128, i1 } %pair, 0
2366 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2367 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_monotonic_weak:
2368 ; CHECK: bl __atomic_compare_exchange
2369 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 1
2370 %r = extractvalue { i128, i1 } %pair, 0
2374 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_acquire(i128 %expected, i128 %new, ptr %ptr) {
2375 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_acquire:
2376 ; CHECK: bl __atomic_compare_exchange
2377 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 1
2378 %r = extractvalue { i128, i1 } %pair, 0
2382 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2383 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_acquire_weak:
2384 ; CHECK: bl __atomic_compare_exchange
2385 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 1
2386 %r = extractvalue { i128, i1 } %pair, 0
2390 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2391 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_seq_cst:
2392 ; CHECK: bl __atomic_compare_exchange
2393 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 1
2394 %r = extractvalue { i128, i1 } %pair, 0
2398 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2399 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_seq_cst_weak:
2400 ; CHECK: bl __atomic_compare_exchange
2401 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 1
2402 %r = extractvalue { i128, i1 } %pair, 0
2405 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: