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,+lse128 -O0 | FileCheck %s --check-prefixes=CHECK,-O0
4 ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64_be -mattr=+lse2,+lse128 -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 x1, x0, [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 x1, x0, [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: swppl 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:
141 ; CHECK: swppal x0, x1, [x2]
142 store atomic i128 %value, ptr %ptr seq_cst, align 16
146 define dso_local void @store_atomic_i8_unaligned_unordered(i8 %value, ptr %ptr) {
147 ; CHECK-LABEL: store_atomic_i8_unaligned_unordered:
148 ; CHECK: strb w0, [x1]
149 store atomic i8 %value, ptr %ptr unordered, align 1
153 define dso_local void @store_atomic_i8_unaligned_monotonic(i8 %value, ptr %ptr) {
154 ; CHECK-LABEL: store_atomic_i8_unaligned_monotonic:
155 ; CHECK: strb w0, [x1]
156 store atomic i8 %value, ptr %ptr monotonic, align 1
160 define dso_local void @store_atomic_i8_unaligned_release(i8 %value, ptr %ptr) {
161 ; CHECK-LABEL: store_atomic_i8_unaligned_release:
162 ; CHECK: stlrb w0, [x1]
163 store atomic i8 %value, ptr %ptr release, align 1
167 define dso_local void @store_atomic_i8_unaligned_seq_cst(i8 %value, ptr %ptr) {
168 ; CHECK-LABEL: store_atomic_i8_unaligned_seq_cst:
169 ; CHECK: stlrb w0, [x1]
170 store atomic i8 %value, ptr %ptr seq_cst, align 1
174 define dso_local void @store_atomic_i16_unaligned_unordered(i16 %value, ptr %ptr) {
175 ; CHECK-LABEL: store_atomic_i16_unaligned_unordered:
176 ; CHECK: bl __atomic_store
177 store atomic i16 %value, ptr %ptr unordered, align 1
181 define dso_local void @store_atomic_i16_unaligned_monotonic(i16 %value, ptr %ptr) {
182 ; CHECK-LABEL: store_atomic_i16_unaligned_monotonic:
183 ; CHECK: bl __atomic_store
184 store atomic i16 %value, ptr %ptr monotonic, align 1
188 define dso_local void @store_atomic_i16_unaligned_release(i16 %value, ptr %ptr) {
189 ; CHECK-LABEL: store_atomic_i16_unaligned_release:
190 ; CHECK: bl __atomic_store
191 store atomic i16 %value, ptr %ptr release, align 1
195 define dso_local void @store_atomic_i16_unaligned_seq_cst(i16 %value, ptr %ptr) {
196 ; CHECK-LABEL: store_atomic_i16_unaligned_seq_cst:
197 ; CHECK: bl __atomic_store
198 store atomic i16 %value, ptr %ptr seq_cst, align 1
202 define dso_local void @store_atomic_i32_unaligned_unordered(i32 %value, ptr %ptr) {
203 ; CHECK-LABEL: store_atomic_i32_unaligned_unordered:
204 ; CHECK: bl __atomic_store
205 store atomic i32 %value, ptr %ptr unordered, align 1
209 define dso_local void @store_atomic_i32_unaligned_monotonic(i32 %value, ptr %ptr) {
210 ; CHECK-LABEL: store_atomic_i32_unaligned_monotonic:
211 ; CHECK: bl __atomic_store
212 store atomic i32 %value, ptr %ptr monotonic, align 1
216 define dso_local void @store_atomic_i32_unaligned_release(i32 %value, ptr %ptr) {
217 ; CHECK-LABEL: store_atomic_i32_unaligned_release:
218 ; CHECK: bl __atomic_store
219 store atomic i32 %value, ptr %ptr release, align 1
223 define dso_local void @store_atomic_i32_unaligned_seq_cst(i32 %value, ptr %ptr) {
224 ; CHECK-LABEL: store_atomic_i32_unaligned_seq_cst:
225 ; CHECK: bl __atomic_store
226 store atomic i32 %value, ptr %ptr seq_cst, align 1
230 define dso_local void @store_atomic_i64_unaligned_unordered(i64 %value, ptr %ptr) {
231 ; CHECK-LABEL: store_atomic_i64_unaligned_unordered:
232 ; CHECK: bl __atomic_store
233 store atomic i64 %value, ptr %ptr unordered, align 1
237 define dso_local void @store_atomic_i64_unaligned_monotonic(i64 %value, ptr %ptr) {
238 ; CHECK-LABEL: store_atomic_i64_unaligned_monotonic:
239 ; CHECK: bl __atomic_store
240 store atomic i64 %value, ptr %ptr monotonic, align 1
244 define dso_local void @store_atomic_i64_unaligned_release(i64 %value, ptr %ptr) {
245 ; CHECK-LABEL: store_atomic_i64_unaligned_release:
246 ; CHECK: bl __atomic_store
247 store atomic i64 %value, ptr %ptr release, align 1
251 define dso_local void @store_atomic_i64_unaligned_seq_cst(i64 %value, ptr %ptr) {
252 ; CHECK-LABEL: store_atomic_i64_unaligned_seq_cst:
253 ; CHECK: bl __atomic_store
254 store atomic i64 %value, ptr %ptr seq_cst, align 1
258 define dso_local void @store_atomic_i128_unaligned_unordered(i128 %value, ptr %ptr) {
259 ; CHECK-LABEL: store_atomic_i128_unaligned_unordered:
260 ; CHECK: bl __atomic_store
261 store atomic i128 %value, ptr %ptr unordered, align 1
265 define dso_local void @store_atomic_i128_unaligned_monotonic(i128 %value, ptr %ptr) {
266 ; CHECK-LABEL: store_atomic_i128_unaligned_monotonic:
267 ; CHECK: bl __atomic_store
268 store atomic i128 %value, ptr %ptr monotonic, align 1
272 define dso_local void @store_atomic_i128_unaligned_release(i128 %value, ptr %ptr) {
273 ; CHECK-LABEL: store_atomic_i128_unaligned_release:
274 ; CHECK: bl __atomic_store
275 store atomic i128 %value, ptr %ptr release, align 1
279 define dso_local void @store_atomic_i128_unaligned_seq_cst(i128 %value, ptr %ptr) {
280 ; CHECK-LABEL: store_atomic_i128_unaligned_seq_cst:
281 ; CHECK: bl __atomic_store
282 store atomic i128 %value, ptr %ptr seq_cst, align 1
285 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: