1; RUN: llvm-mc -triple aarch64-apple-ios -mattr=+lse %s | FileCheck %s
2
3    ; CHECK: ldaddab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
4    ; CHECK: ldaddah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
5    ; CHECK: ldadda w7, wzr, [x5] ; acquire semantics dropped since destination is zero
6    ; CHECK: ldadda x9, xzr, [sp] ; acquire semantics dropped since destination is zero
7    ldaddab w3, wzr, [x5]
8    ldaddah w5, wzr, [x0]
9    ldadda w7, wzr, [x5]
10    ldadda x9, xzr, [sp]
11
12    ; CHECK: ldaddalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
13    ; CHECK: ldaddalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
14    ; CHECK: ldaddal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
15    ; CHECK: ldaddal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
16    ldaddalb w3, wzr, [x5]
17    ldaddalh w5, wzr, [x0]
18    ldaddal w7, wzr, [x5]
19    ldaddal x9, xzr, [sp]
20
21    ; CHECK: ldclrab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
22    ; CHECK: ldclrah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
23    ; CHECK: ldclra w7, wzr, [x5] ; acquire semantics dropped since destination is zero
24    ; CHECK: ldclra x9, xzr, [sp] ; acquire semantics dropped since destination is zero
25    ldclrab w3, wzr, [x5]
26    ldclrah w5, wzr, [x0]
27    ldclra w7, wzr, [x5]
28    ldclra x9, xzr, [sp]
29
30    ; CHECK: ldclralb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
31    ; CHECK: ldclralh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
32    ; CHECK: ldclral w7, wzr, [x5] ; acquire semantics dropped since destination is zero
33    ; CHECK: ldclral x9, xzr, [sp] ; acquire semantics dropped since destination is zero
34    ldclralb w3, wzr, [x5]
35    ldclralh w5, wzr, [x0]
36    ldclral w7, wzr, [x5]
37    ldclral x9, xzr, [sp]
38
39    ; CHECK: ldeorab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
40    ; CHECK: ldeorah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
41    ; CHECK: ldeora w7, wzr, [x5] ; acquire semantics dropped since destination is zero
42    ; CHECK: ldeora x9, xzr, [sp] ; acquire semantics dropped since destination is zero
43    ldeorab w3, wzr, [x5]
44    ldeorah w5, wzr, [x0]
45    ldeora w7, wzr, [x5]
46    ldeora x9, xzr, [sp]
47
48    ; CHECK: ldeoralb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
49    ; CHECK: ldeoralh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
50    ; CHECK: ldeoral w7, wzr, [x5] ; acquire semantics dropped since destination is zero
51    ; CHECK: ldeoral x9, xzr, [sp] ; acquire semantics dropped since destination is zero
52    ldeoralb w3, wzr, [x5]
53    ldeoralh w5, wzr, [x0]
54    ldeoral w7, wzr, [x5]
55    ldeoral x9, xzr, [sp]
56
57    ; CHECK: ldsetab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
58    ; CHECK: ldsetah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
59    ; CHECK: ldseta w7, wzr, [x5] ; acquire semantics dropped since destination is zero
60    ; CHECK: ldseta x9, xzr, [sp] ; acquire semantics dropped since destination is zero
61    ldsetab w3, wzr, [x5]
62    ldsetah w5, wzr, [x0]
63    ldseta w7, wzr, [x5]
64    ldseta x9, xzr, [sp]
65
66    ; CHECK: ldsetalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
67    ; CHECK: ldsetalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
68    ; CHECK: ldsetal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
69    ; CHECK: ldsetal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
70    ldsetalb w3, wzr, [x5]
71    ldsetalh w5, wzr, [x0]
72    ldsetal w7, wzr, [x5]
73    ldsetal x9, xzr, [sp]
74
75    ; CHECK: ldsmaxab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
76    ; CHECK: ldsmaxah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
77    ; CHECK: ldsmaxa w7, wzr, [x5] ; acquire semantics dropped since destination is zero
78    ; CHECK: ldsmaxa x9, xzr, [sp] ; acquire semantics dropped since destination is zero
79    ldsmaxab w3, wzr, [x5]
80    ldsmaxah w5, wzr, [x0]
81    ldsmaxa w7, wzr, [x5]
82    ldsmaxa x9, xzr, [sp]
83
84    ; CHECK: ldsmaxalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
85    ; CHECK: ldsmaxalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
86    ; CHECK: ldsmaxal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
87    ; CHECK: ldsmaxal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
88    ldsmaxalb w3, wzr, [x5]
89    ldsmaxalh w5, wzr, [x0]
90    ldsmaxal w7, wzr, [x5]
91    ldsmaxal x9, xzr, [sp]
92
93    ; CHECK: ldsminab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
94    ; CHECK: ldsminah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
95    ; CHECK: ldsmina w7, wzr, [x5] ; acquire semantics dropped since destination is zero
96    ; CHECK: ldsmina x9, xzr, [sp] ; acquire semantics dropped since destination is zero
97    ldsminab w3, wzr, [x5]
98    ldsminah w5, wzr, [x0]
99    ldsmina w7, wzr, [x5]
100    ldsmina x9, xzr, [sp]
101
102    ; CHECK: ldsminalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
103    ; CHECK: ldsminalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
104    ; CHECK: ldsminal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
105    ; CHECK: ldsminal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
106    ldsminalb w3, wzr, [x5]
107    ldsminalh w5, wzr, [x0]
108    ldsminal w7, wzr, [x5]
109    ldsminal x9, xzr, [sp]
110
111    ; CHECK: ldumaxab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
112    ; CHECK: ldumaxah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
113    ; CHECK: ldumaxa w7, wzr, [x5] ; acquire semantics dropped since destination is zero
114    ; CHECK: ldumaxa x9, xzr, [sp] ; acquire semantics dropped since destination is zero
115    ldumaxab w3, wzr, [x5]
116    ldumaxah w5, wzr, [x0]
117    ldumaxa w7, wzr, [x5]
118    ldumaxa x9, xzr, [sp]
119
120    ; CHECK: ldumaxalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
121    ; CHECK: ldumaxalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
122    ; CHECK: ldumaxal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
123    ; CHECK: ldumaxal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
124    ldumaxalb w3, wzr, [x5]
125    ldumaxalh w5, wzr, [x0]
126    ldumaxal w7, wzr, [x5]
127    ldumaxal x9, xzr, [sp]
128
129    ; CHECK: lduminab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
130    ; CHECK: lduminah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
131    ; CHECK: ldumina w7, wzr, [x5] ; acquire semantics dropped since destination is zero
132    ; CHECK: ldumina x9, xzr, [sp] ; acquire semantics dropped since destination is zero
133    lduminab w3, wzr, [x5]
134    lduminah w5, wzr, [x0]
135    ldumina w7, wzr, [x5]
136    ldumina x9, xzr, [sp]
137
138    ; CHECK: lduminalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
139    ; CHECK: lduminalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
140    ; CHECK: lduminal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
141    ; CHECK: lduminal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
142    lduminalb w3, wzr, [x5]
143    lduminalh w5, wzr, [x0]
144    lduminal w7, wzr, [x5]
145    lduminal x9, xzr, [sp]
146
147    ; CHECK: swpab w3, wzr, [x5] ; acquire semantics dropped since destination is zero
148    ; CHECK: swpah w5, wzr, [x0] ; acquire semantics dropped since destination is zero
149    ; CHECK: swpa w7, wzr, [x5] ; acquire semantics dropped since destination is zero
150    ; CHECK: swpa x9, xzr, [sp] ; acquire semantics dropped since destination is zero
151    swpab w3, wzr, [x5]
152    swpah w5, wzr, [x0]
153    swpa w7, wzr, [x5]
154    swpa x9, xzr, [sp]
155
156    ; CHECK: swpalb w3, wzr, [x5] ; acquire semantics dropped since destination is zero
157    ; CHECK: swpalh w5, wzr, [x0] ; acquire semantics dropped since destination is zero
158    ; CHECK: swpal w7, wzr, [x5] ; acquire semantics dropped since destination is zero
159    ; CHECK: swpal x9, xzr, [sp] ; acquire semantics dropped since destination is zero
160    swpalb w3, wzr, [x5]
161    swpalh w5, wzr, [x0]
162    swpal w7, wzr, [x5]
163    swpal x9, xzr, [sp]
164
165    ; CHECK: ldaddal xzr, x3, [x0]{{$}}
166    ; CHECK: ldeora wzr, w7, [x5]{{$}}
167    ; CHECK: ldsminb w5, w9, [sp]{{$}}
168    ldaddal xzr, x3, [x0]
169    ldeora wzr, w7, [x5]
170    ldsminb w5, w9, [sp]
171
172    ; CAS instructions aren't affected.
173
174    ; CHECK: casab w3, wzr, [x5]{{$}}
175    ; CHECK: casah w5, wzr, [x0]{{$}}
176    ; CHECK: casa w7, wzr, [x5]{{$}}
177    ; CHECK: casa x9, xzr, [sp]{{$}}
178    casab w3, wzr, [x5]
179    casah w5, wzr, [x0]
180    casa w7, wzr, [x5]
181    casa x9, xzr, [sp]
182
183    ; CHECK: casalb w3, wzr, [x5]{{$}}
184    ; CHECK: casalh w5, wzr, [x0]{{$}}
185    ; CHECK: casal w7, wzr, [x5]{{$}}
186    ; CHECK: casal x9, xzr, [sp]{{$}}
187    casalb w3, wzr, [x5]
188    casalh w5, wzr, [x0]
189    casal w7, wzr, [x5]
190    casal x9, xzr, [sp]
191