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 -mattr=+rcpc -O0 | FileCheck %s --check-prefixes=CHECK,-O0
4 ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+rcpc -O1 | FileCheck %s --check-prefixes=CHECK,-O1
6 define dso_local i8 @cmpxchg_i8_aligned_monotonic_monotonic(i8 %expected, i8 %new, ptr %ptr) {
7 ; -O0-LABEL: cmpxchg_i8_aligned_monotonic_monotonic:
9 ; -O0: cmp w0, w9, uxtb
10 ; -O0: stlxrb w8, w1, [x2]
12 ; -O1-LABEL: cmpxchg_i8_aligned_monotonic_monotonic:
13 ; -O1: and w8, w0, #0xff
16 ; -O1: stxrb w9, w1, [x2]
17 %pair = cmpxchg 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_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
23 ; -O0-LABEL: cmpxchg_i8_aligned_monotonic_monotonic_weak:
24 ; -O0: ldaxrb w0, [x2]
25 ; -O0: cmp w0, w9, uxtb
26 ; -O0: stlxrb w8, w1, [x2]
28 ; -O1-LABEL: cmpxchg_i8_aligned_monotonic_monotonic_weak:
30 ; -O1: cmp w8, w0, uxtb
31 ; -O1: stxrb wzr, w1, [x2]
32 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
33 %r = extractvalue { i8, i1 } %pair, 0
37 define dso_local i8 @cmpxchg_i8_aligned_monotonic_acquire(i8 %expected, i8 %new, ptr %ptr) {
38 ; -O0-LABEL: cmpxchg_i8_aligned_monotonic_acquire:
39 ; -O0: ldaxrb w0, [x2]
40 ; -O0: cmp w0, w9, uxtb
41 ; -O0: stlxrb w8, w1, [x2]
43 ; -O1-LABEL: cmpxchg_i8_aligned_monotonic_acquire:
44 ; -O1: and w8, w0, #0xff
45 ; -O1: ldaxrb w0, [x2]
47 ; -O1: stxrb w9, w1, [x2]
48 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
49 %r = extractvalue { i8, i1 } %pair, 0
53 define dso_local i8 @cmpxchg_i8_aligned_monotonic_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
54 ; -O0-LABEL: cmpxchg_i8_aligned_monotonic_acquire_weak:
55 ; -O0: ldaxrb w0, [x2]
56 ; -O0: cmp w0, w9, uxtb
57 ; -O0: stlxrb w8, w1, [x2]
59 ; -O1-LABEL: cmpxchg_i8_aligned_monotonic_acquire_weak:
60 ; -O1: ldaxrb w8, [x2]
61 ; -O1: cmp w8, w0, uxtb
62 ; -O1: stxrb wzr, w1, [x2]
63 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
64 %r = extractvalue { i8, i1 } %pair, 0
68 define dso_local i8 @cmpxchg_i8_aligned_monotonic_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
69 ; -O0-LABEL: cmpxchg_i8_aligned_monotonic_seq_cst:
70 ; -O0: ldaxrb w0, [x2]
71 ; -O0: cmp w0, w9, uxtb
72 ; -O0: stlxrb w8, w1, [x2]
74 ; -O1-LABEL: cmpxchg_i8_aligned_monotonic_seq_cst:
75 ; -O1: and w8, w0, #0xff
76 ; -O1: ldaxrb w0, [x2]
78 ; -O1: stlxrb w9, w1, [x2]
79 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
80 %r = extractvalue { i8, i1 } %pair, 0
84 define dso_local i8 @cmpxchg_i8_aligned_monotonic_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
85 ; -O0-LABEL: cmpxchg_i8_aligned_monotonic_seq_cst_weak:
86 ; -O0: ldaxrb w0, [x2]
87 ; -O0: cmp w0, w9, uxtb
88 ; -O0: stlxrb w8, w1, [x2]
90 ; -O1-LABEL: cmpxchg_i8_aligned_monotonic_seq_cst_weak:
91 ; -O1: ldaxrb w8, [x2]
92 ; -O1: cmp w8, w0, uxtb
93 ; -O1: stlxrb wzr, w1, [x2]
94 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
95 %r = extractvalue { i8, i1 } %pair, 0
99 define dso_local i8 @cmpxchg_i8_aligned_acquire_monotonic(i8 %expected, i8 %new, ptr %ptr) {
100 ; -O0-LABEL: cmpxchg_i8_aligned_acquire_monotonic:
101 ; -O0: ldaxrb w0, [x2]
102 ; -O0: cmp w0, w9, uxtb
103 ; -O0: stlxrb w8, w1, [x2]
105 ; -O1-LABEL: cmpxchg_i8_aligned_acquire_monotonic:
106 ; -O1: and w8, w0, #0xff
107 ; -O1: ldaxrb w0, [x2]
109 ; -O1: stxrb w9, w1, [x2]
110 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
111 %r = extractvalue { i8, i1 } %pair, 0
115 define dso_local i8 @cmpxchg_i8_aligned_acquire_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
116 ; -O0-LABEL: cmpxchg_i8_aligned_acquire_monotonic_weak:
117 ; -O0: ldaxrb w0, [x2]
118 ; -O0: cmp w0, w9, uxtb
119 ; -O0: stlxrb w8, w1, [x2]
121 ; -O1-LABEL: cmpxchg_i8_aligned_acquire_monotonic_weak:
122 ; -O1: ldaxrb w8, [x2]
123 ; -O1: cmp w8, w0, uxtb
124 ; -O1: stxrb wzr, w1, [x2]
125 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
126 %r = extractvalue { i8, i1 } %pair, 0
130 define dso_local i8 @cmpxchg_i8_aligned_acquire_acquire(i8 %expected, i8 %new, ptr %ptr) {
131 ; -O0-LABEL: cmpxchg_i8_aligned_acquire_acquire:
132 ; -O0: ldaxrb w0, [x2]
133 ; -O0: cmp w0, w9, uxtb
134 ; -O0: stlxrb w8, w1, [x2]
136 ; -O1-LABEL: cmpxchg_i8_aligned_acquire_acquire:
137 ; -O1: and w8, w0, #0xff
138 ; -O1: ldaxrb w0, [x2]
140 ; -O1: stxrb w9, w1, [x2]
141 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
142 %r = extractvalue { i8, i1 } %pair, 0
146 define dso_local i8 @cmpxchg_i8_aligned_acquire_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
147 ; -O0-LABEL: cmpxchg_i8_aligned_acquire_acquire_weak:
148 ; -O0: ldaxrb w0, [x2]
149 ; -O0: cmp w0, w9, uxtb
150 ; -O0: stlxrb w8, w1, [x2]
152 ; -O1-LABEL: cmpxchg_i8_aligned_acquire_acquire_weak:
153 ; -O1: ldaxrb w8, [x2]
154 ; -O1: cmp w8, w0, uxtb
155 ; -O1: stxrb wzr, w1, [x2]
156 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
157 %r = extractvalue { i8, i1 } %pair, 0
161 define dso_local i8 @cmpxchg_i8_aligned_acquire_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
162 ; -O0-LABEL: cmpxchg_i8_aligned_acquire_seq_cst:
163 ; -O0: ldaxrb w0, [x2]
164 ; -O0: cmp w0, w9, uxtb
165 ; -O0: stlxrb w8, w1, [x2]
167 ; -O1-LABEL: cmpxchg_i8_aligned_acquire_seq_cst:
168 ; -O1: and w8, w0, #0xff
169 ; -O1: ldaxrb w0, [x2]
171 ; -O1: stlxrb w9, w1, [x2]
172 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
173 %r = extractvalue { i8, i1 } %pair, 0
177 define dso_local i8 @cmpxchg_i8_aligned_acquire_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
178 ; -O0-LABEL: cmpxchg_i8_aligned_acquire_seq_cst_weak:
179 ; -O0: ldaxrb w0, [x2]
180 ; -O0: cmp w0, w9, uxtb
181 ; -O0: stlxrb w8, w1, [x2]
183 ; -O1-LABEL: cmpxchg_i8_aligned_acquire_seq_cst_weak:
184 ; -O1: ldaxrb w8, [x2]
185 ; -O1: cmp w8, w0, uxtb
186 ; -O1: stlxrb wzr, w1, [x2]
187 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
188 %r = extractvalue { i8, i1 } %pair, 0
192 define dso_local i8 @cmpxchg_i8_aligned_release_monotonic(i8 %expected, i8 %new, ptr %ptr) {
193 ; -O0-LABEL: cmpxchg_i8_aligned_release_monotonic:
194 ; -O0: ldaxrb w0, [x2]
195 ; -O0: cmp w0, w9, uxtb
196 ; -O0: stlxrb w8, w1, [x2]
198 ; -O1-LABEL: cmpxchg_i8_aligned_release_monotonic:
199 ; -O1: and w8, w0, #0xff
200 ; -O1: ldxrb w0, [x2]
202 ; -O1: stlxrb w9, w1, [x2]
203 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
204 %r = extractvalue { i8, i1 } %pair, 0
208 define dso_local i8 @cmpxchg_i8_aligned_release_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
209 ; -O0-LABEL: cmpxchg_i8_aligned_release_monotonic_weak:
210 ; -O0: ldaxrb w0, [x2]
211 ; -O0: cmp w0, w9, uxtb
212 ; -O0: stlxrb w8, w1, [x2]
214 ; -O1-LABEL: cmpxchg_i8_aligned_release_monotonic_weak:
215 ; -O1: ldxrb w8, [x2]
216 ; -O1: cmp w8, w0, uxtb
217 ; -O1: stlxrb wzr, w1, [x2]
218 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
219 %r = extractvalue { i8, i1 } %pair, 0
223 define dso_local i8 @cmpxchg_i8_aligned_release_acquire(i8 %expected, i8 %new, ptr %ptr) {
224 ; -O0-LABEL: cmpxchg_i8_aligned_release_acquire:
225 ; -O0: ldaxrb w0, [x2]
226 ; -O0: cmp w0, w9, uxtb
227 ; -O0: stlxrb w8, w1, [x2]
229 ; -O1-LABEL: cmpxchg_i8_aligned_release_acquire:
230 ; -O1: and w8, w0, #0xff
231 ; -O1: ldaxrb w0, [x2]
233 ; -O1: stlxrb w9, w1, [x2]
234 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release acquire, align 1
235 %r = extractvalue { i8, i1 } %pair, 0
239 define dso_local i8 @cmpxchg_i8_aligned_release_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
240 ; -O0-LABEL: cmpxchg_i8_aligned_release_acquire_weak:
241 ; -O0: ldaxrb w0, [x2]
242 ; -O0: cmp w0, w9, uxtb
243 ; -O0: stlxrb w8, w1, [x2]
245 ; -O1-LABEL: cmpxchg_i8_aligned_release_acquire_weak:
246 ; -O1: ldaxrb w8, [x2]
247 ; -O1: cmp w8, w0, uxtb
248 ; -O1: stlxrb wzr, w1, [x2]
249 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release acquire, align 1
250 %r = extractvalue { i8, i1 } %pair, 0
254 define dso_local i8 @cmpxchg_i8_aligned_release_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
255 ; -O0-LABEL: cmpxchg_i8_aligned_release_seq_cst:
256 ; -O0: ldaxrb w0, [x2]
257 ; -O0: cmp w0, w9, uxtb
258 ; -O0: stlxrb w8, w1, [x2]
260 ; -O1-LABEL: cmpxchg_i8_aligned_release_seq_cst:
261 ; -O1: and w8, w0, #0xff
262 ; -O1: ldaxrb w0, [x2]
264 ; -O1: stlxrb w9, w1, [x2]
265 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
266 %r = extractvalue { i8, i1 } %pair, 0
270 define dso_local i8 @cmpxchg_i8_aligned_release_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
271 ; -O0-LABEL: cmpxchg_i8_aligned_release_seq_cst_weak:
272 ; -O0: ldaxrb w0, [x2]
273 ; -O0: cmp w0, w9, uxtb
274 ; -O0: stlxrb w8, w1, [x2]
276 ; -O1-LABEL: cmpxchg_i8_aligned_release_seq_cst_weak:
277 ; -O1: ldaxrb w8, [x2]
278 ; -O1: cmp w8, w0, uxtb
279 ; -O1: stlxrb wzr, w1, [x2]
280 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
281 %r = extractvalue { i8, i1 } %pair, 0
285 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_monotonic(i8 %expected, i8 %new, ptr %ptr) {
286 ; -O0-LABEL: cmpxchg_i8_aligned_acq_rel_monotonic:
287 ; -O0: ldaxrb w0, [x2]
288 ; -O0: cmp w0, w9, uxtb
289 ; -O0: stlxrb w8, w1, [x2]
291 ; -O1-LABEL: cmpxchg_i8_aligned_acq_rel_monotonic:
292 ; -O1: and w8, w0, #0xff
293 ; -O1: ldaxrb w0, [x2]
295 ; -O1: stlxrb w9, w1, [x2]
296 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
297 %r = extractvalue { i8, i1 } %pair, 0
301 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
302 ; -O0-LABEL: cmpxchg_i8_aligned_acq_rel_monotonic_weak:
303 ; -O0: ldaxrb w0, [x2]
304 ; -O0: cmp w0, w9, uxtb
305 ; -O0: stlxrb w8, w1, [x2]
307 ; -O1-LABEL: cmpxchg_i8_aligned_acq_rel_monotonic_weak:
308 ; -O1: ldaxrb w8, [x2]
309 ; -O1: cmp w8, w0, uxtb
310 ; -O1: stlxrb wzr, w1, [x2]
311 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
312 %r = extractvalue { i8, i1 } %pair, 0
316 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_acquire(i8 %expected, i8 %new, ptr %ptr) {
317 ; -O0-LABEL: cmpxchg_i8_aligned_acq_rel_acquire:
318 ; -O0: ldaxrb w0, [x2]
319 ; -O0: cmp w0, w9, uxtb
320 ; -O0: stlxrb w8, w1, [x2]
322 ; -O1-LABEL: cmpxchg_i8_aligned_acq_rel_acquire:
323 ; -O1: and w8, w0, #0xff
324 ; -O1: ldaxrb w0, [x2]
326 ; -O1: stlxrb w9, w1, [x2]
327 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
328 %r = extractvalue { i8, i1 } %pair, 0
332 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
333 ; -O0-LABEL: cmpxchg_i8_aligned_acq_rel_acquire_weak:
334 ; -O0: ldaxrb w0, [x2]
335 ; -O0: cmp w0, w9, uxtb
336 ; -O0: stlxrb w8, w1, [x2]
338 ; -O1-LABEL: cmpxchg_i8_aligned_acq_rel_acquire_weak:
339 ; -O1: ldaxrb w8, [x2]
340 ; -O1: cmp w8, w0, uxtb
341 ; -O1: stlxrb wzr, w1, [x2]
342 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
343 %r = extractvalue { i8, i1 } %pair, 0
347 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
348 ; -O0-LABEL: cmpxchg_i8_aligned_acq_rel_seq_cst:
349 ; -O0: ldaxrb w0, [x2]
350 ; -O0: cmp w0, w9, uxtb
351 ; -O0: stlxrb w8, w1, [x2]
353 ; -O1-LABEL: cmpxchg_i8_aligned_acq_rel_seq_cst:
354 ; -O1: and w8, w0, #0xff
355 ; -O1: ldaxrb w0, [x2]
357 ; -O1: stlxrb w9, w1, [x2]
358 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
359 %r = extractvalue { i8, i1 } %pair, 0
363 define dso_local i8 @cmpxchg_i8_aligned_acq_rel_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
364 ; -O0-LABEL: cmpxchg_i8_aligned_acq_rel_seq_cst_weak:
365 ; -O0: ldaxrb w0, [x2]
366 ; -O0: cmp w0, w9, uxtb
367 ; -O0: stlxrb w8, w1, [x2]
369 ; -O1-LABEL: cmpxchg_i8_aligned_acq_rel_seq_cst_weak:
370 ; -O1: ldaxrb w8, [x2]
371 ; -O1: cmp w8, w0, uxtb
372 ; -O1: stlxrb wzr, w1, [x2]
373 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
374 %r = extractvalue { i8, i1 } %pair, 0
378 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_monotonic(i8 %expected, i8 %new, ptr %ptr) {
379 ; -O0-LABEL: cmpxchg_i8_aligned_seq_cst_monotonic:
380 ; -O0: ldaxrb w0, [x2]
381 ; -O0: cmp w0, w9, uxtb
382 ; -O0: stlxrb w8, w1, [x2]
384 ; -O1-LABEL: cmpxchg_i8_aligned_seq_cst_monotonic:
385 ; -O1: and w8, w0, #0xff
386 ; -O1: ldaxrb w0, [x2]
388 ; -O1: stlxrb w9, w1, [x2]
389 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
390 %r = extractvalue { i8, i1 } %pair, 0
394 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
395 ; -O0-LABEL: cmpxchg_i8_aligned_seq_cst_monotonic_weak:
396 ; -O0: ldaxrb w0, [x2]
397 ; -O0: cmp w0, w9, uxtb
398 ; -O0: stlxrb w8, w1, [x2]
400 ; -O1-LABEL: cmpxchg_i8_aligned_seq_cst_monotonic_weak:
401 ; -O1: ldaxrb w8, [x2]
402 ; -O1: cmp w8, w0, uxtb
403 ; -O1: stlxrb wzr, w1, [x2]
404 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
405 %r = extractvalue { i8, i1 } %pair, 0
409 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_acquire(i8 %expected, i8 %new, ptr %ptr) {
410 ; -O0-LABEL: cmpxchg_i8_aligned_seq_cst_acquire:
411 ; -O0: ldaxrb w0, [x2]
412 ; -O0: cmp w0, w9, uxtb
413 ; -O0: stlxrb w8, w1, [x2]
415 ; -O1-LABEL: cmpxchg_i8_aligned_seq_cst_acquire:
416 ; -O1: and w8, w0, #0xff
417 ; -O1: ldaxrb w0, [x2]
419 ; -O1: stlxrb w9, w1, [x2]
420 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
421 %r = extractvalue { i8, i1 } %pair, 0
425 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
426 ; -O0-LABEL: cmpxchg_i8_aligned_seq_cst_acquire_weak:
427 ; -O0: ldaxrb w0, [x2]
428 ; -O0: cmp w0, w9, uxtb
429 ; -O0: stlxrb w8, w1, [x2]
431 ; -O1-LABEL: cmpxchg_i8_aligned_seq_cst_acquire_weak:
432 ; -O1: ldaxrb w8, [x2]
433 ; -O1: cmp w8, w0, uxtb
434 ; -O1: stlxrb wzr, w1, [x2]
435 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
436 %r = extractvalue { i8, i1 } %pair, 0
440 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
441 ; -O0-LABEL: cmpxchg_i8_aligned_seq_cst_seq_cst:
442 ; -O0: ldaxrb w0, [x2]
443 ; -O0: cmp w0, w9, uxtb
444 ; -O0: stlxrb w8, w1, [x2]
446 ; -O1-LABEL: cmpxchg_i8_aligned_seq_cst_seq_cst:
447 ; -O1: and w8, w0, #0xff
448 ; -O1: ldaxrb w0, [x2]
450 ; -O1: stlxrb w9, w1, [x2]
451 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
452 %r = extractvalue { i8, i1 } %pair, 0
456 define dso_local i8 @cmpxchg_i8_aligned_seq_cst_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
457 ; -O0-LABEL: cmpxchg_i8_aligned_seq_cst_seq_cst_weak:
458 ; -O0: ldaxrb w0, [x2]
459 ; -O0: cmp w0, w9, uxtb
460 ; -O0: stlxrb w8, w1, [x2]
462 ; -O1-LABEL: cmpxchg_i8_aligned_seq_cst_seq_cst_weak:
463 ; -O1: ldaxrb w8, [x2]
464 ; -O1: cmp w8, w0, uxtb
465 ; -O1: stlxrb wzr, w1, [x2]
466 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
467 %r = extractvalue { i8, i1 } %pair, 0
471 define dso_local i16 @cmpxchg_i16_aligned_monotonic_monotonic(i16 %expected, i16 %new, ptr %ptr) {
472 ; -O0-LABEL: cmpxchg_i16_aligned_monotonic_monotonic:
473 ; -O0: ldaxrh w0, [x2]
474 ; -O0: cmp w0, w9, uxth
475 ; -O0: stlxrh w8, w1, [x2]
477 ; -O1-LABEL: cmpxchg_i16_aligned_monotonic_monotonic:
478 ; -O1: and w8, w0, #0xffff
479 ; -O1: ldxrh w0, [x2]
481 ; -O1: stxrh w9, w1, [x2]
482 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 2
483 %r = extractvalue { i16, i1 } %pair, 0
487 define dso_local i16 @cmpxchg_i16_aligned_monotonic_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
488 ; -O0-LABEL: cmpxchg_i16_aligned_monotonic_monotonic_weak:
489 ; -O0: ldaxrh w0, [x2]
490 ; -O0: cmp w0, w9, uxth
491 ; -O0: stlxrh w8, w1, [x2]
493 ; -O1-LABEL: cmpxchg_i16_aligned_monotonic_monotonic_weak:
494 ; -O1: ldxrh w8, [x2]
495 ; -O1: cmp w8, w0, uxth
496 ; -O1: stxrh wzr, w1, [x2]
497 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 2
498 %r = extractvalue { i16, i1 } %pair, 0
502 define dso_local i16 @cmpxchg_i16_aligned_monotonic_acquire(i16 %expected, i16 %new, ptr %ptr) {
503 ; -O0-LABEL: cmpxchg_i16_aligned_monotonic_acquire:
504 ; -O0: ldaxrh w0, [x2]
505 ; -O0: cmp w0, w9, uxth
506 ; -O0: stlxrh w8, w1, [x2]
508 ; -O1-LABEL: cmpxchg_i16_aligned_monotonic_acquire:
509 ; -O1: and w8, w0, #0xffff
510 ; -O1: ldaxrh w0, [x2]
512 ; -O1: stxrh w9, w1, [x2]
513 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 2
514 %r = extractvalue { i16, i1 } %pair, 0
518 define dso_local i16 @cmpxchg_i16_aligned_monotonic_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
519 ; -O0-LABEL: cmpxchg_i16_aligned_monotonic_acquire_weak:
520 ; -O0: ldaxrh w0, [x2]
521 ; -O0: cmp w0, w9, uxth
522 ; -O0: stlxrh w8, w1, [x2]
524 ; -O1-LABEL: cmpxchg_i16_aligned_monotonic_acquire_weak:
525 ; -O1: ldaxrh w8, [x2]
526 ; -O1: cmp w8, w0, uxth
527 ; -O1: stxrh wzr, w1, [x2]
528 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 2
529 %r = extractvalue { i16, i1 } %pair, 0
533 define dso_local i16 @cmpxchg_i16_aligned_monotonic_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
534 ; -O0-LABEL: cmpxchg_i16_aligned_monotonic_seq_cst:
535 ; -O0: ldaxrh w0, [x2]
536 ; -O0: cmp w0, w9, uxth
537 ; -O0: stlxrh w8, w1, [x2]
539 ; -O1-LABEL: cmpxchg_i16_aligned_monotonic_seq_cst:
540 ; -O1: and w8, w0, #0xffff
541 ; -O1: ldaxrh w0, [x2]
543 ; -O1: stlxrh w9, w1, [x2]
544 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 2
545 %r = extractvalue { i16, i1 } %pair, 0
549 define dso_local i16 @cmpxchg_i16_aligned_monotonic_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
550 ; -O0-LABEL: cmpxchg_i16_aligned_monotonic_seq_cst_weak:
551 ; -O0: ldaxrh w0, [x2]
552 ; -O0: cmp w0, w9, uxth
553 ; -O0: stlxrh w8, w1, [x2]
555 ; -O1-LABEL: cmpxchg_i16_aligned_monotonic_seq_cst_weak:
556 ; -O1: ldaxrh w8, [x2]
557 ; -O1: cmp w8, w0, uxth
558 ; -O1: stlxrh wzr, w1, [x2]
559 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 2
560 %r = extractvalue { i16, i1 } %pair, 0
564 define dso_local i16 @cmpxchg_i16_aligned_acquire_monotonic(i16 %expected, i16 %new, ptr %ptr) {
565 ; -O0-LABEL: cmpxchg_i16_aligned_acquire_monotonic:
566 ; -O0: ldaxrh w0, [x2]
567 ; -O0: cmp w0, w9, uxth
568 ; -O0: stlxrh w8, w1, [x2]
570 ; -O1-LABEL: cmpxchg_i16_aligned_acquire_monotonic:
571 ; -O1: and w8, w0, #0xffff
572 ; -O1: ldaxrh w0, [x2]
574 ; -O1: stxrh w9, w1, [x2]
575 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 2
576 %r = extractvalue { i16, i1 } %pair, 0
580 define dso_local i16 @cmpxchg_i16_aligned_acquire_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
581 ; -O0-LABEL: cmpxchg_i16_aligned_acquire_monotonic_weak:
582 ; -O0: ldaxrh w0, [x2]
583 ; -O0: cmp w0, w9, uxth
584 ; -O0: stlxrh w8, w1, [x2]
586 ; -O1-LABEL: cmpxchg_i16_aligned_acquire_monotonic_weak:
587 ; -O1: ldaxrh w8, [x2]
588 ; -O1: cmp w8, w0, uxth
589 ; -O1: stxrh wzr, w1, [x2]
590 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 2
591 %r = extractvalue { i16, i1 } %pair, 0
595 define dso_local i16 @cmpxchg_i16_aligned_acquire_acquire(i16 %expected, i16 %new, ptr %ptr) {
596 ; -O0-LABEL: cmpxchg_i16_aligned_acquire_acquire:
597 ; -O0: ldaxrh w0, [x2]
598 ; -O0: cmp w0, w9, uxth
599 ; -O0: stlxrh w8, w1, [x2]
601 ; -O1-LABEL: cmpxchg_i16_aligned_acquire_acquire:
602 ; -O1: and w8, w0, #0xffff
603 ; -O1: ldaxrh w0, [x2]
605 ; -O1: stxrh w9, w1, [x2]
606 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire acquire, align 2
607 %r = extractvalue { i16, i1 } %pair, 0
611 define dso_local i16 @cmpxchg_i16_aligned_acquire_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
612 ; -O0-LABEL: cmpxchg_i16_aligned_acquire_acquire_weak:
613 ; -O0: ldaxrh w0, [x2]
614 ; -O0: cmp w0, w9, uxth
615 ; -O0: stlxrh w8, w1, [x2]
617 ; -O1-LABEL: cmpxchg_i16_aligned_acquire_acquire_weak:
618 ; -O1: ldaxrh w8, [x2]
619 ; -O1: cmp w8, w0, uxth
620 ; -O1: stxrh wzr, w1, [x2]
621 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire acquire, align 2
622 %r = extractvalue { i16, i1 } %pair, 0
626 define dso_local i16 @cmpxchg_i16_aligned_acquire_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
627 ; -O0-LABEL: cmpxchg_i16_aligned_acquire_seq_cst:
628 ; -O0: ldaxrh w0, [x2]
629 ; -O0: cmp w0, w9, uxth
630 ; -O0: stlxrh w8, w1, [x2]
632 ; -O1-LABEL: cmpxchg_i16_aligned_acquire_seq_cst:
633 ; -O1: and w8, w0, #0xffff
634 ; -O1: ldaxrh w0, [x2]
636 ; -O1: stlxrh w9, w1, [x2]
637 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 2
638 %r = extractvalue { i16, i1 } %pair, 0
642 define dso_local i16 @cmpxchg_i16_aligned_acquire_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
643 ; -O0-LABEL: cmpxchg_i16_aligned_acquire_seq_cst_weak:
644 ; -O0: ldaxrh w0, [x2]
645 ; -O0: cmp w0, w9, uxth
646 ; -O0: stlxrh w8, w1, [x2]
648 ; -O1-LABEL: cmpxchg_i16_aligned_acquire_seq_cst_weak:
649 ; -O1: ldaxrh w8, [x2]
650 ; -O1: cmp w8, w0, uxth
651 ; -O1: stlxrh wzr, w1, [x2]
652 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 2
653 %r = extractvalue { i16, i1 } %pair, 0
657 define dso_local i16 @cmpxchg_i16_aligned_release_monotonic(i16 %expected, i16 %new, ptr %ptr) {
658 ; -O0-LABEL: cmpxchg_i16_aligned_release_monotonic:
659 ; -O0: ldaxrh w0, [x2]
660 ; -O0: cmp w0, w9, uxth
661 ; -O0: stlxrh w8, w1, [x2]
663 ; -O1-LABEL: cmpxchg_i16_aligned_release_monotonic:
664 ; -O1: and w8, w0, #0xffff
665 ; -O1: ldxrh w0, [x2]
667 ; -O1: stlxrh w9, w1, [x2]
668 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release monotonic, align 2
669 %r = extractvalue { i16, i1 } %pair, 0
673 define dso_local i16 @cmpxchg_i16_aligned_release_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
674 ; -O0-LABEL: cmpxchg_i16_aligned_release_monotonic_weak:
675 ; -O0: ldaxrh w0, [x2]
676 ; -O0: cmp w0, w9, uxth
677 ; -O0: stlxrh w8, w1, [x2]
679 ; -O1-LABEL: cmpxchg_i16_aligned_release_monotonic_weak:
680 ; -O1: ldxrh w8, [x2]
681 ; -O1: cmp w8, w0, uxth
682 ; -O1: stlxrh wzr, w1, [x2]
683 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release monotonic, align 2
684 %r = extractvalue { i16, i1 } %pair, 0
688 define dso_local i16 @cmpxchg_i16_aligned_release_acquire(i16 %expected, i16 %new, ptr %ptr) {
689 ; -O0-LABEL: cmpxchg_i16_aligned_release_acquire:
690 ; -O0: ldaxrh w0, [x2]
691 ; -O0: cmp w0, w9, uxth
692 ; -O0: stlxrh w8, w1, [x2]
694 ; -O1-LABEL: cmpxchg_i16_aligned_release_acquire:
695 ; -O1: and w8, w0, #0xffff
696 ; -O1: ldaxrh w0, [x2]
698 ; -O1: stlxrh w9, w1, [x2]
699 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release acquire, align 2
700 %r = extractvalue { i16, i1 } %pair, 0
704 define dso_local i16 @cmpxchg_i16_aligned_release_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
705 ; -O0-LABEL: cmpxchg_i16_aligned_release_acquire_weak:
706 ; -O0: ldaxrh w0, [x2]
707 ; -O0: cmp w0, w9, uxth
708 ; -O0: stlxrh w8, w1, [x2]
710 ; -O1-LABEL: cmpxchg_i16_aligned_release_acquire_weak:
711 ; -O1: ldaxrh w8, [x2]
712 ; -O1: cmp w8, w0, uxth
713 ; -O1: stlxrh wzr, w1, [x2]
714 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release acquire, align 2
715 %r = extractvalue { i16, i1 } %pair, 0
719 define dso_local i16 @cmpxchg_i16_aligned_release_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
720 ; -O0-LABEL: cmpxchg_i16_aligned_release_seq_cst:
721 ; -O0: ldaxrh w0, [x2]
722 ; -O0: cmp w0, w9, uxth
723 ; -O0: stlxrh w8, w1, [x2]
725 ; -O1-LABEL: cmpxchg_i16_aligned_release_seq_cst:
726 ; -O1: and w8, w0, #0xffff
727 ; -O1: ldaxrh w0, [x2]
729 ; -O1: stlxrh w9, w1, [x2]
730 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release seq_cst, align 2
731 %r = extractvalue { i16, i1 } %pair, 0
735 define dso_local i16 @cmpxchg_i16_aligned_release_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
736 ; -O0-LABEL: cmpxchg_i16_aligned_release_seq_cst_weak:
737 ; -O0: ldaxrh w0, [x2]
738 ; -O0: cmp w0, w9, uxth
739 ; -O0: stlxrh w8, w1, [x2]
741 ; -O1-LABEL: cmpxchg_i16_aligned_release_seq_cst_weak:
742 ; -O1: ldaxrh w8, [x2]
743 ; -O1: cmp w8, w0, uxth
744 ; -O1: stlxrh wzr, w1, [x2]
745 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release seq_cst, align 2
746 %r = extractvalue { i16, i1 } %pair, 0
750 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_monotonic(i16 %expected, i16 %new, ptr %ptr) {
751 ; -O0-LABEL: cmpxchg_i16_aligned_acq_rel_monotonic:
752 ; -O0: ldaxrh w0, [x2]
753 ; -O0: cmp w0, w9, uxth
754 ; -O0: stlxrh w8, w1, [x2]
756 ; -O1-LABEL: cmpxchg_i16_aligned_acq_rel_monotonic:
757 ; -O1: and w8, w0, #0xffff
758 ; -O1: ldaxrh w0, [x2]
760 ; -O1: stlxrh w9, w1, [x2]
761 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 2
762 %r = extractvalue { i16, i1 } %pair, 0
766 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
767 ; -O0-LABEL: cmpxchg_i16_aligned_acq_rel_monotonic_weak:
768 ; -O0: ldaxrh w0, [x2]
769 ; -O0: cmp w0, w9, uxth
770 ; -O0: stlxrh w8, w1, [x2]
772 ; -O1-LABEL: cmpxchg_i16_aligned_acq_rel_monotonic_weak:
773 ; -O1: ldaxrh w8, [x2]
774 ; -O1: cmp w8, w0, uxth
775 ; -O1: stlxrh wzr, w1, [x2]
776 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 2
777 %r = extractvalue { i16, i1 } %pair, 0
781 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_acquire(i16 %expected, i16 %new, ptr %ptr) {
782 ; -O0-LABEL: cmpxchg_i16_aligned_acq_rel_acquire:
783 ; -O0: ldaxrh w0, [x2]
784 ; -O0: cmp w0, w9, uxth
785 ; -O0: stlxrh w8, w1, [x2]
787 ; -O1-LABEL: cmpxchg_i16_aligned_acq_rel_acquire:
788 ; -O1: and w8, w0, #0xffff
789 ; -O1: ldaxrh w0, [x2]
791 ; -O1: stlxrh w9, w1, [x2]
792 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 2
793 %r = extractvalue { i16, i1 } %pair, 0
797 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
798 ; -O0-LABEL: cmpxchg_i16_aligned_acq_rel_acquire_weak:
799 ; -O0: ldaxrh w0, [x2]
800 ; -O0: cmp w0, w9, uxth
801 ; -O0: stlxrh w8, w1, [x2]
803 ; -O1-LABEL: cmpxchg_i16_aligned_acq_rel_acquire_weak:
804 ; -O1: ldaxrh w8, [x2]
805 ; -O1: cmp w8, w0, uxth
806 ; -O1: stlxrh wzr, w1, [x2]
807 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 2
808 %r = extractvalue { i16, i1 } %pair, 0
812 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
813 ; -O0-LABEL: cmpxchg_i16_aligned_acq_rel_seq_cst:
814 ; -O0: ldaxrh w0, [x2]
815 ; -O0: cmp w0, w9, uxth
816 ; -O0: stlxrh w8, w1, [x2]
818 ; -O1-LABEL: cmpxchg_i16_aligned_acq_rel_seq_cst:
819 ; -O1: and w8, w0, #0xffff
820 ; -O1: ldaxrh w0, [x2]
822 ; -O1: stlxrh w9, w1, [x2]
823 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 2
824 %r = extractvalue { i16, i1 } %pair, 0
828 define dso_local i16 @cmpxchg_i16_aligned_acq_rel_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
829 ; -O0-LABEL: cmpxchg_i16_aligned_acq_rel_seq_cst_weak:
830 ; -O0: ldaxrh w0, [x2]
831 ; -O0: cmp w0, w9, uxth
832 ; -O0: stlxrh w8, w1, [x2]
834 ; -O1-LABEL: cmpxchg_i16_aligned_acq_rel_seq_cst_weak:
835 ; -O1: ldaxrh w8, [x2]
836 ; -O1: cmp w8, w0, uxth
837 ; -O1: stlxrh wzr, w1, [x2]
838 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 2
839 %r = extractvalue { i16, i1 } %pair, 0
843 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_monotonic(i16 %expected, i16 %new, ptr %ptr) {
844 ; -O0-LABEL: cmpxchg_i16_aligned_seq_cst_monotonic:
845 ; -O0: ldaxrh w0, [x2]
846 ; -O0: cmp w0, w9, uxth
847 ; -O0: stlxrh w8, w1, [x2]
849 ; -O1-LABEL: cmpxchg_i16_aligned_seq_cst_monotonic:
850 ; -O1: and w8, w0, #0xffff
851 ; -O1: ldaxrh w0, [x2]
853 ; -O1: stlxrh w9, w1, [x2]
854 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 2
855 %r = extractvalue { i16, i1 } %pair, 0
859 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
860 ; -O0-LABEL: cmpxchg_i16_aligned_seq_cst_monotonic_weak:
861 ; -O0: ldaxrh w0, [x2]
862 ; -O0: cmp w0, w9, uxth
863 ; -O0: stlxrh w8, w1, [x2]
865 ; -O1-LABEL: cmpxchg_i16_aligned_seq_cst_monotonic_weak:
866 ; -O1: ldaxrh w8, [x2]
867 ; -O1: cmp w8, w0, uxth
868 ; -O1: stlxrh wzr, w1, [x2]
869 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 2
870 %r = extractvalue { i16, i1 } %pair, 0
874 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_acquire(i16 %expected, i16 %new, ptr %ptr) {
875 ; -O0-LABEL: cmpxchg_i16_aligned_seq_cst_acquire:
876 ; -O0: ldaxrh w0, [x2]
877 ; -O0: cmp w0, w9, uxth
878 ; -O0: stlxrh w8, w1, [x2]
880 ; -O1-LABEL: cmpxchg_i16_aligned_seq_cst_acquire:
881 ; -O1: and w8, w0, #0xffff
882 ; -O1: ldaxrh w0, [x2]
884 ; -O1: stlxrh w9, w1, [x2]
885 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 2
886 %r = extractvalue { i16, i1 } %pair, 0
890 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
891 ; -O0-LABEL: cmpxchg_i16_aligned_seq_cst_acquire_weak:
892 ; -O0: ldaxrh w0, [x2]
893 ; -O0: cmp w0, w9, uxth
894 ; -O0: stlxrh w8, w1, [x2]
896 ; -O1-LABEL: cmpxchg_i16_aligned_seq_cst_acquire_weak:
897 ; -O1: ldaxrh w8, [x2]
898 ; -O1: cmp w8, w0, uxth
899 ; -O1: stlxrh wzr, w1, [x2]
900 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 2
901 %r = extractvalue { i16, i1 } %pair, 0
905 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
906 ; -O0-LABEL: cmpxchg_i16_aligned_seq_cst_seq_cst:
907 ; -O0: ldaxrh w0, [x2]
908 ; -O0: cmp w0, w9, uxth
909 ; -O0: stlxrh w8, w1, [x2]
911 ; -O1-LABEL: cmpxchg_i16_aligned_seq_cst_seq_cst:
912 ; -O1: and w8, w0, #0xffff
913 ; -O1: ldaxrh w0, [x2]
915 ; -O1: stlxrh w9, w1, [x2]
916 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 2
917 %r = extractvalue { i16, i1 } %pair, 0
921 define dso_local i16 @cmpxchg_i16_aligned_seq_cst_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
922 ; -O0-LABEL: cmpxchg_i16_aligned_seq_cst_seq_cst_weak:
923 ; -O0: ldaxrh w0, [x2]
924 ; -O0: cmp w0, w9, uxth
925 ; -O0: stlxrh w8, w1, [x2]
927 ; -O1-LABEL: cmpxchg_i16_aligned_seq_cst_seq_cst_weak:
928 ; -O1: ldaxrh w8, [x2]
929 ; -O1: cmp w8, w0, uxth
930 ; -O1: stlxrh wzr, w1, [x2]
931 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 2
932 %r = extractvalue { i16, i1 } %pair, 0
936 define dso_local i32 @cmpxchg_i32_aligned_monotonic_monotonic(i32 %expected, i32 %new, ptr %ptr) {
937 ; -O0-LABEL: cmpxchg_i32_aligned_monotonic_monotonic:
938 ; -O0: ldaxr w0, [x2]
940 ; -O0: stlxr w8, w1, [x2]
942 ; -O1-LABEL: cmpxchg_i32_aligned_monotonic_monotonic:
945 ; -O1: stxr w9, w1, [x2]
946 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 4
947 %r = extractvalue { i32, i1 } %pair, 0
951 define dso_local i32 @cmpxchg_i32_aligned_monotonic_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
952 ; -O0-LABEL: cmpxchg_i32_aligned_monotonic_monotonic_weak:
953 ; -O0: ldaxr w0, [x2]
955 ; -O0: stlxr w8, w1, [x2]
957 ; -O1-LABEL: cmpxchg_i32_aligned_monotonic_monotonic_weak:
960 ; -O1: stxr wzr, w1, [x2]
961 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 4
962 %r = extractvalue { i32, i1 } %pair, 0
966 define dso_local i32 @cmpxchg_i32_aligned_monotonic_acquire(i32 %expected, i32 %new, ptr %ptr) {
967 ; -O0-LABEL: cmpxchg_i32_aligned_monotonic_acquire:
968 ; -O0: ldaxr w0, [x2]
970 ; -O0: stlxr w8, w1, [x2]
972 ; -O1-LABEL: cmpxchg_i32_aligned_monotonic_acquire:
973 ; -O1: ldaxr w0, [x2]
975 ; -O1: stxr w9, w1, [x2]
976 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 4
977 %r = extractvalue { i32, i1 } %pair, 0
981 define dso_local i32 @cmpxchg_i32_aligned_monotonic_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
982 ; -O0-LABEL: cmpxchg_i32_aligned_monotonic_acquire_weak:
983 ; -O0: ldaxr w0, [x2]
985 ; -O0: stlxr w8, w1, [x2]
987 ; -O1-LABEL: cmpxchg_i32_aligned_monotonic_acquire_weak:
988 ; -O1: ldaxr w8, [x2]
990 ; -O1: stxr wzr, w1, [x2]
991 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 4
992 %r = extractvalue { i32, i1 } %pair, 0
996 define dso_local i32 @cmpxchg_i32_aligned_monotonic_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
997 ; -O0-LABEL: cmpxchg_i32_aligned_monotonic_seq_cst:
998 ; -O0: ldaxr w0, [x2]
1000 ; -O0: stlxr w8, w1, [x2]
1002 ; -O1-LABEL: cmpxchg_i32_aligned_monotonic_seq_cst:
1003 ; -O1: ldaxr w0, [x2]
1005 ; -O1: stlxr w9, w1, [x2]
1006 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 4
1007 %r = extractvalue { i32, i1 } %pair, 0
1011 define dso_local i32 @cmpxchg_i32_aligned_monotonic_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1012 ; -O0-LABEL: cmpxchg_i32_aligned_monotonic_seq_cst_weak:
1013 ; -O0: ldaxr w0, [x2]
1015 ; -O0: stlxr w8, w1, [x2]
1017 ; -O1-LABEL: cmpxchg_i32_aligned_monotonic_seq_cst_weak:
1018 ; -O1: ldaxr w8, [x2]
1020 ; -O1: stlxr wzr, w1, [x2]
1021 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 4
1022 %r = extractvalue { i32, i1 } %pair, 0
1026 define dso_local i32 @cmpxchg_i32_aligned_acquire_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1027 ; -O0-LABEL: cmpxchg_i32_aligned_acquire_monotonic:
1028 ; -O0: ldaxr w0, [x2]
1030 ; -O0: stlxr w8, w1, [x2]
1032 ; -O1-LABEL: cmpxchg_i32_aligned_acquire_monotonic:
1033 ; -O1: ldaxr w0, [x2]
1035 ; -O1: stxr w9, w1, [x2]
1036 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 4
1037 %r = extractvalue { i32, i1 } %pair, 0
1041 define dso_local i32 @cmpxchg_i32_aligned_acquire_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1042 ; -O0-LABEL: cmpxchg_i32_aligned_acquire_monotonic_weak:
1043 ; -O0: ldaxr w0, [x2]
1045 ; -O0: stlxr w8, w1, [x2]
1047 ; -O1-LABEL: cmpxchg_i32_aligned_acquire_monotonic_weak:
1048 ; -O1: ldaxr w8, [x2]
1050 ; -O1: stxr wzr, w1, [x2]
1051 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 4
1052 %r = extractvalue { i32, i1 } %pair, 0
1056 define dso_local i32 @cmpxchg_i32_aligned_acquire_acquire(i32 %expected, i32 %new, ptr %ptr) {
1057 ; -O0-LABEL: cmpxchg_i32_aligned_acquire_acquire:
1058 ; -O0: ldaxr w0, [x2]
1060 ; -O0: stlxr w8, w1, [x2]
1062 ; -O1-LABEL: cmpxchg_i32_aligned_acquire_acquire:
1063 ; -O1: ldaxr w0, [x2]
1065 ; -O1: stxr w9, w1, [x2]
1066 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire acquire, align 4
1067 %r = extractvalue { i32, i1 } %pair, 0
1071 define dso_local i32 @cmpxchg_i32_aligned_acquire_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1072 ; -O0-LABEL: cmpxchg_i32_aligned_acquire_acquire_weak:
1073 ; -O0: ldaxr w0, [x2]
1075 ; -O0: stlxr w8, w1, [x2]
1077 ; -O1-LABEL: cmpxchg_i32_aligned_acquire_acquire_weak:
1078 ; -O1: ldaxr w8, [x2]
1080 ; -O1: stxr wzr, w1, [x2]
1081 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire acquire, align 4
1082 %r = extractvalue { i32, i1 } %pair, 0
1086 define dso_local i32 @cmpxchg_i32_aligned_acquire_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1087 ; -O0-LABEL: cmpxchg_i32_aligned_acquire_seq_cst:
1088 ; -O0: ldaxr w0, [x2]
1090 ; -O0: stlxr w8, w1, [x2]
1092 ; -O1-LABEL: cmpxchg_i32_aligned_acquire_seq_cst:
1093 ; -O1: ldaxr w0, [x2]
1095 ; -O1: stlxr w9, w1, [x2]
1096 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 4
1097 %r = extractvalue { i32, i1 } %pair, 0
1101 define dso_local i32 @cmpxchg_i32_aligned_acquire_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1102 ; -O0-LABEL: cmpxchg_i32_aligned_acquire_seq_cst_weak:
1103 ; -O0: ldaxr w0, [x2]
1105 ; -O0: stlxr w8, w1, [x2]
1107 ; -O1-LABEL: cmpxchg_i32_aligned_acquire_seq_cst_weak:
1108 ; -O1: ldaxr w8, [x2]
1110 ; -O1: stlxr wzr, w1, [x2]
1111 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 4
1112 %r = extractvalue { i32, i1 } %pair, 0
1116 define dso_local i32 @cmpxchg_i32_aligned_release_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1117 ; -O0-LABEL: cmpxchg_i32_aligned_release_monotonic:
1118 ; -O0: ldaxr w0, [x2]
1120 ; -O0: stlxr w8, w1, [x2]
1122 ; -O1-LABEL: cmpxchg_i32_aligned_release_monotonic:
1123 ; -O1: ldxr w0, [x2]
1125 ; -O1: stlxr w9, w1, [x2]
1126 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release monotonic, align 4
1127 %r = extractvalue { i32, i1 } %pair, 0
1131 define dso_local i32 @cmpxchg_i32_aligned_release_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1132 ; -O0-LABEL: cmpxchg_i32_aligned_release_monotonic_weak:
1133 ; -O0: ldaxr w0, [x2]
1135 ; -O0: stlxr w8, w1, [x2]
1137 ; -O1-LABEL: cmpxchg_i32_aligned_release_monotonic_weak:
1138 ; -O1: ldxr w8, [x2]
1140 ; -O1: stlxr wzr, w1, [x2]
1141 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release monotonic, align 4
1142 %r = extractvalue { i32, i1 } %pair, 0
1146 define dso_local i32 @cmpxchg_i32_aligned_release_acquire(i32 %expected, i32 %new, ptr %ptr) {
1147 ; -O0-LABEL: cmpxchg_i32_aligned_release_acquire:
1148 ; -O0: ldaxr w0, [x2]
1150 ; -O0: stlxr w8, w1, [x2]
1152 ; -O1-LABEL: cmpxchg_i32_aligned_release_acquire:
1153 ; -O1: ldaxr w0, [x2]
1155 ; -O1: stlxr w9, w1, [x2]
1156 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release acquire, align 4
1157 %r = extractvalue { i32, i1 } %pair, 0
1161 define dso_local i32 @cmpxchg_i32_aligned_release_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1162 ; -O0-LABEL: cmpxchg_i32_aligned_release_acquire_weak:
1163 ; -O0: ldaxr w0, [x2]
1165 ; -O0: stlxr w8, w1, [x2]
1167 ; -O1-LABEL: cmpxchg_i32_aligned_release_acquire_weak:
1168 ; -O1: ldaxr w8, [x2]
1170 ; -O1: stlxr wzr, w1, [x2]
1171 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release acquire, align 4
1172 %r = extractvalue { i32, i1 } %pair, 0
1176 define dso_local i32 @cmpxchg_i32_aligned_release_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1177 ; -O0-LABEL: cmpxchg_i32_aligned_release_seq_cst:
1178 ; -O0: ldaxr w0, [x2]
1180 ; -O0: stlxr w8, w1, [x2]
1182 ; -O1-LABEL: cmpxchg_i32_aligned_release_seq_cst:
1183 ; -O1: ldaxr w0, [x2]
1185 ; -O1: stlxr w9, w1, [x2]
1186 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release seq_cst, align 4
1187 %r = extractvalue { i32, i1 } %pair, 0
1191 define dso_local i32 @cmpxchg_i32_aligned_release_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1192 ; -O0-LABEL: cmpxchg_i32_aligned_release_seq_cst_weak:
1193 ; -O0: ldaxr w0, [x2]
1195 ; -O0: stlxr w8, w1, [x2]
1197 ; -O1-LABEL: cmpxchg_i32_aligned_release_seq_cst_weak:
1198 ; -O1: ldaxr w8, [x2]
1200 ; -O1: stlxr wzr, w1, [x2]
1201 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release seq_cst, align 4
1202 %r = extractvalue { i32, i1 } %pair, 0
1206 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1207 ; -O0-LABEL: cmpxchg_i32_aligned_acq_rel_monotonic:
1208 ; -O0: ldaxr w0, [x2]
1210 ; -O0: stlxr w8, w1, [x2]
1212 ; -O1-LABEL: cmpxchg_i32_aligned_acq_rel_monotonic:
1213 ; -O1: ldaxr w0, [x2]
1215 ; -O1: stlxr w9, w1, [x2]
1216 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 4
1217 %r = extractvalue { i32, i1 } %pair, 0
1221 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1222 ; -O0-LABEL: cmpxchg_i32_aligned_acq_rel_monotonic_weak:
1223 ; -O0: ldaxr w0, [x2]
1225 ; -O0: stlxr w8, w1, [x2]
1227 ; -O1-LABEL: cmpxchg_i32_aligned_acq_rel_monotonic_weak:
1228 ; -O1: ldaxr w8, [x2]
1230 ; -O1: stlxr wzr, w1, [x2]
1231 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 4
1232 %r = extractvalue { i32, i1 } %pair, 0
1236 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_acquire(i32 %expected, i32 %new, ptr %ptr) {
1237 ; -O0-LABEL: cmpxchg_i32_aligned_acq_rel_acquire:
1238 ; -O0: ldaxr w0, [x2]
1240 ; -O0: stlxr w8, w1, [x2]
1242 ; -O1-LABEL: cmpxchg_i32_aligned_acq_rel_acquire:
1243 ; -O1: ldaxr w0, [x2]
1245 ; -O1: stlxr w9, w1, [x2]
1246 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 4
1247 %r = extractvalue { i32, i1 } %pair, 0
1251 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1252 ; -O0-LABEL: cmpxchg_i32_aligned_acq_rel_acquire_weak:
1253 ; -O0: ldaxr w0, [x2]
1255 ; -O0: stlxr w8, w1, [x2]
1257 ; -O1-LABEL: cmpxchg_i32_aligned_acq_rel_acquire_weak:
1258 ; -O1: ldaxr w8, [x2]
1260 ; -O1: stlxr wzr, w1, [x2]
1261 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 4
1262 %r = extractvalue { i32, i1 } %pair, 0
1266 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1267 ; -O0-LABEL: cmpxchg_i32_aligned_acq_rel_seq_cst:
1268 ; -O0: ldaxr w0, [x2]
1270 ; -O0: stlxr w8, w1, [x2]
1272 ; -O1-LABEL: cmpxchg_i32_aligned_acq_rel_seq_cst:
1273 ; -O1: ldaxr w0, [x2]
1275 ; -O1: stlxr w9, w1, [x2]
1276 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 4
1277 %r = extractvalue { i32, i1 } %pair, 0
1281 define dso_local i32 @cmpxchg_i32_aligned_acq_rel_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1282 ; -O0-LABEL: cmpxchg_i32_aligned_acq_rel_seq_cst_weak:
1283 ; -O0: ldaxr w0, [x2]
1285 ; -O0: stlxr w8, w1, [x2]
1287 ; -O1-LABEL: cmpxchg_i32_aligned_acq_rel_seq_cst_weak:
1288 ; -O1: ldaxr w8, [x2]
1290 ; -O1: stlxr wzr, w1, [x2]
1291 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 4
1292 %r = extractvalue { i32, i1 } %pair, 0
1296 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_monotonic(i32 %expected, i32 %new, ptr %ptr) {
1297 ; -O0-LABEL: cmpxchg_i32_aligned_seq_cst_monotonic:
1298 ; -O0: ldaxr w0, [x2]
1300 ; -O0: stlxr w8, w1, [x2]
1302 ; -O1-LABEL: cmpxchg_i32_aligned_seq_cst_monotonic:
1303 ; -O1: ldaxr w0, [x2]
1305 ; -O1: stlxr w9, w1, [x2]
1306 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 4
1307 %r = extractvalue { i32, i1 } %pair, 0
1311 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
1312 ; -O0-LABEL: cmpxchg_i32_aligned_seq_cst_monotonic_weak:
1313 ; -O0: ldaxr w0, [x2]
1315 ; -O0: stlxr w8, w1, [x2]
1317 ; -O1-LABEL: cmpxchg_i32_aligned_seq_cst_monotonic_weak:
1318 ; -O1: ldaxr w8, [x2]
1320 ; -O1: stlxr wzr, w1, [x2]
1321 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 4
1322 %r = extractvalue { i32, i1 } %pair, 0
1326 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_acquire(i32 %expected, i32 %new, ptr %ptr) {
1327 ; -O0-LABEL: cmpxchg_i32_aligned_seq_cst_acquire:
1328 ; -O0: ldaxr w0, [x2]
1330 ; -O0: stlxr w8, w1, [x2]
1332 ; -O1-LABEL: cmpxchg_i32_aligned_seq_cst_acquire:
1333 ; -O1: ldaxr w0, [x2]
1335 ; -O1: stlxr w9, w1, [x2]
1336 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 4
1337 %r = extractvalue { i32, i1 } %pair, 0
1341 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
1342 ; -O0-LABEL: cmpxchg_i32_aligned_seq_cst_acquire_weak:
1343 ; -O0: ldaxr w0, [x2]
1345 ; -O0: stlxr w8, w1, [x2]
1347 ; -O1-LABEL: cmpxchg_i32_aligned_seq_cst_acquire_weak:
1348 ; -O1: ldaxr w8, [x2]
1350 ; -O1: stlxr wzr, w1, [x2]
1351 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 4
1352 %r = extractvalue { i32, i1 } %pair, 0
1356 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
1357 ; -O0-LABEL: cmpxchg_i32_aligned_seq_cst_seq_cst:
1358 ; -O0: ldaxr w0, [x2]
1360 ; -O0: stlxr w8, w1, [x2]
1362 ; -O1-LABEL: cmpxchg_i32_aligned_seq_cst_seq_cst:
1363 ; -O1: ldaxr w0, [x2]
1365 ; -O1: stlxr w9, w1, [x2]
1366 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 4
1367 %r = extractvalue { i32, i1 } %pair, 0
1371 define dso_local i32 @cmpxchg_i32_aligned_seq_cst_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
1372 ; -O0-LABEL: cmpxchg_i32_aligned_seq_cst_seq_cst_weak:
1373 ; -O0: ldaxr w0, [x2]
1375 ; -O0: stlxr w8, w1, [x2]
1377 ; -O1-LABEL: cmpxchg_i32_aligned_seq_cst_seq_cst_weak:
1378 ; -O1: ldaxr w8, [x2]
1380 ; -O1: stlxr wzr, w1, [x2]
1381 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 4
1382 %r = extractvalue { i32, i1 } %pair, 0
1386 define dso_local i64 @cmpxchg_i64_aligned_monotonic_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1387 ; -O0-LABEL: cmpxchg_i64_aligned_monotonic_monotonic:
1388 ; -O0: ldaxr x0, [x2]
1390 ; -O0: stlxr w8, x1, [x2]
1392 ; -O1-LABEL: cmpxchg_i64_aligned_monotonic_monotonic:
1393 ; -O1: ldxr x0, [x2]
1395 ; -O1: stxr w9, x1, [x2]
1396 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 8
1397 %r = extractvalue { i64, i1 } %pair, 0
1401 define dso_local i64 @cmpxchg_i64_aligned_monotonic_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1402 ; -O0-LABEL: cmpxchg_i64_aligned_monotonic_monotonic_weak:
1403 ; -O0: ldaxr x0, [x2]
1405 ; -O0: stlxr w8, x1, [x2]
1407 ; -O1-LABEL: cmpxchg_i64_aligned_monotonic_monotonic_weak:
1408 ; -O1: ldxr x8, [x2]
1410 ; -O1: stxr wzr, x1, [x2]
1411 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 8
1412 %r = extractvalue { i64, i1 } %pair, 0
1416 define dso_local i64 @cmpxchg_i64_aligned_monotonic_acquire(i64 %expected, i64 %new, ptr %ptr) {
1417 ; -O0-LABEL: cmpxchg_i64_aligned_monotonic_acquire:
1418 ; -O0: ldaxr x0, [x2]
1420 ; -O0: stlxr w8, x1, [x2]
1422 ; -O1-LABEL: cmpxchg_i64_aligned_monotonic_acquire:
1423 ; -O1: ldaxr x0, [x2]
1425 ; -O1: stxr w9, x1, [x2]
1426 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 8
1427 %r = extractvalue { i64, i1 } %pair, 0
1431 define dso_local i64 @cmpxchg_i64_aligned_monotonic_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1432 ; -O0-LABEL: cmpxchg_i64_aligned_monotonic_acquire_weak:
1433 ; -O0: ldaxr x0, [x2]
1435 ; -O0: stlxr w8, x1, [x2]
1437 ; -O1-LABEL: cmpxchg_i64_aligned_monotonic_acquire_weak:
1438 ; -O1: ldaxr x8, [x2]
1440 ; -O1: stxr wzr, x1, [x2]
1441 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 8
1442 %r = extractvalue { i64, i1 } %pair, 0
1446 define dso_local i64 @cmpxchg_i64_aligned_monotonic_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
1447 ; -O0-LABEL: cmpxchg_i64_aligned_monotonic_seq_cst:
1448 ; -O0: ldaxr x0, [x2]
1450 ; -O0: stlxr w8, x1, [x2]
1452 ; -O1-LABEL: cmpxchg_i64_aligned_monotonic_seq_cst:
1453 ; -O1: ldaxr x0, [x2]
1455 ; -O1: stlxr w9, x1, [x2]
1456 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 8
1457 %r = extractvalue { i64, i1 } %pair, 0
1461 define dso_local i64 @cmpxchg_i64_aligned_monotonic_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
1462 ; -O0-LABEL: cmpxchg_i64_aligned_monotonic_seq_cst_weak:
1463 ; -O0: ldaxr x0, [x2]
1465 ; -O0: stlxr w8, x1, [x2]
1467 ; -O1-LABEL: cmpxchg_i64_aligned_monotonic_seq_cst_weak:
1468 ; -O1: ldaxr x8, [x2]
1470 ; -O1: stlxr wzr, x1, [x2]
1471 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 8
1472 %r = extractvalue { i64, i1 } %pair, 0
1476 define dso_local i64 @cmpxchg_i64_aligned_acquire_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1477 ; -O0-LABEL: cmpxchg_i64_aligned_acquire_monotonic:
1478 ; -O0: ldaxr x0, [x2]
1480 ; -O0: stlxr w8, x1, [x2]
1482 ; -O1-LABEL: cmpxchg_i64_aligned_acquire_monotonic:
1483 ; -O1: ldaxr x0, [x2]
1485 ; -O1: stxr w9, x1, [x2]
1486 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 8
1487 %r = extractvalue { i64, i1 } %pair, 0
1491 define dso_local i64 @cmpxchg_i64_aligned_acquire_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1492 ; -O0-LABEL: cmpxchg_i64_aligned_acquire_monotonic_weak:
1493 ; -O0: ldaxr x0, [x2]
1495 ; -O0: stlxr w8, x1, [x2]
1497 ; -O1-LABEL: cmpxchg_i64_aligned_acquire_monotonic_weak:
1498 ; -O1: ldaxr x8, [x2]
1500 ; -O1: stxr wzr, x1, [x2]
1501 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 8
1502 %r = extractvalue { i64, i1 } %pair, 0
1506 define dso_local i64 @cmpxchg_i64_aligned_acquire_acquire(i64 %expected, i64 %new, ptr %ptr) {
1507 ; -O0-LABEL: cmpxchg_i64_aligned_acquire_acquire:
1508 ; -O0: ldaxr x0, [x2]
1510 ; -O0: stlxr w8, x1, [x2]
1512 ; -O1-LABEL: cmpxchg_i64_aligned_acquire_acquire:
1513 ; -O1: ldaxr x0, [x2]
1515 ; -O1: stxr w9, x1, [x2]
1516 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire acquire, align 8
1517 %r = extractvalue { i64, i1 } %pair, 0
1521 define dso_local i64 @cmpxchg_i64_aligned_acquire_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1522 ; -O0-LABEL: cmpxchg_i64_aligned_acquire_acquire_weak:
1523 ; -O0: ldaxr x0, [x2]
1525 ; -O0: stlxr w8, x1, [x2]
1527 ; -O1-LABEL: cmpxchg_i64_aligned_acquire_acquire_weak:
1528 ; -O1: ldaxr x8, [x2]
1530 ; -O1: stxr wzr, x1, [x2]
1531 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire acquire, align 8
1532 %r = extractvalue { i64, i1 } %pair, 0
1536 define dso_local i64 @cmpxchg_i64_aligned_acquire_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
1537 ; -O0-LABEL: cmpxchg_i64_aligned_acquire_seq_cst:
1538 ; -O0: ldaxr x0, [x2]
1540 ; -O0: stlxr w8, x1, [x2]
1542 ; -O1-LABEL: cmpxchg_i64_aligned_acquire_seq_cst:
1543 ; -O1: ldaxr x0, [x2]
1545 ; -O1: stlxr w9, x1, [x2]
1546 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 8
1547 %r = extractvalue { i64, i1 } %pair, 0
1551 define dso_local i64 @cmpxchg_i64_aligned_acquire_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
1552 ; -O0-LABEL: cmpxchg_i64_aligned_acquire_seq_cst_weak:
1553 ; -O0: ldaxr x0, [x2]
1555 ; -O0: stlxr w8, x1, [x2]
1557 ; -O1-LABEL: cmpxchg_i64_aligned_acquire_seq_cst_weak:
1558 ; -O1: ldaxr x8, [x2]
1560 ; -O1: stlxr wzr, x1, [x2]
1561 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 8
1562 %r = extractvalue { i64, i1 } %pair, 0
1566 define dso_local i64 @cmpxchg_i64_aligned_release_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1567 ; -O0-LABEL: cmpxchg_i64_aligned_release_monotonic:
1568 ; -O0: ldaxr x0, [x2]
1570 ; -O0: stlxr w8, x1, [x2]
1572 ; -O1-LABEL: cmpxchg_i64_aligned_release_monotonic:
1573 ; -O1: ldxr x0, [x2]
1575 ; -O1: stlxr w9, x1, [x2]
1576 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release monotonic, align 8
1577 %r = extractvalue { i64, i1 } %pair, 0
1581 define dso_local i64 @cmpxchg_i64_aligned_release_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1582 ; -O0-LABEL: cmpxchg_i64_aligned_release_monotonic_weak:
1583 ; -O0: ldaxr x0, [x2]
1585 ; -O0: stlxr w8, x1, [x2]
1587 ; -O1-LABEL: cmpxchg_i64_aligned_release_monotonic_weak:
1588 ; -O1: ldxr x8, [x2]
1590 ; -O1: stlxr wzr, x1, [x2]
1591 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release monotonic, align 8
1592 %r = extractvalue { i64, i1 } %pair, 0
1596 define dso_local i64 @cmpxchg_i64_aligned_release_acquire(i64 %expected, i64 %new, ptr %ptr) {
1597 ; -O0-LABEL: cmpxchg_i64_aligned_release_acquire:
1598 ; -O0: ldaxr x0, [x2]
1600 ; -O0: stlxr w8, x1, [x2]
1602 ; -O1-LABEL: cmpxchg_i64_aligned_release_acquire:
1603 ; -O1: ldaxr x0, [x2]
1605 ; -O1: stlxr w9, x1, [x2]
1606 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release acquire, align 8
1607 %r = extractvalue { i64, i1 } %pair, 0
1611 define dso_local i64 @cmpxchg_i64_aligned_release_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1612 ; -O0-LABEL: cmpxchg_i64_aligned_release_acquire_weak:
1613 ; -O0: ldaxr x0, [x2]
1615 ; -O0: stlxr w8, x1, [x2]
1617 ; -O1-LABEL: cmpxchg_i64_aligned_release_acquire_weak:
1618 ; -O1: ldaxr x8, [x2]
1620 ; -O1: stlxr wzr, x1, [x2]
1621 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release acquire, align 8
1622 %r = extractvalue { i64, i1 } %pair, 0
1626 define dso_local i64 @cmpxchg_i64_aligned_release_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
1627 ; -O0-LABEL: cmpxchg_i64_aligned_release_seq_cst:
1628 ; -O0: ldaxr x0, [x2]
1630 ; -O0: stlxr w8, x1, [x2]
1632 ; -O1-LABEL: cmpxchg_i64_aligned_release_seq_cst:
1633 ; -O1: ldaxr x0, [x2]
1635 ; -O1: stlxr w9, x1, [x2]
1636 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release seq_cst, align 8
1637 %r = extractvalue { i64, i1 } %pair, 0
1641 define dso_local i64 @cmpxchg_i64_aligned_release_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
1642 ; -O0-LABEL: cmpxchg_i64_aligned_release_seq_cst_weak:
1643 ; -O0: ldaxr x0, [x2]
1645 ; -O0: stlxr w8, x1, [x2]
1647 ; -O1-LABEL: cmpxchg_i64_aligned_release_seq_cst_weak:
1648 ; -O1: ldaxr x8, [x2]
1650 ; -O1: stlxr wzr, x1, [x2]
1651 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release seq_cst, align 8
1652 %r = extractvalue { i64, i1 } %pair, 0
1656 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1657 ; -O0-LABEL: cmpxchg_i64_aligned_acq_rel_monotonic:
1658 ; -O0: ldaxr x0, [x2]
1660 ; -O0: stlxr w8, x1, [x2]
1662 ; -O1-LABEL: cmpxchg_i64_aligned_acq_rel_monotonic:
1663 ; -O1: ldaxr x0, [x2]
1665 ; -O1: stlxr w9, x1, [x2]
1666 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 8
1667 %r = extractvalue { i64, i1 } %pair, 0
1671 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1672 ; -O0-LABEL: cmpxchg_i64_aligned_acq_rel_monotonic_weak:
1673 ; -O0: ldaxr x0, [x2]
1675 ; -O0: stlxr w8, x1, [x2]
1677 ; -O1-LABEL: cmpxchg_i64_aligned_acq_rel_monotonic_weak:
1678 ; -O1: ldaxr x8, [x2]
1680 ; -O1: stlxr wzr, x1, [x2]
1681 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 8
1682 %r = extractvalue { i64, i1 } %pair, 0
1686 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_acquire(i64 %expected, i64 %new, ptr %ptr) {
1687 ; -O0-LABEL: cmpxchg_i64_aligned_acq_rel_acquire:
1688 ; -O0: ldaxr x0, [x2]
1690 ; -O0: stlxr w8, x1, [x2]
1692 ; -O1-LABEL: cmpxchg_i64_aligned_acq_rel_acquire:
1693 ; -O1: ldaxr x0, [x2]
1695 ; -O1: stlxr w9, x1, [x2]
1696 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 8
1697 %r = extractvalue { i64, i1 } %pair, 0
1701 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1702 ; -O0-LABEL: cmpxchg_i64_aligned_acq_rel_acquire_weak:
1703 ; -O0: ldaxr x0, [x2]
1705 ; -O0: stlxr w8, x1, [x2]
1707 ; -O1-LABEL: cmpxchg_i64_aligned_acq_rel_acquire_weak:
1708 ; -O1: ldaxr x8, [x2]
1710 ; -O1: stlxr wzr, x1, [x2]
1711 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 8
1712 %r = extractvalue { i64, i1 } %pair, 0
1716 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
1717 ; -O0-LABEL: cmpxchg_i64_aligned_acq_rel_seq_cst:
1718 ; -O0: ldaxr x0, [x2]
1720 ; -O0: stlxr w8, x1, [x2]
1722 ; -O1-LABEL: cmpxchg_i64_aligned_acq_rel_seq_cst:
1723 ; -O1: ldaxr x0, [x2]
1725 ; -O1: stlxr w9, x1, [x2]
1726 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 8
1727 %r = extractvalue { i64, i1 } %pair, 0
1731 define dso_local i64 @cmpxchg_i64_aligned_acq_rel_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
1732 ; -O0-LABEL: cmpxchg_i64_aligned_acq_rel_seq_cst_weak:
1733 ; -O0: ldaxr x0, [x2]
1735 ; -O0: stlxr w8, x1, [x2]
1737 ; -O1-LABEL: cmpxchg_i64_aligned_acq_rel_seq_cst_weak:
1738 ; -O1: ldaxr x8, [x2]
1740 ; -O1: stlxr wzr, x1, [x2]
1741 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 8
1742 %r = extractvalue { i64, i1 } %pair, 0
1746 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_monotonic(i64 %expected, i64 %new, ptr %ptr) {
1747 ; -O0-LABEL: cmpxchg_i64_aligned_seq_cst_monotonic:
1748 ; -O0: ldaxr x0, [x2]
1750 ; -O0: stlxr w8, x1, [x2]
1752 ; -O1-LABEL: cmpxchg_i64_aligned_seq_cst_monotonic:
1753 ; -O1: ldaxr x0, [x2]
1755 ; -O1: stlxr w9, x1, [x2]
1756 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 8
1757 %r = extractvalue { i64, i1 } %pair, 0
1761 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
1762 ; -O0-LABEL: cmpxchg_i64_aligned_seq_cst_monotonic_weak:
1763 ; -O0: ldaxr x0, [x2]
1765 ; -O0: stlxr w8, x1, [x2]
1767 ; -O1-LABEL: cmpxchg_i64_aligned_seq_cst_monotonic_weak:
1768 ; -O1: ldaxr x8, [x2]
1770 ; -O1: stlxr wzr, x1, [x2]
1771 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 8
1772 %r = extractvalue { i64, i1 } %pair, 0
1776 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_acquire(i64 %expected, i64 %new, ptr %ptr) {
1777 ; -O0-LABEL: cmpxchg_i64_aligned_seq_cst_acquire:
1778 ; -O0: ldaxr x0, [x2]
1780 ; -O0: stlxr w8, x1, [x2]
1782 ; -O1-LABEL: cmpxchg_i64_aligned_seq_cst_acquire:
1783 ; -O1: ldaxr x0, [x2]
1785 ; -O1: stlxr w9, x1, [x2]
1786 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 8
1787 %r = extractvalue { i64, i1 } %pair, 0
1791 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
1792 ; -O0-LABEL: cmpxchg_i64_aligned_seq_cst_acquire_weak:
1793 ; -O0: ldaxr x0, [x2]
1795 ; -O0: stlxr w8, x1, [x2]
1797 ; -O1-LABEL: cmpxchg_i64_aligned_seq_cst_acquire_weak:
1798 ; -O1: ldaxr x8, [x2]
1800 ; -O1: stlxr wzr, x1, [x2]
1801 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 8
1802 %r = extractvalue { i64, i1 } %pair, 0
1806 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
1807 ; -O0-LABEL: cmpxchg_i64_aligned_seq_cst_seq_cst:
1808 ; -O0: ldaxr x0, [x2]
1810 ; -O0: stlxr w8, x1, [x2]
1812 ; -O1-LABEL: cmpxchg_i64_aligned_seq_cst_seq_cst:
1813 ; -O1: ldaxr x0, [x2]
1815 ; -O1: stlxr w9, x1, [x2]
1816 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 8
1817 %r = extractvalue { i64, i1 } %pair, 0
1821 define dso_local i64 @cmpxchg_i64_aligned_seq_cst_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
1822 ; -O0-LABEL: cmpxchg_i64_aligned_seq_cst_seq_cst_weak:
1823 ; -O0: ldaxr x0, [x2]
1825 ; -O0: stlxr w8, x1, [x2]
1827 ; -O1-LABEL: cmpxchg_i64_aligned_seq_cst_seq_cst_weak:
1828 ; -O1: ldaxr x8, [x2]
1830 ; -O1: stlxr wzr, x1, [x2]
1831 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 8
1832 %r = extractvalue { i64, i1 } %pair, 0
1836 define dso_local i128 @cmpxchg_i128_aligned_monotonic_monotonic(i128 %expected, i128 %new, ptr %ptr) {
1837 ; -O0-LABEL: cmpxchg_i128_aligned_monotonic_monotonic:
1838 ; -O0: ldxp x0, x1, [x4]
1841 ; -O0: stxp w8, x2, x3, [x4]
1842 ; -O0: stxp w8, x0, x1, [x4]
1844 ; -O1-LABEL: cmpxchg_i128_aligned_monotonic_monotonic:
1845 ; -O1: ldxp x8, x9, [x4]
1848 ; -O1: stxp w10, x8, x9, [x4]
1849 ; -O1: stxp w10, x2, x3, [x4]
1850 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 16
1851 %r = extractvalue { i128, i1 } %pair, 0
1855 define dso_local i128 @cmpxchg_i128_aligned_monotonic_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
1856 ; -O0-LABEL: cmpxchg_i128_aligned_monotonic_monotonic_weak:
1857 ; -O0: ldxp x0, x1, [x4]
1860 ; -O0: stxp w8, x2, x3, [x4]
1861 ; -O0: stxp w8, x0, x1, [x4]
1863 ; -O1-LABEL: cmpxchg_i128_aligned_monotonic_monotonic_weak:
1864 ; -O1: ldxp x8, x9, [x4]
1867 ; -O1: stxp w10, x8, x9, [x4]
1868 ; -O1: stxp w10, x2, x3, [x4]
1869 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 16
1870 %r = extractvalue { i128, i1 } %pair, 0
1874 define dso_local i128 @cmpxchg_i128_aligned_monotonic_acquire(i128 %expected, i128 %new, ptr %ptr) {
1875 ; -O0-LABEL: cmpxchg_i128_aligned_monotonic_acquire:
1876 ; -O0: ldaxp x0, x1, [x4]
1879 ; -O0: stxp w8, x2, x3, [x4]
1880 ; -O0: stxp w8, x0, x1, [x4]
1882 ; -O1-LABEL: cmpxchg_i128_aligned_monotonic_acquire:
1883 ; -O1: ldaxp x8, x9, [x4]
1886 ; -O1: stxp w10, x8, x9, [x4]
1887 ; -O1: stxp w10, x2, x3, [x4]
1888 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 16
1889 %r = extractvalue { i128, i1 } %pair, 0
1893 define dso_local i128 @cmpxchg_i128_aligned_monotonic_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
1894 ; -O0-LABEL: cmpxchg_i128_aligned_monotonic_acquire_weak:
1895 ; -O0: ldaxp x0, x1, [x4]
1898 ; -O0: stxp w8, x2, x3, [x4]
1899 ; -O0: stxp w8, x0, x1, [x4]
1901 ; -O1-LABEL: cmpxchg_i128_aligned_monotonic_acquire_weak:
1902 ; -O1: ldaxp x8, x9, [x4]
1905 ; -O1: stxp w10, x8, x9, [x4]
1906 ; -O1: stxp w10, x2, x3, [x4]
1907 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 16
1908 %r = extractvalue { i128, i1 } %pair, 0
1912 define dso_local i128 @cmpxchg_i128_aligned_monotonic_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
1913 ; -O0-LABEL: cmpxchg_i128_aligned_monotonic_seq_cst:
1914 ; -O0: ldaxp x0, x1, [x4]
1917 ; -O0: stlxp w8, x2, x3, [x4]
1918 ; -O0: stlxp w8, x0, x1, [x4]
1920 ; -O1-LABEL: cmpxchg_i128_aligned_monotonic_seq_cst:
1921 ; -O1: ldaxp x8, x9, [x4]
1924 ; -O1: stlxp w10, x8, x9, [x4]
1925 ; -O1: stlxp w10, x2, x3, [x4]
1926 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 16
1927 %r = extractvalue { i128, i1 } %pair, 0
1931 define dso_local i128 @cmpxchg_i128_aligned_monotonic_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
1932 ; -O0-LABEL: cmpxchg_i128_aligned_monotonic_seq_cst_weak:
1933 ; -O0: ldaxp x0, x1, [x4]
1936 ; -O0: stlxp w8, x2, x3, [x4]
1937 ; -O0: stlxp w8, x0, x1, [x4]
1939 ; -O1-LABEL: cmpxchg_i128_aligned_monotonic_seq_cst_weak:
1940 ; -O1: ldaxp x8, x9, [x4]
1943 ; -O1: stlxp w10, x8, x9, [x4]
1944 ; -O1: stlxp w10, x2, x3, [x4]
1945 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 16
1946 %r = extractvalue { i128, i1 } %pair, 0
1950 define dso_local i128 @cmpxchg_i128_aligned_acquire_monotonic(i128 %expected, i128 %new, ptr %ptr) {
1951 ; -O0-LABEL: cmpxchg_i128_aligned_acquire_monotonic:
1952 ; -O0: ldaxp x0, x1, [x4]
1955 ; -O0: stxp w8, x2, x3, [x4]
1956 ; -O0: stxp w8, x0, x1, [x4]
1958 ; -O1-LABEL: cmpxchg_i128_aligned_acquire_monotonic:
1959 ; -O1: ldaxp x8, x9, [x4]
1962 ; -O1: stxp w10, x8, x9, [x4]
1963 ; -O1: stxp w10, x2, x3, [x4]
1964 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 16
1965 %r = extractvalue { i128, i1 } %pair, 0
1969 define dso_local i128 @cmpxchg_i128_aligned_acquire_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
1970 ; -O0-LABEL: cmpxchg_i128_aligned_acquire_monotonic_weak:
1971 ; -O0: ldaxp x0, x1, [x4]
1974 ; -O0: stxp w8, x2, x3, [x4]
1975 ; -O0: stxp w8, x0, x1, [x4]
1977 ; -O1-LABEL: cmpxchg_i128_aligned_acquire_monotonic_weak:
1978 ; -O1: ldaxp x8, x9, [x4]
1981 ; -O1: stxp w10, x8, x9, [x4]
1982 ; -O1: stxp w10, x2, x3, [x4]
1983 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 16
1984 %r = extractvalue { i128, i1 } %pair, 0
1988 define dso_local i128 @cmpxchg_i128_aligned_acquire_acquire(i128 %expected, i128 %new, ptr %ptr) {
1989 ; -O0-LABEL: cmpxchg_i128_aligned_acquire_acquire:
1990 ; -O0: ldaxp x0, x1, [x4]
1993 ; -O0: stxp w8, x2, x3, [x4]
1994 ; -O0: stxp w8, x0, x1, [x4]
1996 ; -O1-LABEL: cmpxchg_i128_aligned_acquire_acquire:
1997 ; -O1: ldaxp x8, x9, [x4]
2000 ; -O1: stxp w10, x8, x9, [x4]
2001 ; -O1: stxp w10, x2, x3, [x4]
2002 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire acquire, align 16
2003 %r = extractvalue { i128, i1 } %pair, 0
2007 define dso_local i128 @cmpxchg_i128_aligned_acquire_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2008 ; -O0-LABEL: cmpxchg_i128_aligned_acquire_acquire_weak:
2009 ; -O0: ldaxp x0, x1, [x4]
2012 ; -O0: stxp w8, x2, x3, [x4]
2013 ; -O0: stxp w8, x0, x1, [x4]
2015 ; -O1-LABEL: cmpxchg_i128_aligned_acquire_acquire_weak:
2016 ; -O1: ldaxp x8, x9, [x4]
2019 ; -O1: stxp w10, x8, x9, [x4]
2020 ; -O1: stxp w10, x2, x3, [x4]
2021 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire acquire, align 16
2022 %r = extractvalue { i128, i1 } %pair, 0
2026 define dso_local i128 @cmpxchg_i128_aligned_acquire_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2027 ; -O0-LABEL: cmpxchg_i128_aligned_acquire_seq_cst:
2028 ; -O0: ldaxp x0, x1, [x4]
2031 ; -O0: stlxp w8, x2, x3, [x4]
2032 ; -O0: stlxp w8, x0, x1, [x4]
2034 ; -O1-LABEL: cmpxchg_i128_aligned_acquire_seq_cst:
2035 ; -O1: ldaxp x8, x9, [x4]
2038 ; -O1: stlxp w10, x8, x9, [x4]
2039 ; -O1: stlxp w10, x2, x3, [x4]
2040 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 16
2041 %r = extractvalue { i128, i1 } %pair, 0
2045 define dso_local i128 @cmpxchg_i128_aligned_acquire_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2046 ; -O0-LABEL: cmpxchg_i128_aligned_acquire_seq_cst_weak:
2047 ; -O0: ldaxp x0, x1, [x4]
2050 ; -O0: stlxp w8, x2, x3, [x4]
2051 ; -O0: stlxp w8, x0, x1, [x4]
2053 ; -O1-LABEL: cmpxchg_i128_aligned_acquire_seq_cst_weak:
2054 ; -O1: ldaxp x8, x9, [x4]
2057 ; -O1: stlxp w10, x8, x9, [x4]
2058 ; -O1: stlxp w10, x2, x3, [x4]
2059 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 16
2060 %r = extractvalue { i128, i1 } %pair, 0
2064 define dso_local i128 @cmpxchg_i128_aligned_release_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2065 ; -O0-LABEL: cmpxchg_i128_aligned_release_monotonic:
2066 ; -O0: ldxp x0, x1, [x4]
2069 ; -O0: stlxp w8, x2, x3, [x4]
2070 ; -O0: stlxp w8, x0, x1, [x4]
2072 ; -O1-LABEL: cmpxchg_i128_aligned_release_monotonic:
2073 ; -O1: ldxp x8, x9, [x4]
2076 ; -O1: stlxp w10, x8, x9, [x4]
2077 ; -O1: stlxp w10, x2, x3, [x4]
2078 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release monotonic, align 16
2079 %r = extractvalue { i128, i1 } %pair, 0
2083 define dso_local i128 @cmpxchg_i128_aligned_release_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2084 ; -O0-LABEL: cmpxchg_i128_aligned_release_monotonic_weak:
2085 ; -O0: ldxp x0, x1, [x4]
2088 ; -O0: stlxp w8, x2, x3, [x4]
2089 ; -O0: stlxp w8, x0, x1, [x4]
2091 ; -O1-LABEL: cmpxchg_i128_aligned_release_monotonic_weak:
2092 ; -O1: ldxp x8, x9, [x4]
2095 ; -O1: stlxp w10, x8, x9, [x4]
2096 ; -O1: stlxp w10, x2, x3, [x4]
2097 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release monotonic, align 16
2098 %r = extractvalue { i128, i1 } %pair, 0
2102 define dso_local i128 @cmpxchg_i128_aligned_release_acquire(i128 %expected, i128 %new, ptr %ptr) {
2103 ; -O0-LABEL: cmpxchg_i128_aligned_release_acquire:
2104 ; -O0: ldaxp x0, x1, [x4]
2107 ; -O0: stlxp w8, x2, x3, [x4]
2108 ; -O0: stlxp w8, x0, x1, [x4]
2110 ; -O1-LABEL: cmpxchg_i128_aligned_release_acquire:
2111 ; -O1: ldaxp x8, x9, [x4]
2114 ; -O1: stlxp w10, x8, x9, [x4]
2115 ; -O1: stlxp w10, x2, x3, [x4]
2116 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release acquire, align 16
2117 %r = extractvalue { i128, i1 } %pair, 0
2121 define dso_local i128 @cmpxchg_i128_aligned_release_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2122 ; -O0-LABEL: cmpxchg_i128_aligned_release_acquire_weak:
2123 ; -O0: ldaxp x0, x1, [x4]
2126 ; -O0: stlxp w8, x2, x3, [x4]
2127 ; -O0: stlxp w8, x0, x1, [x4]
2129 ; -O1-LABEL: cmpxchg_i128_aligned_release_acquire_weak:
2130 ; -O1: ldaxp x8, x9, [x4]
2133 ; -O1: stlxp w10, x8, x9, [x4]
2134 ; -O1: stlxp w10, x2, x3, [x4]
2135 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release acquire, align 16
2136 %r = extractvalue { i128, i1 } %pair, 0
2140 define dso_local i128 @cmpxchg_i128_aligned_release_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2141 ; -O0-LABEL: cmpxchg_i128_aligned_release_seq_cst:
2142 ; -O0: ldaxp x0, x1, [x4]
2145 ; -O0: stlxp w8, x2, x3, [x4]
2146 ; -O0: stlxp w8, x0, x1, [x4]
2148 ; -O1-LABEL: cmpxchg_i128_aligned_release_seq_cst:
2149 ; -O1: ldaxp x8, x9, [x4]
2152 ; -O1: stlxp w10, x8, x9, [x4]
2153 ; -O1: stlxp w10, x2, x3, [x4]
2154 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release seq_cst, align 16
2155 %r = extractvalue { i128, i1 } %pair, 0
2159 define dso_local i128 @cmpxchg_i128_aligned_release_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2160 ; -O0-LABEL: cmpxchg_i128_aligned_release_seq_cst_weak:
2161 ; -O0: ldaxp x0, x1, [x4]
2164 ; -O0: stlxp w8, x2, x3, [x4]
2165 ; -O0: stlxp w8, x0, x1, [x4]
2167 ; -O1-LABEL: cmpxchg_i128_aligned_release_seq_cst_weak:
2168 ; -O1: ldaxp x8, x9, [x4]
2171 ; -O1: stlxp w10, x8, x9, [x4]
2172 ; -O1: stlxp w10, x2, x3, [x4]
2173 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release seq_cst, align 16
2174 %r = extractvalue { i128, i1 } %pair, 0
2178 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2179 ; -O0-LABEL: cmpxchg_i128_aligned_acq_rel_monotonic:
2180 ; -O0: ldaxp x0, x1, [x4]
2183 ; -O0: stlxp w8, x2, x3, [x4]
2184 ; -O0: stlxp w8, x0, x1, [x4]
2186 ; -O1-LABEL: cmpxchg_i128_aligned_acq_rel_monotonic:
2187 ; -O1: ldaxp x8, x9, [x4]
2190 ; -O1: stlxp w10, x8, x9, [x4]
2191 ; -O1: stlxp w10, x2, x3, [x4]
2192 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 16
2193 %r = extractvalue { i128, i1 } %pair, 0
2197 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2198 ; -O0-LABEL: cmpxchg_i128_aligned_acq_rel_monotonic_weak:
2199 ; -O0: ldaxp x0, x1, [x4]
2202 ; -O0: stlxp w8, x2, x3, [x4]
2203 ; -O0: stlxp w8, x0, x1, [x4]
2205 ; -O1-LABEL: cmpxchg_i128_aligned_acq_rel_monotonic_weak:
2206 ; -O1: ldaxp x8, x9, [x4]
2209 ; -O1: stlxp w10, x8, x9, [x4]
2210 ; -O1: stlxp w10, x2, x3, [x4]
2211 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 16
2212 %r = extractvalue { i128, i1 } %pair, 0
2216 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_acquire(i128 %expected, i128 %new, ptr %ptr) {
2217 ; -O0-LABEL: cmpxchg_i128_aligned_acq_rel_acquire:
2218 ; -O0: ldaxp x0, x1, [x4]
2221 ; -O0: stlxp w8, x2, x3, [x4]
2222 ; -O0: stlxp w8, x0, x1, [x4]
2224 ; -O1-LABEL: cmpxchg_i128_aligned_acq_rel_acquire:
2225 ; -O1: ldaxp x8, x9, [x4]
2228 ; -O1: stlxp w10, x8, x9, [x4]
2229 ; -O1: stlxp w10, x2, x3, [x4]
2230 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 16
2231 %r = extractvalue { i128, i1 } %pair, 0
2235 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2236 ; -O0-LABEL: cmpxchg_i128_aligned_acq_rel_acquire_weak:
2237 ; -O0: ldaxp x0, x1, [x4]
2240 ; -O0: stlxp w8, x2, x3, [x4]
2241 ; -O0: stlxp w8, x0, x1, [x4]
2243 ; -O1-LABEL: cmpxchg_i128_aligned_acq_rel_acquire_weak:
2244 ; -O1: ldaxp x8, x9, [x4]
2247 ; -O1: stlxp w10, x8, x9, [x4]
2248 ; -O1: stlxp w10, x2, x3, [x4]
2249 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 16
2250 %r = extractvalue { i128, i1 } %pair, 0
2254 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2255 ; -O0-LABEL: cmpxchg_i128_aligned_acq_rel_seq_cst:
2256 ; -O0: ldaxp x0, x1, [x4]
2259 ; -O0: stlxp w8, x2, x3, [x4]
2260 ; -O0: stlxp w8, x0, x1, [x4]
2262 ; -O1-LABEL: cmpxchg_i128_aligned_acq_rel_seq_cst:
2263 ; -O1: ldaxp x8, x9, [x4]
2266 ; -O1: stlxp w10, x8, x9, [x4]
2267 ; -O1: stlxp w10, x2, x3, [x4]
2268 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 16
2269 %r = extractvalue { i128, i1 } %pair, 0
2273 define dso_local i128 @cmpxchg_i128_aligned_acq_rel_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2274 ; -O0-LABEL: cmpxchg_i128_aligned_acq_rel_seq_cst_weak:
2275 ; -O0: ldaxp x0, x1, [x4]
2278 ; -O0: stlxp w8, x2, x3, [x4]
2279 ; -O0: stlxp w8, x0, x1, [x4]
2281 ; -O1-LABEL: cmpxchg_i128_aligned_acq_rel_seq_cst_weak:
2282 ; -O1: ldaxp x8, x9, [x4]
2285 ; -O1: stlxp w10, x8, x9, [x4]
2286 ; -O1: stlxp w10, x2, x3, [x4]
2287 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 16
2288 %r = extractvalue { i128, i1 } %pair, 0
2292 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_monotonic(i128 %expected, i128 %new, ptr %ptr) {
2293 ; -O0-LABEL: cmpxchg_i128_aligned_seq_cst_monotonic:
2294 ; -O0: ldaxp x0, x1, [x4]
2297 ; -O0: stlxp w8, x2, x3, [x4]
2298 ; -O0: stlxp w8, x0, x1, [x4]
2300 ; -O1-LABEL: cmpxchg_i128_aligned_seq_cst_monotonic:
2301 ; -O1: ldaxp x8, x9, [x4]
2304 ; -O1: stlxp w10, x8, x9, [x4]
2305 ; -O1: stlxp w10, x2, x3, [x4]
2306 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 16
2307 %r = extractvalue { i128, i1 } %pair, 0
2311 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
2312 ; -O0-LABEL: cmpxchg_i128_aligned_seq_cst_monotonic_weak:
2313 ; -O0: ldaxp x0, x1, [x4]
2316 ; -O0: stlxp w8, x2, x3, [x4]
2317 ; -O0: stlxp w8, x0, x1, [x4]
2319 ; -O1-LABEL: cmpxchg_i128_aligned_seq_cst_monotonic_weak:
2320 ; -O1: ldaxp x8, x9, [x4]
2323 ; -O1: stlxp w10, x8, x9, [x4]
2324 ; -O1: stlxp w10, x2, x3, [x4]
2325 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 16
2326 %r = extractvalue { i128, i1 } %pair, 0
2330 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_acquire(i128 %expected, i128 %new, ptr %ptr) {
2331 ; -O0-LABEL: cmpxchg_i128_aligned_seq_cst_acquire:
2332 ; -O0: ldaxp x0, x1, [x4]
2335 ; -O0: stlxp w8, x2, x3, [x4]
2336 ; -O0: stlxp w8, x0, x1, [x4]
2338 ; -O1-LABEL: cmpxchg_i128_aligned_seq_cst_acquire:
2339 ; -O1: ldaxp x8, x9, [x4]
2342 ; -O1: stlxp w10, x8, x9, [x4]
2343 ; -O1: stlxp w10, x2, x3, [x4]
2344 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 16
2345 %r = extractvalue { i128, i1 } %pair, 0
2349 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
2350 ; -O0-LABEL: cmpxchg_i128_aligned_seq_cst_acquire_weak:
2351 ; -O0: ldaxp x0, x1, [x4]
2354 ; -O0: stlxp w8, x2, x3, [x4]
2355 ; -O0: stlxp w8, x0, x1, [x4]
2357 ; -O1-LABEL: cmpxchg_i128_aligned_seq_cst_acquire_weak:
2358 ; -O1: ldaxp x8, x9, [x4]
2361 ; -O1: stlxp w10, x8, x9, [x4]
2362 ; -O1: stlxp w10, x2, x3, [x4]
2363 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 16
2364 %r = extractvalue { i128, i1 } %pair, 0
2368 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
2369 ; -O0-LABEL: cmpxchg_i128_aligned_seq_cst_seq_cst:
2370 ; -O0: ldaxp x0, x1, [x4]
2373 ; -O0: stlxp w8, x2, x3, [x4]
2374 ; -O0: stlxp w8, x0, x1, [x4]
2376 ; -O1-LABEL: cmpxchg_i128_aligned_seq_cst_seq_cst:
2377 ; -O1: ldaxp x8, x9, [x4]
2380 ; -O1: stlxp w10, x8, x9, [x4]
2381 ; -O1: stlxp w10, x2, x3, [x4]
2382 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 16
2383 %r = extractvalue { i128, i1 } %pair, 0
2387 define dso_local i128 @cmpxchg_i128_aligned_seq_cst_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
2388 ; -O0-LABEL: cmpxchg_i128_aligned_seq_cst_seq_cst_weak:
2389 ; -O0: ldaxp x0, x1, [x4]
2392 ; -O0: stlxp w8, x2, x3, [x4]
2393 ; -O0: stlxp w8, x0, x1, [x4]
2395 ; -O1-LABEL: cmpxchg_i128_aligned_seq_cst_seq_cst_weak:
2396 ; -O1: ldaxp x8, x9, [x4]
2399 ; -O1: stlxp w10, x8, x9, [x4]
2400 ; -O1: stlxp w10, x2, x3, [x4]
2401 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 16
2402 %r = extractvalue { i128, i1 } %pair, 0
2406 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_monotonic(i8 %expected, i8 %new, ptr %ptr) {
2407 ; -O0-LABEL: cmpxchg_i8_unaligned_monotonic_monotonic:
2408 ; -O0: ldaxrb w0, [x2]
2409 ; -O0: cmp w0, w9, uxtb
2410 ; -O0: stlxrb w8, w1, [x2]
2412 ; -O1-LABEL: cmpxchg_i8_unaligned_monotonic_monotonic:
2413 ; -O1: and w8, w0, #0xff
2414 ; -O1: ldxrb w0, [x2]
2416 ; -O1: stxrb w9, w1, [x2]
2417 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
2418 %r = extractvalue { i8, i1 } %pair, 0
2422 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
2423 ; -O0-LABEL: cmpxchg_i8_unaligned_monotonic_monotonic_weak:
2424 ; -O0: ldaxrb w0, [x2]
2425 ; -O0: cmp w0, w9, uxtb
2426 ; -O0: stlxrb w8, w1, [x2]
2428 ; -O1-LABEL: cmpxchg_i8_unaligned_monotonic_monotonic_weak:
2429 ; -O1: ldxrb w8, [x2]
2430 ; -O1: cmp w8, w0, uxtb
2431 ; -O1: stxrb wzr, w1, [x2]
2432 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic monotonic, align 1
2433 %r = extractvalue { i8, i1 } %pair, 0
2437 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_acquire(i8 %expected, i8 %new, ptr %ptr) {
2438 ; -O0-LABEL: cmpxchg_i8_unaligned_monotonic_acquire:
2439 ; -O0: ldaxrb w0, [x2]
2440 ; -O0: cmp w0, w9, uxtb
2441 ; -O0: stlxrb w8, w1, [x2]
2443 ; -O1-LABEL: cmpxchg_i8_unaligned_monotonic_acquire:
2444 ; -O1: and w8, w0, #0xff
2445 ; -O1: ldaxrb w0, [x2]
2447 ; -O1: stxrb w9, w1, [x2]
2448 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
2449 %r = extractvalue { i8, i1 } %pair, 0
2453 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
2454 ; -O0-LABEL: cmpxchg_i8_unaligned_monotonic_acquire_weak:
2455 ; -O0: ldaxrb w0, [x2]
2456 ; -O0: cmp w0, w9, uxtb
2457 ; -O0: stlxrb w8, w1, [x2]
2459 ; -O1-LABEL: cmpxchg_i8_unaligned_monotonic_acquire_weak:
2460 ; -O1: ldaxrb w8, [x2]
2461 ; -O1: cmp w8, w0, uxtb
2462 ; -O1: stxrb wzr, w1, [x2]
2463 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic acquire, align 1
2464 %r = extractvalue { i8, i1 } %pair, 0
2468 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
2469 ; -O0-LABEL: cmpxchg_i8_unaligned_monotonic_seq_cst:
2470 ; -O0: ldaxrb w0, [x2]
2471 ; -O0: cmp w0, w9, uxtb
2472 ; -O0: stlxrb w8, w1, [x2]
2474 ; -O1-LABEL: cmpxchg_i8_unaligned_monotonic_seq_cst:
2475 ; -O1: and w8, w0, #0xff
2476 ; -O1: ldaxrb w0, [x2]
2478 ; -O1: stlxrb w9, w1, [x2]
2479 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
2480 %r = extractvalue { i8, i1 } %pair, 0
2484 define dso_local i8 @cmpxchg_i8_unaligned_monotonic_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
2485 ; -O0-LABEL: cmpxchg_i8_unaligned_monotonic_seq_cst_weak:
2486 ; -O0: ldaxrb w0, [x2]
2487 ; -O0: cmp w0, w9, uxtb
2488 ; -O0: stlxrb w8, w1, [x2]
2490 ; -O1-LABEL: cmpxchg_i8_unaligned_monotonic_seq_cst_weak:
2491 ; -O1: ldaxrb w8, [x2]
2492 ; -O1: cmp w8, w0, uxtb
2493 ; -O1: stlxrb wzr, w1, [x2]
2494 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new monotonic seq_cst, align 1
2495 %r = extractvalue { i8, i1 } %pair, 0
2499 define dso_local i8 @cmpxchg_i8_unaligned_acquire_monotonic(i8 %expected, i8 %new, ptr %ptr) {
2500 ; -O0-LABEL: cmpxchg_i8_unaligned_acquire_monotonic:
2501 ; -O0: ldaxrb w0, [x2]
2502 ; -O0: cmp w0, w9, uxtb
2503 ; -O0: stlxrb w8, w1, [x2]
2505 ; -O1-LABEL: cmpxchg_i8_unaligned_acquire_monotonic:
2506 ; -O1: and w8, w0, #0xff
2507 ; -O1: ldaxrb w0, [x2]
2509 ; -O1: stxrb w9, w1, [x2]
2510 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
2511 %r = extractvalue { i8, i1 } %pair, 0
2515 define dso_local i8 @cmpxchg_i8_unaligned_acquire_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
2516 ; -O0-LABEL: cmpxchg_i8_unaligned_acquire_monotonic_weak:
2517 ; -O0: ldaxrb w0, [x2]
2518 ; -O0: cmp w0, w9, uxtb
2519 ; -O0: stlxrb w8, w1, [x2]
2521 ; -O1-LABEL: cmpxchg_i8_unaligned_acquire_monotonic_weak:
2522 ; -O1: ldaxrb w8, [x2]
2523 ; -O1: cmp w8, w0, uxtb
2524 ; -O1: stxrb wzr, w1, [x2]
2525 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire monotonic, align 1
2526 %r = extractvalue { i8, i1 } %pair, 0
2530 define dso_local i8 @cmpxchg_i8_unaligned_acquire_acquire(i8 %expected, i8 %new, ptr %ptr) {
2531 ; -O0-LABEL: cmpxchg_i8_unaligned_acquire_acquire:
2532 ; -O0: ldaxrb w0, [x2]
2533 ; -O0: cmp w0, w9, uxtb
2534 ; -O0: stlxrb w8, w1, [x2]
2536 ; -O1-LABEL: cmpxchg_i8_unaligned_acquire_acquire:
2537 ; -O1: and w8, w0, #0xff
2538 ; -O1: ldaxrb w0, [x2]
2540 ; -O1: stxrb w9, w1, [x2]
2541 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
2542 %r = extractvalue { i8, i1 } %pair, 0
2546 define dso_local i8 @cmpxchg_i8_unaligned_acquire_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
2547 ; -O0-LABEL: cmpxchg_i8_unaligned_acquire_acquire_weak:
2548 ; -O0: ldaxrb w0, [x2]
2549 ; -O0: cmp w0, w9, uxtb
2550 ; -O0: stlxrb w8, w1, [x2]
2552 ; -O1-LABEL: cmpxchg_i8_unaligned_acquire_acquire_weak:
2553 ; -O1: ldaxrb w8, [x2]
2554 ; -O1: cmp w8, w0, uxtb
2555 ; -O1: stxrb wzr, w1, [x2]
2556 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire acquire, align 1
2557 %r = extractvalue { i8, i1 } %pair, 0
2561 define dso_local i8 @cmpxchg_i8_unaligned_acquire_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
2562 ; -O0-LABEL: cmpxchg_i8_unaligned_acquire_seq_cst:
2563 ; -O0: ldaxrb w0, [x2]
2564 ; -O0: cmp w0, w9, uxtb
2565 ; -O0: stlxrb w8, w1, [x2]
2567 ; -O1-LABEL: cmpxchg_i8_unaligned_acquire_seq_cst:
2568 ; -O1: and w8, w0, #0xff
2569 ; -O1: ldaxrb w0, [x2]
2571 ; -O1: stlxrb w9, w1, [x2]
2572 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
2573 %r = extractvalue { i8, i1 } %pair, 0
2577 define dso_local i8 @cmpxchg_i8_unaligned_acquire_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
2578 ; -O0-LABEL: cmpxchg_i8_unaligned_acquire_seq_cst_weak:
2579 ; -O0: ldaxrb w0, [x2]
2580 ; -O0: cmp w0, w9, uxtb
2581 ; -O0: stlxrb w8, w1, [x2]
2583 ; -O1-LABEL: cmpxchg_i8_unaligned_acquire_seq_cst_weak:
2584 ; -O1: ldaxrb w8, [x2]
2585 ; -O1: cmp w8, w0, uxtb
2586 ; -O1: stlxrb wzr, w1, [x2]
2587 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acquire seq_cst, align 1
2588 %r = extractvalue { i8, i1 } %pair, 0
2592 define dso_local i8 @cmpxchg_i8_unaligned_release_monotonic(i8 %expected, i8 %new, ptr %ptr) {
2593 ; -O0-LABEL: cmpxchg_i8_unaligned_release_monotonic:
2594 ; -O0: ldaxrb w0, [x2]
2595 ; -O0: cmp w0, w9, uxtb
2596 ; -O0: stlxrb w8, w1, [x2]
2598 ; -O1-LABEL: cmpxchg_i8_unaligned_release_monotonic:
2599 ; -O1: and w8, w0, #0xff
2600 ; -O1: ldxrb w0, [x2]
2602 ; -O1: stlxrb w9, w1, [x2]
2603 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
2604 %r = extractvalue { i8, i1 } %pair, 0
2608 define dso_local i8 @cmpxchg_i8_unaligned_release_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
2609 ; -O0-LABEL: cmpxchg_i8_unaligned_release_monotonic_weak:
2610 ; -O0: ldaxrb w0, [x2]
2611 ; -O0: cmp w0, w9, uxtb
2612 ; -O0: stlxrb w8, w1, [x2]
2614 ; -O1-LABEL: cmpxchg_i8_unaligned_release_monotonic_weak:
2615 ; -O1: ldxrb w8, [x2]
2616 ; -O1: cmp w8, w0, uxtb
2617 ; -O1: stlxrb wzr, w1, [x2]
2618 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release monotonic, align 1
2619 %r = extractvalue { i8, i1 } %pair, 0
2623 define dso_local i8 @cmpxchg_i8_unaligned_release_acquire(i8 %expected, i8 %new, ptr %ptr) {
2624 ; -O0-LABEL: cmpxchg_i8_unaligned_release_acquire:
2625 ; -O0: ldaxrb w0, [x2]
2626 ; -O0: cmp w0, w9, uxtb
2627 ; -O0: stlxrb w8, w1, [x2]
2629 ; -O1-LABEL: cmpxchg_i8_unaligned_release_acquire:
2630 ; -O1: and w8, w0, #0xff
2631 ; -O1: ldaxrb w0, [x2]
2633 ; -O1: stlxrb w9, w1, [x2]
2634 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release acquire, align 1
2635 %r = extractvalue { i8, i1 } %pair, 0
2639 define dso_local i8 @cmpxchg_i8_unaligned_release_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
2640 ; -O0-LABEL: cmpxchg_i8_unaligned_release_acquire_weak:
2641 ; -O0: ldaxrb w0, [x2]
2642 ; -O0: cmp w0, w9, uxtb
2643 ; -O0: stlxrb w8, w1, [x2]
2645 ; -O1-LABEL: cmpxchg_i8_unaligned_release_acquire_weak:
2646 ; -O1: ldaxrb w8, [x2]
2647 ; -O1: cmp w8, w0, uxtb
2648 ; -O1: stlxrb wzr, w1, [x2]
2649 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release acquire, align 1
2650 %r = extractvalue { i8, i1 } %pair, 0
2654 define dso_local i8 @cmpxchg_i8_unaligned_release_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
2655 ; -O0-LABEL: cmpxchg_i8_unaligned_release_seq_cst:
2656 ; -O0: ldaxrb w0, [x2]
2657 ; -O0: cmp w0, w9, uxtb
2658 ; -O0: stlxrb w8, w1, [x2]
2660 ; -O1-LABEL: cmpxchg_i8_unaligned_release_seq_cst:
2661 ; -O1: and w8, w0, #0xff
2662 ; -O1: ldaxrb w0, [x2]
2664 ; -O1: stlxrb w9, w1, [x2]
2665 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
2666 %r = extractvalue { i8, i1 } %pair, 0
2670 define dso_local i8 @cmpxchg_i8_unaligned_release_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
2671 ; -O0-LABEL: cmpxchg_i8_unaligned_release_seq_cst_weak:
2672 ; -O0: ldaxrb w0, [x2]
2673 ; -O0: cmp w0, w9, uxtb
2674 ; -O0: stlxrb w8, w1, [x2]
2676 ; -O1-LABEL: cmpxchg_i8_unaligned_release_seq_cst_weak:
2677 ; -O1: ldaxrb w8, [x2]
2678 ; -O1: cmp w8, w0, uxtb
2679 ; -O1: stlxrb wzr, w1, [x2]
2680 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new release seq_cst, align 1
2681 %r = extractvalue { i8, i1 } %pair, 0
2685 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_monotonic(i8 %expected, i8 %new, ptr %ptr) {
2686 ; -O0-LABEL: cmpxchg_i8_unaligned_acq_rel_monotonic:
2687 ; -O0: ldaxrb w0, [x2]
2688 ; -O0: cmp w0, w9, uxtb
2689 ; -O0: stlxrb w8, w1, [x2]
2691 ; -O1-LABEL: cmpxchg_i8_unaligned_acq_rel_monotonic:
2692 ; -O1: and w8, w0, #0xff
2693 ; -O1: ldaxrb w0, [x2]
2695 ; -O1: stlxrb w9, w1, [x2]
2696 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
2697 %r = extractvalue { i8, i1 } %pair, 0
2701 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
2702 ; -O0-LABEL: cmpxchg_i8_unaligned_acq_rel_monotonic_weak:
2703 ; -O0: ldaxrb w0, [x2]
2704 ; -O0: cmp w0, w9, uxtb
2705 ; -O0: stlxrb w8, w1, [x2]
2707 ; -O1-LABEL: cmpxchg_i8_unaligned_acq_rel_monotonic_weak:
2708 ; -O1: ldaxrb w8, [x2]
2709 ; -O1: cmp w8, w0, uxtb
2710 ; -O1: stlxrb wzr, w1, [x2]
2711 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel monotonic, align 1
2712 %r = extractvalue { i8, i1 } %pair, 0
2716 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_acquire(i8 %expected, i8 %new, ptr %ptr) {
2717 ; -O0-LABEL: cmpxchg_i8_unaligned_acq_rel_acquire:
2718 ; -O0: ldaxrb w0, [x2]
2719 ; -O0: cmp w0, w9, uxtb
2720 ; -O0: stlxrb w8, w1, [x2]
2722 ; -O1-LABEL: cmpxchg_i8_unaligned_acq_rel_acquire:
2723 ; -O1: and w8, w0, #0xff
2724 ; -O1: ldaxrb w0, [x2]
2726 ; -O1: stlxrb w9, w1, [x2]
2727 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
2728 %r = extractvalue { i8, i1 } %pair, 0
2732 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
2733 ; -O0-LABEL: cmpxchg_i8_unaligned_acq_rel_acquire_weak:
2734 ; -O0: ldaxrb w0, [x2]
2735 ; -O0: cmp w0, w9, uxtb
2736 ; -O0: stlxrb w8, w1, [x2]
2738 ; -O1-LABEL: cmpxchg_i8_unaligned_acq_rel_acquire_weak:
2739 ; -O1: ldaxrb w8, [x2]
2740 ; -O1: cmp w8, w0, uxtb
2741 ; -O1: stlxrb wzr, w1, [x2]
2742 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel acquire, align 1
2743 %r = extractvalue { i8, i1 } %pair, 0
2747 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
2748 ; -O0-LABEL: cmpxchg_i8_unaligned_acq_rel_seq_cst:
2749 ; -O0: ldaxrb w0, [x2]
2750 ; -O0: cmp w0, w9, uxtb
2751 ; -O0: stlxrb w8, w1, [x2]
2753 ; -O1-LABEL: cmpxchg_i8_unaligned_acq_rel_seq_cst:
2754 ; -O1: and w8, w0, #0xff
2755 ; -O1: ldaxrb w0, [x2]
2757 ; -O1: stlxrb w9, w1, [x2]
2758 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
2759 %r = extractvalue { i8, i1 } %pair, 0
2763 define dso_local i8 @cmpxchg_i8_unaligned_acq_rel_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
2764 ; -O0-LABEL: cmpxchg_i8_unaligned_acq_rel_seq_cst_weak:
2765 ; -O0: ldaxrb w0, [x2]
2766 ; -O0: cmp w0, w9, uxtb
2767 ; -O0: stlxrb w8, w1, [x2]
2769 ; -O1-LABEL: cmpxchg_i8_unaligned_acq_rel_seq_cst_weak:
2770 ; -O1: ldaxrb w8, [x2]
2771 ; -O1: cmp w8, w0, uxtb
2772 ; -O1: stlxrb wzr, w1, [x2]
2773 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new acq_rel seq_cst, align 1
2774 %r = extractvalue { i8, i1 } %pair, 0
2778 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_monotonic(i8 %expected, i8 %new, ptr %ptr) {
2779 ; -O0-LABEL: cmpxchg_i8_unaligned_seq_cst_monotonic:
2780 ; -O0: ldaxrb w0, [x2]
2781 ; -O0: cmp w0, w9, uxtb
2782 ; -O0: stlxrb w8, w1, [x2]
2784 ; -O1-LABEL: cmpxchg_i8_unaligned_seq_cst_monotonic:
2785 ; -O1: and w8, w0, #0xff
2786 ; -O1: ldaxrb w0, [x2]
2788 ; -O1: stlxrb w9, w1, [x2]
2789 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
2790 %r = extractvalue { i8, i1 } %pair, 0
2794 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_monotonic_weak(i8 %expected, i8 %new, ptr %ptr) {
2795 ; -O0-LABEL: cmpxchg_i8_unaligned_seq_cst_monotonic_weak:
2796 ; -O0: ldaxrb w0, [x2]
2797 ; -O0: cmp w0, w9, uxtb
2798 ; -O0: stlxrb w8, w1, [x2]
2800 ; -O1-LABEL: cmpxchg_i8_unaligned_seq_cst_monotonic_weak:
2801 ; -O1: ldaxrb w8, [x2]
2802 ; -O1: cmp w8, w0, uxtb
2803 ; -O1: stlxrb wzr, w1, [x2]
2804 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst monotonic, align 1
2805 %r = extractvalue { i8, i1 } %pair, 0
2809 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_acquire(i8 %expected, i8 %new, ptr %ptr) {
2810 ; -O0-LABEL: cmpxchg_i8_unaligned_seq_cst_acquire:
2811 ; -O0: ldaxrb w0, [x2]
2812 ; -O0: cmp w0, w9, uxtb
2813 ; -O0: stlxrb w8, w1, [x2]
2815 ; -O1-LABEL: cmpxchg_i8_unaligned_seq_cst_acquire:
2816 ; -O1: and w8, w0, #0xff
2817 ; -O1: ldaxrb w0, [x2]
2819 ; -O1: stlxrb w9, w1, [x2]
2820 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
2821 %r = extractvalue { i8, i1 } %pair, 0
2825 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_acquire_weak(i8 %expected, i8 %new, ptr %ptr) {
2826 ; -O0-LABEL: cmpxchg_i8_unaligned_seq_cst_acquire_weak:
2827 ; -O0: ldaxrb w0, [x2]
2828 ; -O0: cmp w0, w9, uxtb
2829 ; -O0: stlxrb w8, w1, [x2]
2831 ; -O1-LABEL: cmpxchg_i8_unaligned_seq_cst_acquire_weak:
2832 ; -O1: ldaxrb w8, [x2]
2833 ; -O1: cmp w8, w0, uxtb
2834 ; -O1: stlxrb wzr, w1, [x2]
2835 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst acquire, align 1
2836 %r = extractvalue { i8, i1 } %pair, 0
2840 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_seq_cst(i8 %expected, i8 %new, ptr %ptr) {
2841 ; -O0-LABEL: cmpxchg_i8_unaligned_seq_cst_seq_cst:
2842 ; -O0: ldaxrb w0, [x2]
2843 ; -O0: cmp w0, w9, uxtb
2844 ; -O0: stlxrb w8, w1, [x2]
2846 ; -O1-LABEL: cmpxchg_i8_unaligned_seq_cst_seq_cst:
2847 ; -O1: and w8, w0, #0xff
2848 ; -O1: ldaxrb w0, [x2]
2850 ; -O1: stlxrb w9, w1, [x2]
2851 %pair = cmpxchg ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
2852 %r = extractvalue { i8, i1 } %pair, 0
2856 define dso_local i8 @cmpxchg_i8_unaligned_seq_cst_seq_cst_weak(i8 %expected, i8 %new, ptr %ptr) {
2857 ; -O0-LABEL: cmpxchg_i8_unaligned_seq_cst_seq_cst_weak:
2858 ; -O0: ldaxrb w0, [x2]
2859 ; -O0: cmp w0, w9, uxtb
2860 ; -O0: stlxrb w8, w1, [x2]
2862 ; -O1-LABEL: cmpxchg_i8_unaligned_seq_cst_seq_cst_weak:
2863 ; -O1: ldaxrb w8, [x2]
2864 ; -O1: cmp w8, w0, uxtb
2865 ; -O1: stlxrb wzr, w1, [x2]
2866 %pair = cmpxchg weak ptr %ptr, i8 %expected, i8 %new seq_cst seq_cst, align 1
2867 %r = extractvalue { i8, i1 } %pair, 0
2871 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_monotonic(i16 %expected, i16 %new, ptr %ptr) {
2872 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_monotonic:
2873 ; CHECK: bl __atomic_compare_exchange
2874 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 1
2875 %r = extractvalue { i16, i1 } %pair, 0
2879 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
2880 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_monotonic_weak:
2881 ; CHECK: bl __atomic_compare_exchange
2882 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic monotonic, align 1
2883 %r = extractvalue { i16, i1 } %pair, 0
2887 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_acquire(i16 %expected, i16 %new, ptr %ptr) {
2888 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_acquire:
2889 ; CHECK: bl __atomic_compare_exchange
2890 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 1
2891 %r = extractvalue { i16, i1 } %pair, 0
2895 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
2896 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_acquire_weak:
2897 ; CHECK: bl __atomic_compare_exchange
2898 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic acquire, align 1
2899 %r = extractvalue { i16, i1 } %pair, 0
2903 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
2904 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_seq_cst:
2905 ; CHECK: bl __atomic_compare_exchange
2906 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 1
2907 %r = extractvalue { i16, i1 } %pair, 0
2911 define dso_local i16 @cmpxchg_i16_unaligned_monotonic_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
2912 ; CHECK-LABEL: cmpxchg_i16_unaligned_monotonic_seq_cst_weak:
2913 ; CHECK: bl __atomic_compare_exchange
2914 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new monotonic seq_cst, align 1
2915 %r = extractvalue { i16, i1 } %pair, 0
2919 define dso_local i16 @cmpxchg_i16_unaligned_acquire_monotonic(i16 %expected, i16 %new, ptr %ptr) {
2920 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_monotonic:
2921 ; CHECK: bl __atomic_compare_exchange
2922 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 1
2923 %r = extractvalue { i16, i1 } %pair, 0
2927 define dso_local i16 @cmpxchg_i16_unaligned_acquire_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
2928 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_monotonic_weak:
2929 ; CHECK: bl __atomic_compare_exchange
2930 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire monotonic, align 1
2931 %r = extractvalue { i16, i1 } %pair, 0
2935 define dso_local i16 @cmpxchg_i16_unaligned_acquire_acquire(i16 %expected, i16 %new, ptr %ptr) {
2936 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_acquire:
2937 ; CHECK: bl __atomic_compare_exchange
2938 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire acquire, align 1
2939 %r = extractvalue { i16, i1 } %pair, 0
2943 define dso_local i16 @cmpxchg_i16_unaligned_acquire_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
2944 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_acquire_weak:
2945 ; CHECK: bl __atomic_compare_exchange
2946 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire acquire, align 1
2947 %r = extractvalue { i16, i1 } %pair, 0
2951 define dso_local i16 @cmpxchg_i16_unaligned_acquire_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
2952 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_seq_cst:
2953 ; CHECK: bl __atomic_compare_exchange
2954 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 1
2955 %r = extractvalue { i16, i1 } %pair, 0
2959 define dso_local i16 @cmpxchg_i16_unaligned_acquire_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
2960 ; CHECK-LABEL: cmpxchg_i16_unaligned_acquire_seq_cst_weak:
2961 ; CHECK: bl __atomic_compare_exchange
2962 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acquire seq_cst, align 1
2963 %r = extractvalue { i16, i1 } %pair, 0
2967 define dso_local i16 @cmpxchg_i16_unaligned_release_monotonic(i16 %expected, i16 %new, ptr %ptr) {
2968 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_monotonic:
2969 ; CHECK: bl __atomic_compare_exchange
2970 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release monotonic, align 1
2971 %r = extractvalue { i16, i1 } %pair, 0
2975 define dso_local i16 @cmpxchg_i16_unaligned_release_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
2976 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_monotonic_weak:
2977 ; CHECK: bl __atomic_compare_exchange
2978 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release monotonic, align 1
2979 %r = extractvalue { i16, i1 } %pair, 0
2983 define dso_local i16 @cmpxchg_i16_unaligned_release_acquire(i16 %expected, i16 %new, ptr %ptr) {
2984 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_acquire:
2985 ; CHECK: bl __atomic_compare_exchange
2986 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release acquire, align 1
2987 %r = extractvalue { i16, i1 } %pair, 0
2991 define dso_local i16 @cmpxchg_i16_unaligned_release_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
2992 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_acquire_weak:
2993 ; CHECK: bl __atomic_compare_exchange
2994 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release acquire, align 1
2995 %r = extractvalue { i16, i1 } %pair, 0
2999 define dso_local i16 @cmpxchg_i16_unaligned_release_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
3000 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_seq_cst:
3001 ; CHECK: bl __atomic_compare_exchange
3002 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new release seq_cst, align 1
3003 %r = extractvalue { i16, i1 } %pair, 0
3007 define dso_local i16 @cmpxchg_i16_unaligned_release_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
3008 ; CHECK-LABEL: cmpxchg_i16_unaligned_release_seq_cst_weak:
3009 ; CHECK: bl __atomic_compare_exchange
3010 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new release seq_cst, align 1
3011 %r = extractvalue { i16, i1 } %pair, 0
3015 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_monotonic(i16 %expected, i16 %new, ptr %ptr) {
3016 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_monotonic:
3017 ; CHECK: bl __atomic_compare_exchange
3018 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 1
3019 %r = extractvalue { i16, i1 } %pair, 0
3023 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
3024 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_monotonic_weak:
3025 ; CHECK: bl __atomic_compare_exchange
3026 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel monotonic, align 1
3027 %r = extractvalue { i16, i1 } %pair, 0
3031 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_acquire(i16 %expected, i16 %new, ptr %ptr) {
3032 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_acquire:
3033 ; CHECK: bl __atomic_compare_exchange
3034 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 1
3035 %r = extractvalue { i16, i1 } %pair, 0
3039 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
3040 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_acquire_weak:
3041 ; CHECK: bl __atomic_compare_exchange
3042 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel acquire, align 1
3043 %r = extractvalue { i16, i1 } %pair, 0
3047 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
3048 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_seq_cst:
3049 ; CHECK: bl __atomic_compare_exchange
3050 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 1
3051 %r = extractvalue { i16, i1 } %pair, 0
3055 define dso_local i16 @cmpxchg_i16_unaligned_acq_rel_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
3056 ; CHECK-LABEL: cmpxchg_i16_unaligned_acq_rel_seq_cst_weak:
3057 ; CHECK: bl __atomic_compare_exchange
3058 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new acq_rel seq_cst, align 1
3059 %r = extractvalue { i16, i1 } %pair, 0
3063 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_monotonic(i16 %expected, i16 %new, ptr %ptr) {
3064 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_monotonic:
3065 ; CHECK: bl __atomic_compare_exchange
3066 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 1
3067 %r = extractvalue { i16, i1 } %pair, 0
3071 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_monotonic_weak(i16 %expected, i16 %new, ptr %ptr) {
3072 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_monotonic_weak:
3073 ; CHECK: bl __atomic_compare_exchange
3074 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst monotonic, align 1
3075 %r = extractvalue { i16, i1 } %pair, 0
3079 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_acquire(i16 %expected, i16 %new, ptr %ptr) {
3080 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_acquire:
3081 ; CHECK: bl __atomic_compare_exchange
3082 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 1
3083 %r = extractvalue { i16, i1 } %pair, 0
3087 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_acquire_weak(i16 %expected, i16 %new, ptr %ptr) {
3088 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_acquire_weak:
3089 ; CHECK: bl __atomic_compare_exchange
3090 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst acquire, align 1
3091 %r = extractvalue { i16, i1 } %pair, 0
3095 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_seq_cst(i16 %expected, i16 %new, ptr %ptr) {
3096 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_seq_cst:
3097 ; CHECK: bl __atomic_compare_exchange
3098 %pair = cmpxchg ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 1
3099 %r = extractvalue { i16, i1 } %pair, 0
3103 define dso_local i16 @cmpxchg_i16_unaligned_seq_cst_seq_cst_weak(i16 %expected, i16 %new, ptr %ptr) {
3104 ; CHECK-LABEL: cmpxchg_i16_unaligned_seq_cst_seq_cst_weak:
3105 ; CHECK: bl __atomic_compare_exchange
3106 %pair = cmpxchg weak ptr %ptr, i16 %expected, i16 %new seq_cst seq_cst, align 1
3107 %r = extractvalue { i16, i1 } %pair, 0
3111 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_monotonic(i32 %expected, i32 %new, ptr %ptr) {
3112 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_monotonic:
3113 ; CHECK: bl __atomic_compare_exchange
3114 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 1
3115 %r = extractvalue { i32, i1 } %pair, 0
3119 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
3120 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_monotonic_weak:
3121 ; CHECK: bl __atomic_compare_exchange
3122 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic monotonic, align 1
3123 %r = extractvalue { i32, i1 } %pair, 0
3127 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_acquire(i32 %expected, i32 %new, ptr %ptr) {
3128 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_acquire:
3129 ; CHECK: bl __atomic_compare_exchange
3130 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 1
3131 %r = extractvalue { i32, i1 } %pair, 0
3135 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
3136 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_acquire_weak:
3137 ; CHECK: bl __atomic_compare_exchange
3138 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic acquire, align 1
3139 %r = extractvalue { i32, i1 } %pair, 0
3143 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
3144 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_seq_cst:
3145 ; CHECK: bl __atomic_compare_exchange
3146 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 1
3147 %r = extractvalue { i32, i1 } %pair, 0
3151 define dso_local i32 @cmpxchg_i32_unaligned_monotonic_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
3152 ; CHECK-LABEL: cmpxchg_i32_unaligned_monotonic_seq_cst_weak:
3153 ; CHECK: bl __atomic_compare_exchange
3154 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new monotonic seq_cst, align 1
3155 %r = extractvalue { i32, i1 } %pair, 0
3159 define dso_local i32 @cmpxchg_i32_unaligned_acquire_monotonic(i32 %expected, i32 %new, ptr %ptr) {
3160 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_monotonic:
3161 ; CHECK: bl __atomic_compare_exchange
3162 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 1
3163 %r = extractvalue { i32, i1 } %pair, 0
3167 define dso_local i32 @cmpxchg_i32_unaligned_acquire_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
3168 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_monotonic_weak:
3169 ; CHECK: bl __atomic_compare_exchange
3170 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire monotonic, align 1
3171 %r = extractvalue { i32, i1 } %pair, 0
3175 define dso_local i32 @cmpxchg_i32_unaligned_acquire_acquire(i32 %expected, i32 %new, ptr %ptr) {
3176 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_acquire:
3177 ; CHECK: bl __atomic_compare_exchange
3178 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire acquire, align 1
3179 %r = extractvalue { i32, i1 } %pair, 0
3183 define dso_local i32 @cmpxchg_i32_unaligned_acquire_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
3184 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_acquire_weak:
3185 ; CHECK: bl __atomic_compare_exchange
3186 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire acquire, align 1
3187 %r = extractvalue { i32, i1 } %pair, 0
3191 define dso_local i32 @cmpxchg_i32_unaligned_acquire_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
3192 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_seq_cst:
3193 ; CHECK: bl __atomic_compare_exchange
3194 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 1
3195 %r = extractvalue { i32, i1 } %pair, 0
3199 define dso_local i32 @cmpxchg_i32_unaligned_acquire_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
3200 ; CHECK-LABEL: cmpxchg_i32_unaligned_acquire_seq_cst_weak:
3201 ; CHECK: bl __atomic_compare_exchange
3202 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acquire seq_cst, align 1
3203 %r = extractvalue { i32, i1 } %pair, 0
3207 define dso_local i32 @cmpxchg_i32_unaligned_release_monotonic(i32 %expected, i32 %new, ptr %ptr) {
3208 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_monotonic:
3209 ; CHECK: bl __atomic_compare_exchange
3210 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release monotonic, align 1
3211 %r = extractvalue { i32, i1 } %pair, 0
3215 define dso_local i32 @cmpxchg_i32_unaligned_release_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
3216 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_monotonic_weak:
3217 ; CHECK: bl __atomic_compare_exchange
3218 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release monotonic, align 1
3219 %r = extractvalue { i32, i1 } %pair, 0
3223 define dso_local i32 @cmpxchg_i32_unaligned_release_acquire(i32 %expected, i32 %new, ptr %ptr) {
3224 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_acquire:
3225 ; CHECK: bl __atomic_compare_exchange
3226 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release acquire, align 1
3227 %r = extractvalue { i32, i1 } %pair, 0
3231 define dso_local i32 @cmpxchg_i32_unaligned_release_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
3232 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_acquire_weak:
3233 ; CHECK: bl __atomic_compare_exchange
3234 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release acquire, align 1
3235 %r = extractvalue { i32, i1 } %pair, 0
3239 define dso_local i32 @cmpxchg_i32_unaligned_release_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
3240 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_seq_cst:
3241 ; CHECK: bl __atomic_compare_exchange
3242 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new release seq_cst, align 1
3243 %r = extractvalue { i32, i1 } %pair, 0
3247 define dso_local i32 @cmpxchg_i32_unaligned_release_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
3248 ; CHECK-LABEL: cmpxchg_i32_unaligned_release_seq_cst_weak:
3249 ; CHECK: bl __atomic_compare_exchange
3250 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new release seq_cst, align 1
3251 %r = extractvalue { i32, i1 } %pair, 0
3255 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_monotonic(i32 %expected, i32 %new, ptr %ptr) {
3256 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_monotonic:
3257 ; CHECK: bl __atomic_compare_exchange
3258 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 1
3259 %r = extractvalue { i32, i1 } %pair, 0
3263 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
3264 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_monotonic_weak:
3265 ; CHECK: bl __atomic_compare_exchange
3266 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel monotonic, align 1
3267 %r = extractvalue { i32, i1 } %pair, 0
3271 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_acquire(i32 %expected, i32 %new, ptr %ptr) {
3272 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_acquire:
3273 ; CHECK: bl __atomic_compare_exchange
3274 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 1
3275 %r = extractvalue { i32, i1 } %pair, 0
3279 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
3280 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_acquire_weak:
3281 ; CHECK: bl __atomic_compare_exchange
3282 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel acquire, align 1
3283 %r = extractvalue { i32, i1 } %pair, 0
3287 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
3288 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_seq_cst:
3289 ; CHECK: bl __atomic_compare_exchange
3290 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 1
3291 %r = extractvalue { i32, i1 } %pair, 0
3295 define dso_local i32 @cmpxchg_i32_unaligned_acq_rel_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
3296 ; CHECK-LABEL: cmpxchg_i32_unaligned_acq_rel_seq_cst_weak:
3297 ; CHECK: bl __atomic_compare_exchange
3298 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new acq_rel seq_cst, align 1
3299 %r = extractvalue { i32, i1 } %pair, 0
3303 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_monotonic(i32 %expected, i32 %new, ptr %ptr) {
3304 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_monotonic:
3305 ; CHECK: bl __atomic_compare_exchange
3306 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 1
3307 %r = extractvalue { i32, i1 } %pair, 0
3311 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_monotonic_weak(i32 %expected, i32 %new, ptr %ptr) {
3312 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_monotonic_weak:
3313 ; CHECK: bl __atomic_compare_exchange
3314 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst monotonic, align 1
3315 %r = extractvalue { i32, i1 } %pair, 0
3319 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_acquire(i32 %expected, i32 %new, ptr %ptr) {
3320 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_acquire:
3321 ; CHECK: bl __atomic_compare_exchange
3322 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 1
3323 %r = extractvalue { i32, i1 } %pair, 0
3327 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_acquire_weak(i32 %expected, i32 %new, ptr %ptr) {
3328 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_acquire_weak:
3329 ; CHECK: bl __atomic_compare_exchange
3330 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst acquire, align 1
3331 %r = extractvalue { i32, i1 } %pair, 0
3335 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_seq_cst(i32 %expected, i32 %new, ptr %ptr) {
3336 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_seq_cst:
3337 ; CHECK: bl __atomic_compare_exchange
3338 %pair = cmpxchg ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 1
3339 %r = extractvalue { i32, i1 } %pair, 0
3343 define dso_local i32 @cmpxchg_i32_unaligned_seq_cst_seq_cst_weak(i32 %expected, i32 %new, ptr %ptr) {
3344 ; CHECK-LABEL: cmpxchg_i32_unaligned_seq_cst_seq_cst_weak:
3345 ; CHECK: bl __atomic_compare_exchange
3346 %pair = cmpxchg weak ptr %ptr, i32 %expected, i32 %new seq_cst seq_cst, align 1
3347 %r = extractvalue { i32, i1 } %pair, 0
3351 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_monotonic(i64 %expected, i64 %new, ptr %ptr) {
3352 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_monotonic:
3353 ; CHECK: bl __atomic_compare_exchange
3354 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 1
3355 %r = extractvalue { i64, i1 } %pair, 0
3359 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
3360 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_monotonic_weak:
3361 ; CHECK: bl __atomic_compare_exchange
3362 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic monotonic, align 1
3363 %r = extractvalue { i64, i1 } %pair, 0
3367 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_acquire(i64 %expected, i64 %new, ptr %ptr) {
3368 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_acquire:
3369 ; CHECK: bl __atomic_compare_exchange
3370 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 1
3371 %r = extractvalue { i64, i1 } %pair, 0
3375 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
3376 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_acquire_weak:
3377 ; CHECK: bl __atomic_compare_exchange
3378 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic acquire, align 1
3379 %r = extractvalue { i64, i1 } %pair, 0
3383 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
3384 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_seq_cst:
3385 ; CHECK: bl __atomic_compare_exchange
3386 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 1
3387 %r = extractvalue { i64, i1 } %pair, 0
3391 define dso_local i64 @cmpxchg_i64_unaligned_monotonic_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
3392 ; CHECK-LABEL: cmpxchg_i64_unaligned_monotonic_seq_cst_weak:
3393 ; CHECK: bl __atomic_compare_exchange
3394 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new monotonic seq_cst, align 1
3395 %r = extractvalue { i64, i1 } %pair, 0
3399 define dso_local i64 @cmpxchg_i64_unaligned_acquire_monotonic(i64 %expected, i64 %new, ptr %ptr) {
3400 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_monotonic:
3401 ; CHECK: bl __atomic_compare_exchange
3402 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 1
3403 %r = extractvalue { i64, i1 } %pair, 0
3407 define dso_local i64 @cmpxchg_i64_unaligned_acquire_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
3408 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_monotonic_weak:
3409 ; CHECK: bl __atomic_compare_exchange
3410 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire monotonic, align 1
3411 %r = extractvalue { i64, i1 } %pair, 0
3415 define dso_local i64 @cmpxchg_i64_unaligned_acquire_acquire(i64 %expected, i64 %new, ptr %ptr) {
3416 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_acquire:
3417 ; CHECK: bl __atomic_compare_exchange
3418 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire acquire, align 1
3419 %r = extractvalue { i64, i1 } %pair, 0
3423 define dso_local i64 @cmpxchg_i64_unaligned_acquire_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
3424 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_acquire_weak:
3425 ; CHECK: bl __atomic_compare_exchange
3426 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire acquire, align 1
3427 %r = extractvalue { i64, i1 } %pair, 0
3431 define dso_local i64 @cmpxchg_i64_unaligned_acquire_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
3432 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_seq_cst:
3433 ; CHECK: bl __atomic_compare_exchange
3434 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 1
3435 %r = extractvalue { i64, i1 } %pair, 0
3439 define dso_local i64 @cmpxchg_i64_unaligned_acquire_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
3440 ; CHECK-LABEL: cmpxchg_i64_unaligned_acquire_seq_cst_weak:
3441 ; CHECK: bl __atomic_compare_exchange
3442 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acquire seq_cst, align 1
3443 %r = extractvalue { i64, i1 } %pair, 0
3447 define dso_local i64 @cmpxchg_i64_unaligned_release_monotonic(i64 %expected, i64 %new, ptr %ptr) {
3448 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_monotonic:
3449 ; CHECK: bl __atomic_compare_exchange
3450 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release monotonic, align 1
3451 %r = extractvalue { i64, i1 } %pair, 0
3455 define dso_local i64 @cmpxchg_i64_unaligned_release_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
3456 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_monotonic_weak:
3457 ; CHECK: bl __atomic_compare_exchange
3458 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release monotonic, align 1
3459 %r = extractvalue { i64, i1 } %pair, 0
3463 define dso_local i64 @cmpxchg_i64_unaligned_release_acquire(i64 %expected, i64 %new, ptr %ptr) {
3464 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_acquire:
3465 ; CHECK: bl __atomic_compare_exchange
3466 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release acquire, align 1
3467 %r = extractvalue { i64, i1 } %pair, 0
3471 define dso_local i64 @cmpxchg_i64_unaligned_release_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
3472 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_acquire_weak:
3473 ; CHECK: bl __atomic_compare_exchange
3474 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release acquire, align 1
3475 %r = extractvalue { i64, i1 } %pair, 0
3479 define dso_local i64 @cmpxchg_i64_unaligned_release_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
3480 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_seq_cst:
3481 ; CHECK: bl __atomic_compare_exchange
3482 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new release seq_cst, align 1
3483 %r = extractvalue { i64, i1 } %pair, 0
3487 define dso_local i64 @cmpxchg_i64_unaligned_release_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
3488 ; CHECK-LABEL: cmpxchg_i64_unaligned_release_seq_cst_weak:
3489 ; CHECK: bl __atomic_compare_exchange
3490 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new release seq_cst, align 1
3491 %r = extractvalue { i64, i1 } %pair, 0
3495 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_monotonic(i64 %expected, i64 %new, ptr %ptr) {
3496 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_monotonic:
3497 ; CHECK: bl __atomic_compare_exchange
3498 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 1
3499 %r = extractvalue { i64, i1 } %pair, 0
3503 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
3504 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_monotonic_weak:
3505 ; CHECK: bl __atomic_compare_exchange
3506 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel monotonic, align 1
3507 %r = extractvalue { i64, i1 } %pair, 0
3511 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_acquire(i64 %expected, i64 %new, ptr %ptr) {
3512 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_acquire:
3513 ; CHECK: bl __atomic_compare_exchange
3514 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 1
3515 %r = extractvalue { i64, i1 } %pair, 0
3519 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
3520 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_acquire_weak:
3521 ; CHECK: bl __atomic_compare_exchange
3522 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel acquire, align 1
3523 %r = extractvalue { i64, i1 } %pair, 0
3527 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
3528 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_seq_cst:
3529 ; CHECK: bl __atomic_compare_exchange
3530 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 1
3531 %r = extractvalue { i64, i1 } %pair, 0
3535 define dso_local i64 @cmpxchg_i64_unaligned_acq_rel_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
3536 ; CHECK-LABEL: cmpxchg_i64_unaligned_acq_rel_seq_cst_weak:
3537 ; CHECK: bl __atomic_compare_exchange
3538 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new acq_rel seq_cst, align 1
3539 %r = extractvalue { i64, i1 } %pair, 0
3543 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_monotonic(i64 %expected, i64 %new, ptr %ptr) {
3544 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_monotonic:
3545 ; CHECK: bl __atomic_compare_exchange
3546 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 1
3547 %r = extractvalue { i64, i1 } %pair, 0
3551 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_monotonic_weak(i64 %expected, i64 %new, ptr %ptr) {
3552 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_monotonic_weak:
3553 ; CHECK: bl __atomic_compare_exchange
3554 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst monotonic, align 1
3555 %r = extractvalue { i64, i1 } %pair, 0
3559 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_acquire(i64 %expected, i64 %new, ptr %ptr) {
3560 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_acquire:
3561 ; CHECK: bl __atomic_compare_exchange
3562 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 1
3563 %r = extractvalue { i64, i1 } %pair, 0
3567 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_acquire_weak(i64 %expected, i64 %new, ptr %ptr) {
3568 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_acquire_weak:
3569 ; CHECK: bl __atomic_compare_exchange
3570 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst acquire, align 1
3571 %r = extractvalue { i64, i1 } %pair, 0
3575 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_seq_cst(i64 %expected, i64 %new, ptr %ptr) {
3576 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_seq_cst:
3577 ; CHECK: bl __atomic_compare_exchange
3578 %pair = cmpxchg ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 1
3579 %r = extractvalue { i64, i1 } %pair, 0
3583 define dso_local i64 @cmpxchg_i64_unaligned_seq_cst_seq_cst_weak(i64 %expected, i64 %new, ptr %ptr) {
3584 ; CHECK-LABEL: cmpxchg_i64_unaligned_seq_cst_seq_cst_weak:
3585 ; CHECK: bl __atomic_compare_exchange
3586 %pair = cmpxchg weak ptr %ptr, i64 %expected, i64 %new seq_cst seq_cst, align 1
3587 %r = extractvalue { i64, i1 } %pair, 0
3591 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_monotonic(i128 %expected, i128 %new, ptr %ptr) {
3592 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_monotonic:
3593 ; CHECK: bl __atomic_compare_exchange
3594 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 1
3595 %r = extractvalue { i128, i1 } %pair, 0
3599 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
3600 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_monotonic_weak:
3601 ; CHECK: bl __atomic_compare_exchange
3602 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic monotonic, align 1
3603 %r = extractvalue { i128, i1 } %pair, 0
3607 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_acquire(i128 %expected, i128 %new, ptr %ptr) {
3608 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_acquire:
3609 ; CHECK: bl __atomic_compare_exchange
3610 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 1
3611 %r = extractvalue { i128, i1 } %pair, 0
3615 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
3616 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_acquire_weak:
3617 ; CHECK: bl __atomic_compare_exchange
3618 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic acquire, align 1
3619 %r = extractvalue { i128, i1 } %pair, 0
3623 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
3624 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_seq_cst:
3625 ; CHECK: bl __atomic_compare_exchange
3626 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 1
3627 %r = extractvalue { i128, i1 } %pair, 0
3631 define dso_local i128 @cmpxchg_i128_unaligned_monotonic_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
3632 ; CHECK-LABEL: cmpxchg_i128_unaligned_monotonic_seq_cst_weak:
3633 ; CHECK: bl __atomic_compare_exchange
3634 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new monotonic seq_cst, align 1
3635 %r = extractvalue { i128, i1 } %pair, 0
3639 define dso_local i128 @cmpxchg_i128_unaligned_acquire_monotonic(i128 %expected, i128 %new, ptr %ptr) {
3640 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_monotonic:
3641 ; CHECK: bl __atomic_compare_exchange
3642 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 1
3643 %r = extractvalue { i128, i1 } %pair, 0
3647 define dso_local i128 @cmpxchg_i128_unaligned_acquire_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
3648 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_monotonic_weak:
3649 ; CHECK: bl __atomic_compare_exchange
3650 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire monotonic, align 1
3651 %r = extractvalue { i128, i1 } %pair, 0
3655 define dso_local i128 @cmpxchg_i128_unaligned_acquire_acquire(i128 %expected, i128 %new, ptr %ptr) {
3656 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_acquire:
3657 ; CHECK: bl __atomic_compare_exchange
3658 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire acquire, align 1
3659 %r = extractvalue { i128, i1 } %pair, 0
3663 define dso_local i128 @cmpxchg_i128_unaligned_acquire_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
3664 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_acquire_weak:
3665 ; CHECK: bl __atomic_compare_exchange
3666 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire acquire, align 1
3667 %r = extractvalue { i128, i1 } %pair, 0
3671 define dso_local i128 @cmpxchg_i128_unaligned_acquire_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
3672 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_seq_cst:
3673 ; CHECK: bl __atomic_compare_exchange
3674 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 1
3675 %r = extractvalue { i128, i1 } %pair, 0
3679 define dso_local i128 @cmpxchg_i128_unaligned_acquire_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
3680 ; CHECK-LABEL: cmpxchg_i128_unaligned_acquire_seq_cst_weak:
3681 ; CHECK: bl __atomic_compare_exchange
3682 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acquire seq_cst, align 1
3683 %r = extractvalue { i128, i1 } %pair, 0
3687 define dso_local i128 @cmpxchg_i128_unaligned_release_monotonic(i128 %expected, i128 %new, ptr %ptr) {
3688 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_monotonic:
3689 ; CHECK: bl __atomic_compare_exchange
3690 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release monotonic, align 1
3691 %r = extractvalue { i128, i1 } %pair, 0
3695 define dso_local i128 @cmpxchg_i128_unaligned_release_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
3696 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_monotonic_weak:
3697 ; CHECK: bl __atomic_compare_exchange
3698 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release monotonic, align 1
3699 %r = extractvalue { i128, i1 } %pair, 0
3703 define dso_local i128 @cmpxchg_i128_unaligned_release_acquire(i128 %expected, i128 %new, ptr %ptr) {
3704 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_acquire:
3705 ; CHECK: bl __atomic_compare_exchange
3706 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release acquire, align 1
3707 %r = extractvalue { i128, i1 } %pair, 0
3711 define dso_local i128 @cmpxchg_i128_unaligned_release_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
3712 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_acquire_weak:
3713 ; CHECK: bl __atomic_compare_exchange
3714 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release acquire, align 1
3715 %r = extractvalue { i128, i1 } %pair, 0
3719 define dso_local i128 @cmpxchg_i128_unaligned_release_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
3720 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_seq_cst:
3721 ; CHECK: bl __atomic_compare_exchange
3722 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new release seq_cst, align 1
3723 %r = extractvalue { i128, i1 } %pair, 0
3727 define dso_local i128 @cmpxchg_i128_unaligned_release_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
3728 ; CHECK-LABEL: cmpxchg_i128_unaligned_release_seq_cst_weak:
3729 ; CHECK: bl __atomic_compare_exchange
3730 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new release seq_cst, align 1
3731 %r = extractvalue { i128, i1 } %pair, 0
3735 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_monotonic(i128 %expected, i128 %new, ptr %ptr) {
3736 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_monotonic:
3737 ; CHECK: bl __atomic_compare_exchange
3738 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 1
3739 %r = extractvalue { i128, i1 } %pair, 0
3743 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
3744 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_monotonic_weak:
3745 ; CHECK: bl __atomic_compare_exchange
3746 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel monotonic, align 1
3747 %r = extractvalue { i128, i1 } %pair, 0
3751 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_acquire(i128 %expected, i128 %new, ptr %ptr) {
3752 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_acquire:
3753 ; CHECK: bl __atomic_compare_exchange
3754 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 1
3755 %r = extractvalue { i128, i1 } %pair, 0
3759 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
3760 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_acquire_weak:
3761 ; CHECK: bl __atomic_compare_exchange
3762 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel acquire, align 1
3763 %r = extractvalue { i128, i1 } %pair, 0
3767 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
3768 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_seq_cst:
3769 ; CHECK: bl __atomic_compare_exchange
3770 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 1
3771 %r = extractvalue { i128, i1 } %pair, 0
3775 define dso_local i128 @cmpxchg_i128_unaligned_acq_rel_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
3776 ; CHECK-LABEL: cmpxchg_i128_unaligned_acq_rel_seq_cst_weak:
3777 ; CHECK: bl __atomic_compare_exchange
3778 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new acq_rel seq_cst, align 1
3779 %r = extractvalue { i128, i1 } %pair, 0
3783 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_monotonic(i128 %expected, i128 %new, ptr %ptr) {
3784 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_monotonic:
3785 ; CHECK: bl __atomic_compare_exchange
3786 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 1
3787 %r = extractvalue { i128, i1 } %pair, 0
3791 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_monotonic_weak(i128 %expected, i128 %new, ptr %ptr) {
3792 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_monotonic_weak:
3793 ; CHECK: bl __atomic_compare_exchange
3794 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst monotonic, align 1
3795 %r = extractvalue { i128, i1 } %pair, 0
3799 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_acquire(i128 %expected, i128 %new, ptr %ptr) {
3800 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_acquire:
3801 ; CHECK: bl __atomic_compare_exchange
3802 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 1
3803 %r = extractvalue { i128, i1 } %pair, 0
3807 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_acquire_weak(i128 %expected, i128 %new, ptr %ptr) {
3808 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_acquire_weak:
3809 ; CHECK: bl __atomic_compare_exchange
3810 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst acquire, align 1
3811 %r = extractvalue { i128, i1 } %pair, 0
3815 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_seq_cst(i128 %expected, i128 %new, ptr %ptr) {
3816 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_seq_cst:
3817 ; CHECK: bl __atomic_compare_exchange
3818 %pair = cmpxchg ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 1
3819 %r = extractvalue { i128, i1 } %pair, 0
3823 define dso_local i128 @cmpxchg_i128_unaligned_seq_cst_seq_cst_weak(i128 %expected, i128 %new, ptr %ptr) {
3824 ; CHECK-LABEL: cmpxchg_i128_unaligned_seq_cst_seq_cst_weak:
3825 ; CHECK: bl __atomic_compare_exchange
3826 %pair = cmpxchg weak ptr %ptr, i128 %expected, i128 %new seq_cst seq_cst, align 1
3827 %r = extractvalue { i128, i1 } %pair, 0