1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 define void @strxrox(i64* %addr) { ret void }
6 define void @strxrox_p0(i64* %addr) { ret void }
7 define void @strdrox(i64* %addr) { ret void }
8 define void @strwrox(i64* %addr) { ret void }
9 define void @strsrox(i64* %addr) { ret void }
10 define void @strhrox(i64* %addr) { ret void }
11 define void @strqrox(i64* %addr) { ret void }
12 define void @shl(i64* %addr) { ret void }
13 define void @shl_p0(i64* %addr) { ret void }
21 tracksRegLiveness: true
22 machineFunctionInfo: {}
25 liveins: $x0, $x1, $x2
26 ; CHECK-LABEL: name: strxrox
27 ; CHECK: liveins: $x0, $x1, $x2
28 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
29 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
30 ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
31 ; CHECK: STRXroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store (s64) into %ir.addr)
33 %1:gpr(s64) = COPY $x1
34 %ptr:gpr(p0) = G_PTR_ADD %0, %1
35 %3:gpr(s64) = COPY $x2
36 G_STORE %3, %ptr :: (store (s64) into %ir.addr)
43 tracksRegLiveness: true
44 machineFunctionInfo: {}
47 liveins: $x0, $x1, $x2
48 ; CHECK-LABEL: name: strxrox_p0
49 ; CHECK: liveins: $x0, $x1, $x2
50 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
51 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
52 ; CHECK: [[COPY2:%[0-9]+]]:gpr64all = COPY $x2
53 ; CHECK: [[COPY3:%[0-9]+]]:gpr64 = COPY [[COPY2]]
54 ; CHECK: STRXroX [[COPY3]], [[COPY]], [[COPY1]], 0, 0 :: (store (p0) into %ir.addr)
56 %1:gpr(s64) = COPY $x1
57 %ptr:gpr(p0) = G_PTR_ADD %0, %1
59 G_STORE %3, %ptr :: (store (p0) into %ir.addr)
66 tracksRegLiveness: true
67 machineFunctionInfo: {}
70 liveins: $x0, $x1, $d2
71 ; CHECK-LABEL: name: strdrox
72 ; CHECK: liveins: $x0, $x1, $d2
73 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
74 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
75 ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY $d2
76 ; CHECK: STRDroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store (s64) into %ir.addr)
78 %1:gpr(s64) = COPY $x1
79 %ptr:gpr(p0) = G_PTR_ADD %0, %1
80 %3:fpr(s64) = COPY $d2
81 G_STORE %3, %ptr :: (store (s64) into %ir.addr)
88 tracksRegLiveness: true
89 machineFunctionInfo: {}
92 liveins: $x0, $x1, $w2
93 ; CHECK-LABEL: name: strwrox
94 ; CHECK: liveins: $x0, $x1, $w2
95 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
96 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
97 ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY $w2
98 ; CHECK: STRWroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store (s32) into %ir.addr)
100 %1:gpr(s64) = COPY $x1
101 %ptr:gpr(p0) = G_PTR_ADD %0, %1
102 %3:gpr(s32) = COPY $w2
103 G_STORE %3, %ptr :: (store (s32) into %ir.addr)
109 regBankSelected: true
110 tracksRegLiveness: true
111 machineFunctionInfo: {}
114 liveins: $x0, $x1, $s2
115 ; CHECK-LABEL: name: strsrox
116 ; CHECK: liveins: $x0, $x1, $s2
117 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
118 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
119 ; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY $s2
120 ; CHECK: STRSroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store (s32) into %ir.addr)
121 %0:gpr(p0) = COPY $x0
122 %1:gpr(s64) = COPY $x1
123 %ptr:gpr(p0) = G_PTR_ADD %0, %1
124 %3:fpr(s32) = COPY $s2
125 G_STORE %3, %ptr :: (store (s32) into %ir.addr)
131 regBankSelected: true
132 tracksRegLiveness: true
133 machineFunctionInfo: {}
136 liveins: $x0, $x1, $h0
137 ; CHECK-LABEL: name: strhrox
138 ; CHECK: liveins: $x0, $x1, $h0
139 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
140 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
141 ; CHECK: [[COPY2:%[0-9]+]]:fpr16 = COPY $h0
142 ; CHECK: STRHroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store (s16) into %ir.addr)
143 %0:gpr(p0) = COPY $x0
144 %1:gpr(s64) = COPY $x1
145 %ptr:gpr(p0) = G_PTR_ADD %0, %1
146 %3:fpr(s16) = COPY $h0
147 G_STORE %3, %ptr :: (store (s16) into %ir.addr)
153 regBankSelected: true
154 tracksRegLiveness: true
155 machineFunctionInfo: {}
158 liveins: $x0, $x1, $q2
159 ; CHECK-LABEL: name: strqrox
160 ; CHECK: liveins: $x0, $x1, $q2
161 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
162 ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
163 ; CHECK: [[COPY2:%[0-9]+]]:fpr128 = COPY $q2
164 ; CHECK: STRQroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store (<2 x s64>) into %ir.addr)
165 %0:gpr(p0) = COPY $x0
166 %1:gpr(s64) = COPY $x1
167 %ptr:gpr(p0) = G_PTR_ADD %0, %1
168 %2:fpr(<2 x s64>) = COPY $q2
169 G_STORE %2, %ptr :: (store (<2 x s64>) into %ir.addr)
175 regBankSelected: true
176 tracksRegLiveness: true
177 machineFunctionInfo: {}
180 liveins: $x0, $x1, $x2
181 ; CHECK-LABEL: name: shl
182 ; CHECK: liveins: $x0, $x1, $x2
183 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
184 ; CHECK: [[COPY1:%[0-9]+]]:gpr64sp = COPY $x1
185 ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
186 ; CHECK: STRXroX [[COPY2]], [[COPY1]], [[COPY]], 0, 1 :: (store (s64) into %ir.addr)
187 %0:gpr(s64) = COPY $x0
188 %1:gpr(s64) = G_CONSTANT i64 3
189 %2:gpr(s64) = G_SHL %0, %1(s64)
190 %3:gpr(p0) = COPY $x1
191 %ptr:gpr(p0) = G_PTR_ADD %3, %2
192 %4:gpr(s64) = COPY $x2
193 G_STORE %4, %ptr :: (store (s64) into %ir.addr)
199 regBankSelected: true
200 tracksRegLiveness: true
201 machineFunctionInfo: {}
204 liveins: $x0, $x1, $x2
205 ; CHECK-LABEL: name: shl_p0
206 ; CHECK: liveins: $x0, $x1, $x2
207 ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
208 ; CHECK: [[COPY1:%[0-9]+]]:gpr64sp = COPY $x1
209 ; CHECK: [[COPY2:%[0-9]+]]:gpr64all = COPY $x2
210 ; CHECK: [[COPY3:%[0-9]+]]:gpr64 = COPY [[COPY2]]
211 ; CHECK: STRXroX [[COPY3]], [[COPY1]], [[COPY]], 0, 1 :: (store (p0) into %ir.addr)
212 %0:gpr(s64) = COPY $x0
213 %1:gpr(s64) = G_CONSTANT i64 3
214 %2:gpr(s64) = G_SHL %0, %1(s64)
215 %3:gpr(p0) = COPY $x1
216 %ptr:gpr(p0) = G_PTR_ADD %3, %2
217 %4:gpr(p0) = COPY $x2
218 G_STORE %4, %ptr :: (store (p0) into %ir.addr)