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|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)"
2 ; The base test file was generated by ./llvm/test/CodeGen/AArch64/Atomics/generate-tests.py
3 ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2,+rcpc3 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
4 ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2,+rcpc3 -O1 | FileCheck %s --check-prefixes=CHECK,-O1
6 define dso_local void @store_atomic_i8_aligned_unordered(i8 %value, ptr %ptr) {
7 ; CHECK-LABEL: store_atomic_i8_aligned_unordered:
9 store atomic i8 %value, ptr %ptr unordered, align 1
13 define dso_local void @store_atomic_i8_aligned_monotonic(i8 %value, ptr %ptr) {
14 ; CHECK-LABEL: store_atomic_i8_aligned_monotonic:
15 ; CHECK: strb w0, [x1]
16 store atomic i8 %value, ptr %ptr monotonic, align 1
20 define dso_local void @store_atomic_i8_aligned_release(i8 %value, ptr %ptr) {
21 ; CHECK-LABEL: store_atomic_i8_aligned_release:
22 ; CHECK: stlrb w0, [x1]
23 store atomic i8 %value, ptr %ptr release, align 1
27 define dso_local void @store_atomic_i8_aligned_seq_cst(i8 %value, ptr %ptr) {
28 ; CHECK-LABEL: store_atomic_i8_aligned_seq_cst:
29 ; CHECK: stlrb w0, [x1]
30 store atomic i8 %value, ptr %ptr seq_cst, align 1
34 define dso_local void @store_atomic_i16_aligned_unordered(i16 %value, ptr %ptr) {
35 ; CHECK-LABEL: store_atomic_i16_aligned_unordered:
36 ; CHECK: strh w0, [x1]
37 store atomic i16 %value, ptr %ptr unordered, align 2
41 define dso_local void @store_atomic_i16_aligned_monotonic(i16 %value, ptr %ptr) {
42 ; CHECK-LABEL: store_atomic_i16_aligned_monotonic:
43 ; CHECK: strh w0, [x1]
44 store atomic i16 %value, ptr %ptr monotonic, align 2
48 define dso_local void @store_atomic_i16_aligned_release(i16 %value, ptr %ptr) {
49 ; CHECK-LABEL: store_atomic_i16_aligned_release:
50 ; CHECK: stlrh w0, [x1]
51 store atomic i16 %value, ptr %ptr release, align 2
55 define dso_local void @store_atomic_i16_aligned_seq_cst(i16 %value, ptr %ptr) {
56 ; CHECK-LABEL: store_atomic_i16_aligned_seq_cst:
57 ; CHECK: stlrh w0, [x1]
58 store atomic i16 %value, ptr %ptr seq_cst, align 2
62 define dso_local void @store_atomic_i32_aligned_unordered(i32 %value, ptr %ptr) {
63 ; CHECK-LABEL: store_atomic_i32_aligned_unordered:
65 store atomic i32 %value, ptr %ptr unordered, align 4
69 define dso_local void @store_atomic_i32_aligned_monotonic(i32 %value, ptr %ptr) {
70 ; CHECK-LABEL: store_atomic_i32_aligned_monotonic:
72 store atomic i32 %value, ptr %ptr monotonic, align 4
76 define dso_local void @store_atomic_i32_aligned_release(i32 %value, ptr %ptr) {
77 ; CHECK-LABEL: store_atomic_i32_aligned_release:
78 ; CHECK: stlr w0, [x1]
79 store atomic i32 %value, ptr %ptr release, align 4
83 define dso_local void @store_atomic_i32_aligned_seq_cst(i32 %value, ptr %ptr) {
84 ; CHECK-LABEL: store_atomic_i32_aligned_seq_cst:
85 ; CHECK: stlr w0, [x1]
86 store atomic i32 %value, ptr %ptr seq_cst, align 4
90 define dso_local void @store_atomic_i64_aligned_unordered(i64 %value, ptr %ptr) {
91 ; CHECK-LABEL: store_atomic_i64_aligned_unordered:
93 store atomic i64 %value, ptr %ptr unordered, align 8
97 define dso_local void @store_atomic_i64_aligned_monotonic(i64 %value, ptr %ptr) {
98 ; CHECK-LABEL: store_atomic_i64_aligned_monotonic:
100 store atomic i64 %value, ptr %ptr monotonic, align 8
104 define dso_local void @store_atomic_i64_aligned_release(i64 %value, ptr %ptr) {
105 ; CHECK-LABEL: store_atomic_i64_aligned_release:
106 ; CHECK: stlr x0, [x1]
107 store atomic i64 %value, ptr %ptr release, align 8
111 define dso_local void @store_atomic_i64_aligned_seq_cst(i64 %value, ptr %ptr) {
112 ; CHECK-LABEL: store_atomic_i64_aligned_seq_cst:
113 ; CHECK: stlr x0, [x1]
114 store atomic i64 %value, ptr %ptr seq_cst, align 8
118 define dso_local void @store_atomic_i128_aligned_unordered(i128 %value, ptr %ptr) {
119 ; CHECK-LABEL: store_atomic_i128_aligned_unordered:
120 ; CHECK: stp x0, x1, [x2]
121 store atomic i128 %value, ptr %ptr unordered, align 16
125 define dso_local void @store_atomic_i128_aligned_monotonic(i128 %value, ptr %ptr) {
126 ; CHECK-LABEL: store_atomic_i128_aligned_monotonic:
127 ; CHECK: stp x0, x1, [x2]
128 store atomic i128 %value, ptr %ptr monotonic, align 16
132 define dso_local void @store_atomic_i128_aligned_release(i128 %value, ptr %ptr) {
133 ; CHECK-LABEL: store_atomic_i128_aligned_release:
134 ; CHECK: stilp x0, x1, [x2]
135 store atomic i128 %value, ptr %ptr release, align 16
139 define dso_local void @store_atomic_i128_aligned_seq_cst(i128 %value, ptr %ptr) {
140 ; CHECK-LABEL: store_atomic_i128_aligned_seq_cst:
142 ; CHECK: stp x0, x1, [x2]
144 store atomic i128 %value, ptr %ptr seq_cst, align 16
148 define dso_local void @store_atomic_i8_unaligned_unordered(i8 %value, ptr %ptr) {
149 ; CHECK-LABEL: store_atomic_i8_unaligned_unordered:
150 ; CHECK: strb w0, [x1]
151 store atomic i8 %value, ptr %ptr unordered, align 1
155 define dso_local void @store_atomic_i8_unaligned_monotonic(i8 %value, ptr %ptr) {
156 ; CHECK-LABEL: store_atomic_i8_unaligned_monotonic:
157 ; CHECK: strb w0, [x1]
158 store atomic i8 %value, ptr %ptr monotonic, align 1
162 define dso_local void @store_atomic_i8_unaligned_release(i8 %value, ptr %ptr) {
163 ; CHECK-LABEL: store_atomic_i8_unaligned_release:
164 ; CHECK: stlrb w0, [x1]
165 store atomic i8 %value, ptr %ptr release, align 1
169 define dso_local void @store_atomic_i8_unaligned_seq_cst(i8 %value, ptr %ptr) {
170 ; CHECK-LABEL: store_atomic_i8_unaligned_seq_cst:
171 ; CHECK: stlrb w0, [x1]
172 store atomic i8 %value, ptr %ptr seq_cst, align 1
176 define dso_local void @store_atomic_i16_unaligned_unordered(i16 %value, ptr %ptr) {
177 ; CHECK-LABEL: store_atomic_i16_unaligned_unordered:
178 ; CHECK: bl __atomic_store
179 store atomic i16 %value, ptr %ptr unordered, align 1
183 define dso_local void @store_atomic_i16_unaligned_monotonic(i16 %value, ptr %ptr) {
184 ; CHECK-LABEL: store_atomic_i16_unaligned_monotonic:
185 ; CHECK: bl __atomic_store
186 store atomic i16 %value, ptr %ptr monotonic, align 1
190 define dso_local void @store_atomic_i16_unaligned_release(i16 %value, ptr %ptr) {
191 ; CHECK-LABEL: store_atomic_i16_unaligned_release:
192 ; CHECK: bl __atomic_store
193 store atomic i16 %value, ptr %ptr release, align 1
197 define dso_local void @store_atomic_i16_unaligned_seq_cst(i16 %value, ptr %ptr) {
198 ; CHECK-LABEL: store_atomic_i16_unaligned_seq_cst:
199 ; CHECK: bl __atomic_store
200 store atomic i16 %value, ptr %ptr seq_cst, align 1
204 define dso_local void @store_atomic_i32_unaligned_unordered(i32 %value, ptr %ptr) {
205 ; CHECK-LABEL: store_atomic_i32_unaligned_unordered:
206 ; CHECK: bl __atomic_store
207 store atomic i32 %value, ptr %ptr unordered, align 1
211 define dso_local void @store_atomic_i32_unaligned_monotonic(i32 %value, ptr %ptr) {
212 ; CHECK-LABEL: store_atomic_i32_unaligned_monotonic:
213 ; CHECK: bl __atomic_store
214 store atomic i32 %value, ptr %ptr monotonic, align 1
218 define dso_local void @store_atomic_i32_unaligned_release(i32 %value, ptr %ptr) {
219 ; CHECK-LABEL: store_atomic_i32_unaligned_release:
220 ; CHECK: bl __atomic_store
221 store atomic i32 %value, ptr %ptr release, align 1
225 define dso_local void @store_atomic_i32_unaligned_seq_cst(i32 %value, ptr %ptr) {
226 ; CHECK-LABEL: store_atomic_i32_unaligned_seq_cst:
227 ; CHECK: bl __atomic_store
228 store atomic i32 %value, ptr %ptr seq_cst, align 1
232 define dso_local void @store_atomic_i64_unaligned_unordered(i64 %value, ptr %ptr) {
233 ; CHECK-LABEL: store_atomic_i64_unaligned_unordered:
234 ; CHECK: bl __atomic_store
235 store atomic i64 %value, ptr %ptr unordered, align 1
239 define dso_local void @store_atomic_i64_unaligned_monotonic(i64 %value, ptr %ptr) {
240 ; CHECK-LABEL: store_atomic_i64_unaligned_monotonic:
241 ; CHECK: bl __atomic_store
242 store atomic i64 %value, ptr %ptr monotonic, align 1
246 define dso_local void @store_atomic_i64_unaligned_release(i64 %value, ptr %ptr) {
247 ; CHECK-LABEL: store_atomic_i64_unaligned_release:
248 ; CHECK: bl __atomic_store
249 store atomic i64 %value, ptr %ptr release, align 1
253 define dso_local void @store_atomic_i64_unaligned_seq_cst(i64 %value, ptr %ptr) {
254 ; CHECK-LABEL: store_atomic_i64_unaligned_seq_cst:
255 ; CHECK: bl __atomic_store
256 store atomic i64 %value, ptr %ptr seq_cst, align 1
260 define dso_local void @store_atomic_i128_unaligned_unordered(i128 %value, ptr %ptr) {
261 ; CHECK-LABEL: store_atomic_i128_unaligned_unordered:
262 ; CHECK: bl __atomic_store
263 store atomic i128 %value, ptr %ptr unordered, align 1
267 define dso_local void @store_atomic_i128_unaligned_monotonic(i128 %value, ptr %ptr) {
268 ; CHECK-LABEL: store_atomic_i128_unaligned_monotonic:
269 ; CHECK: bl __atomic_store
270 store atomic i128 %value, ptr %ptr monotonic, align 1
274 define dso_local void @store_atomic_i128_unaligned_release(i128 %value, ptr %ptr) {
275 ; CHECK-LABEL: store_atomic_i128_unaligned_release:
276 ; CHECK: bl __atomic_store
277 store atomic i128 %value, ptr %ptr release, align 1
281 define dso_local void @store_atomic_i128_unaligned_seq_cst(i128 %value, ptr %ptr) {
282 ; CHECK-LABEL: store_atomic_i128_unaligned_seq_cst:
283 ; CHECK: bl __atomic_store
284 store atomic i128 %value, ptr %ptr seq_cst, align 1
287 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: