1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
5 name: zextload_s32_from_s16
12 ; CHECK-LABEL: name: zextload_s32_from_s16
13 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
14 ; CHECK-NEXT: [[LDRHHui:%[0-9]+]]:gpr32 = LDRHHui [[COPY]], 0 :: (load (s16))
15 ; CHECK-NEXT: $w0 = COPY [[LDRHHui]]
17 %1:gpr(s32) = G_ZEXTLOAD %0 :: (load (s16))
21 name: zextload_s32_from_s16_not_combined
28 ; CHECK-LABEL: name: zextload_s32_from_s16_not_combined
29 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
30 ; CHECK-NEXT: [[LDRHHui:%[0-9]+]]:gpr32 = LDRHHui [[COPY]], 0 :: (load (s16))
31 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY [[LDRHHui]]
32 ; CHECK-NEXT: $w0 = COPY [[COPY1]]
34 %1:gpr(s16) = G_LOAD %0 :: (load (s16))
35 %2:gpr(s32) = G_ZEXT %1
46 ; CHECK-LABEL: name: i32_to_i64
47 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
48 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32))
49 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[LDRWui]], %subreg.sub_32
50 ; CHECK-NEXT: $x0 = COPY [[SUBREG_TO_REG]]
51 ; CHECK-NEXT: RET_ReallyLR implicit $x0
53 %2:gpr(s64) = G_ZEXTLOAD %0(p0) :: (load (s32))
55 RET_ReallyLR implicit $x0
66 ; CHECK-LABEL: name: i16_to_i64
67 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
68 ; CHECK-NEXT: [[LDRHHui:%[0-9]+]]:gpr32 = LDRHHui [[COPY]], 0 :: (load (s16))
69 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[LDRHHui]], %subreg.sub_32
70 ; CHECK-NEXT: $x0 = COPY [[SUBREG_TO_REG]]
71 ; CHECK-NEXT: RET_ReallyLR implicit $x0
73 %2:gpr(s64) = G_ZEXTLOAD %0(p0) :: (load (s16))
75 RET_ReallyLR implicit $x0
86 ; CHECK-LABEL: name: i8_to_i64
87 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
88 ; CHECK-NEXT: [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[COPY]], 0 :: (load (s8))
89 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64all = SUBREG_TO_REG 0, [[LDRBBui]], %subreg.sub_32
90 ; CHECK-NEXT: $x0 = COPY [[SUBREG_TO_REG]]
91 ; CHECK-NEXT: RET_ReallyLR implicit $x0
93 %2:gpr(s64) = G_ZEXTLOAD %0(p0) :: (load (s8))
95 RET_ReallyLR implicit $x0
101 regBankSelected: true
106 ; CHECK-LABEL: name: i8_to_i32
107 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
108 ; CHECK-NEXT: [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[COPY]], 0 :: (load (s8))
109 ; CHECK-NEXT: $w0 = COPY [[LDRBBui]]
110 ; CHECK-NEXT: RET_ReallyLR implicit $w0
111 %0:gpr(p0) = COPY $x0
112 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load (s8))
114 RET_ReallyLR implicit $w0
120 regBankSelected: true
125 ; CHECK-LABEL: name: i16_to_i32
126 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
127 ; CHECK-NEXT: [[LDRHHui:%[0-9]+]]:gpr32 = LDRHHui [[COPY]], 0 :: (load (s16))
128 ; CHECK-NEXT: $w0 = COPY [[LDRHHui]]
129 ; CHECK-NEXT: RET_ReallyLR implicit $w0
130 %0:gpr(p0) = COPY $x0
131 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load (s16))
133 RET_ReallyLR implicit $w0
138 name: zextload_s32_from_s8_atomic_unordered
140 regBankSelected: true
145 ; CHECK-LABEL: name: zextload_s32_from_s8_atomic_unordered
146 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
147 ; CHECK-NEXT: [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[COPY]], 0 :: (load unordered (s8))
148 ; CHECK-NEXT: $w0 = COPY [[LDRBBui]]
149 ; CHECK-NEXT: RET_ReallyLR implicit $w0
150 %0:gpr(p0) = COPY $x0
151 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load unordered (s8))
153 RET_ReallyLR implicit $w0
158 name: zextload_s32_from_s8_atomic_monotonic
160 regBankSelected: true
165 ; CHECK-LABEL: name: zextload_s32_from_s8_atomic_monotonic
166 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
167 ; CHECK-NEXT: [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[COPY]], 0 :: (load monotonic (s8))
168 ; CHECK-NEXT: $w0 = COPY [[LDRBBui]]
169 ; CHECK-NEXT: RET_ReallyLR implicit $w0
170 %0:gpr(p0) = COPY $x0
171 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load monotonic (s8))
173 RET_ReallyLR implicit $w0
178 name: zextload_s32_from_s8_atomic_acquire
180 regBankSelected: true
185 ; CHECK-LABEL: name: zextload_s32_from_s8_atomic_acquire
186 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
187 ; CHECK-NEXT: [[LDARB:%[0-9]+]]:gpr32 = LDARB [[COPY]] :: (load acquire (s8))
188 ; CHECK-NEXT: $w0 = COPY [[LDARB]]
189 ; CHECK-NEXT: RET_ReallyLR implicit $w0
190 %0:gpr(p0) = COPY $x0
191 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load acquire (s8))
193 RET_ReallyLR implicit $w0
198 name: zextload_s32_from_s8_atomic_seq_cst
200 regBankSelected: true
205 ; CHECK-LABEL: name: zextload_s32_from_s8_atomic_seq_cst
206 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
207 ; CHECK-NEXT: [[LDARB:%[0-9]+]]:gpr32 = LDARB [[COPY]] :: (load seq_cst (s8))
208 ; CHECK-NEXT: $w0 = COPY [[LDARB]]
209 ; CHECK-NEXT: RET_ReallyLR implicit $w0
210 %0:gpr(p0) = COPY $x0
211 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load seq_cst (s8))
213 RET_ReallyLR implicit $w0
218 name: zextload_s32_from_s16_atomic_unordered
220 regBankSelected: true
225 ; CHECK-LABEL: name: zextload_s32_from_s16_atomic_unordered
226 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
227 ; CHECK-NEXT: [[LDRHHui:%[0-9]+]]:gpr32 = LDRHHui [[COPY]], 0 :: (load unordered (s16))
228 ; CHECK-NEXT: $w0 = COPY [[LDRHHui]]
229 ; CHECK-NEXT: RET_ReallyLR implicit $w0
230 %0:gpr(p0) = COPY $x0
231 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load unordered (s16))
233 RET_ReallyLR implicit $w0
238 name: zextload_s32_from_s16_atomic_monotonic
240 regBankSelected: true
245 ; CHECK-LABEL: name: zextload_s32_from_s16_atomic_monotonic
246 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
247 ; CHECK-NEXT: [[LDRHHui:%[0-9]+]]:gpr32 = LDRHHui [[COPY]], 0 :: (load monotonic (s16))
248 ; CHECK-NEXT: $w0 = COPY [[LDRHHui]]
249 ; CHECK-NEXT: RET_ReallyLR implicit $w0
250 %0:gpr(p0) = COPY $x0
251 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load monotonic (s16))
253 RET_ReallyLR implicit $w0
258 name: zextload_s32_from_s16_atomic_acquire
260 regBankSelected: true
265 ; CHECK-LABEL: name: zextload_s32_from_s16_atomic_acquire
266 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
267 ; CHECK-NEXT: [[LDARH:%[0-9]+]]:gpr32 = LDARH [[COPY]] :: (load acquire (s16))
268 ; CHECK-NEXT: $w0 = COPY [[LDARH]]
269 ; CHECK-NEXT: RET_ReallyLR implicit $w0
270 %0:gpr(p0) = COPY $x0
271 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load acquire (s16))
273 RET_ReallyLR implicit $w0
278 name: zextload_s32_from_s16_atomic_seq_cst
280 regBankSelected: true
285 ; CHECK-LABEL: name: zextload_s32_from_s16_atomic_seq_cst
286 ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
287 ; CHECK-NEXT: [[LDARH:%[0-9]+]]:gpr32 = LDARH [[COPY]] :: (load seq_cst (s16))
288 ; CHECK-NEXT: $w0 = COPY [[LDARH]]
289 ; CHECK-NEXT: RET_ReallyLR implicit $w0
290 %0:gpr(p0) = COPY $x0
291 %2:gpr(s32) = G_ZEXTLOAD %0(p0) :: (load seq_cst (s16))
293 RET_ReallyLR implicit $w0