1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=thumbv8.1m.main -mattr=+mve -run-pass=arm-low-overhead-loops %s -verify-machineinstrs -o - | FileCheck %s
4 ; Function Attrs: nofree norecurse nounwind
5 define dso_local void @test_vldr_p0(i32* noalias nocapture %arg, i32* noalias nocapture readonly %arg1, i32 %arg2, i16 zeroext %mask) local_unnamed_addr #0 {
7 %tmp = icmp eq i32 %arg2, 0
8 %tmp1 = add i32 %arg2, 3
9 %tmp2 = lshr i32 %tmp1, 2
10 %tmp3 = shl nuw i32 %tmp2, 2
11 %tmp4 = add i32 %tmp3, -4
12 %tmp5 = lshr i32 %tmp4, 2
13 %tmp6 = add nuw nsw i32 %tmp5, 1
14 %conv.mask = zext i16 %mask to i32
15 %invariant.mask = call <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32 %conv.mask)
16 br i1 %tmp, label %bb27, label %bb3
19 %start = call i32 @llvm.start.loop.iterations.i32(i32 %tmp6)
22 bb9: ; preds = %bb9, %bb3
23 %lsr.iv2 = phi i32* [ %scevgep3, %bb9 ], [ %arg1, %bb3 ]
24 %lsr.iv = phi i32* [ %scevgep, %bb9 ], [ %arg, %bb3 ]
25 %tmp7 = phi i32 [ %start, %bb3 ], [ %tmp12, %bb9 ]
26 %tmp8 = phi i32 [ %arg2, %bb3 ], [ %tmp11, %bb9 ]
27 %lsr.iv24 = bitcast i32* %lsr.iv2 to <4 x i32>*
28 %lsr.iv1 = bitcast i32* %lsr.iv to <4 x i32>*
29 %vctp = call <4 x i1> @llvm.arm.mve.vctp32(i32 %tmp8)
30 %and = and <4 x i1> %vctp, %invariant.mask
31 %tmp11 = sub i32 %tmp8, 4
32 %tmp17 = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %lsr.iv24, i32 4, <4 x i1> %and, <4 x i32> undef)
33 %tmp22 = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %lsr.iv1, i32 4, <4 x i1> %and, <4 x i32> undef)
34 %tmp23 = mul nsw <4 x i32> %tmp22, %tmp17
35 call void @llvm.masked.store.v4i32.p0v4i32(<4 x i32> %tmp23, <4 x i32>* %lsr.iv1, i32 4, <4 x i1> %and)
36 %tmp12 = call i32 @llvm.loop.decrement.reg.i32.i32.i32(i32 %tmp7, i32 1)
37 %tmp13 = icmp ne i32 %tmp12, 0
38 %scevgep = getelementptr i32, i32* %lsr.iv, i32 4
39 %scevgep3 = getelementptr i32, i32* %lsr.iv2, i32 4
40 br i1 %tmp13, label %bb9, label %bb27
42 bb27: ; preds = %bb9, %bb
46 define dso_local void @test_vstr_p0(i32* noalias nocapture %arg, i32* noalias nocapture readonly %arg1, i32 %arg2, i16 zeroext %mask) {
51 bb9: ; preds = %bb9, %bb3
53 bb27: ; preds = %bb9, %bb
57 define dso_local void @test_vmsr_p0(i32* noalias nocapture %arg, i32* noalias nocapture readonly %arg1, i32 %arg2, i16 zeroext %mask) {
62 bb9: ; preds = %bb9, %bb3
64 bb27: ; preds = %bb9, %bb
68 define dso_local void @test_vmrs_p0(i32* noalias nocapture %arg, i32* noalias nocapture readonly %arg1, i32 %arg2, i16 zeroext %mask) {
73 bb9: ; preds = %bb9, %bb3
75 bb27: ; preds = %bb9, %bb
79 declare <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>*, i32 immarg, <4 x i1>, <4 x i32>) #1
80 declare void @llvm.masked.store.v4i32.p0v4i32(<4 x i32>, <4 x i32>*, i32 immarg, <4 x i1>) #2
81 declare i32 @llvm.start.loop.iterations.i32(i32) #3
82 declare i32 @llvm.loop.decrement.reg.i32.i32.i32(i32, i32) #3
83 declare <4 x i1> @llvm.arm.mve.vctp32(i32) #4
84 declare <4 x i1> @llvm.arm.mve.pred.i2v.v4i1(i32) #4
90 exposesReturnsTwice: false
92 regBankSelected: false
95 tracksRegLiveness: true
99 - { reg: '$r0', virtual-reg: '' }
100 - { reg: '$r1', virtual-reg: '' }
101 - { reg: '$r2', virtual-reg: '' }
102 - { reg: '$r3', virtual-reg: '' }
104 isFrameAddressTaken: false
105 isReturnAddressTaken: false
115 cvBytesOfCalleeSavedRegisters: 0
116 hasOpaqueSPAdjustment: false
118 hasMustTailInVarArgFunc: false
124 - { id: 0, name: '', type: spill-slot, offset: -12, size: 4, alignment: 4,
125 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
126 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
127 - { id: 1, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
128 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
129 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
130 - { id: 2, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
131 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true,
132 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
135 machineFunctionInfo: {}
137 ; CHECK-LABEL: name: test_vldr_p0
139 ; CHECK: successors: %bb.3(0x30000000), %bb.1(0x50000000)
140 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
141 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $lr, implicit-def $sp, implicit $sp
142 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
143 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
144 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
145 ; CHECK: dead $r7 = frame-setup tMOVr $sp, 14 /* CC::al */, $noreg
146 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_register $r7
147 ; CHECK: $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
148 ; CHECK: tCBZ $r2, %bb.3
150 ; CHECK: successors: %bb.2(0x80000000)
151 ; CHECK: liveins: $r0, $r1, $r2, $r3
152 ; CHECK: $vpr = VMSR_P0 killed $r3, 14 /* CC::al */, $noreg
153 ; CHECK: VSTR_P0_off killed renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
154 ; CHECK: $r3 = tMOVr $r0, 14 /* CC::al */, $noreg
155 ; CHECK: $lr = MVE_DLSTP_32 killed renamable $r2
157 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
158 ; CHECK: liveins: $lr, $r0, $r1, $r3
159 ; CHECK: renamable $vpr = VLDR_P0_off $sp, 0, 14 /* CC::al */, $noreg :: (load (s32) from %stack.0)
160 ; CHECK: MVE_VPST 4, implicit $vpr
161 ; CHECK: renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.lsr.iv24, align 4)
162 ; CHECK: renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr :: (load (s128) from %ir.lsr.iv1, align 4)
163 ; CHECK: renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
164 ; CHECK: MVE_VPST 8, implicit $vpr
165 ; CHECK: MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr :: (store (s128) into %ir.lsr.iv1, align 4)
166 ; CHECK: $r0 = tMOVr $r3, 14 /* CC::al */, $noreg
167 ; CHECK: $lr = MVE_LETP killed renamable $lr, %bb.2
169 ; CHECK: $sp = tADDspi $sp, 1, 14 /* CC::al */, $noreg
170 ; CHECK: tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
172 successors: %bb.3(0x30000000), %bb.1(0x50000000)
173 liveins: $r0, $r1, $r2, $r3, $lr
175 frame-setup tPUSH 14, $noreg, killed $lr, implicit-def $sp, implicit $sp
176 frame-setup CFI_INSTRUCTION def_cfa_offset 8
177 frame-setup CFI_INSTRUCTION offset $lr, -4
178 frame-setup CFI_INSTRUCTION offset $r7, -8
179 $r7 = frame-setup tMOVr $sp, 14, $noreg
180 frame-setup CFI_INSTRUCTION def_cfa_register $r7
181 $sp = frame-setup tSUBspi $sp, 1, 14, $noreg
185 successors: %bb.2(0x80000000)
186 liveins: $r0, $r1, $r2, $r3
188 renamable $r12 = t2ADDri renamable $r2, 3, 14, $noreg, $noreg
189 renamable $lr = t2MOVi 1, 14, $noreg, $noreg
190 renamable $r12 = t2BICri killed renamable $r12, 3, 14, $noreg, $noreg
191 $vpr = VMSR_P0 killed $r3, 14, $noreg
192 renamable $r12 = t2SUBri killed renamable $r12, 4, 14, $noreg, $noreg
193 VSTR_P0_off killed renamable $vpr, $sp, 0, 14, $noreg :: (store (s32) into %stack.0)
194 $r3 = tMOVr $r0, 14, $noreg
195 renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14, $noreg, $noreg
196 $lr = t2DoLoopStart renamable $lr
199 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
200 liveins: $lr, $r0, $r1, $r2, $r3
202 renamable $vpr = VLDR_P0_off $sp, 0, 14, $noreg :: (load (s32) from %stack.0)
203 MVE_VPST 2, implicit $vpr
204 renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
205 renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.lsr.iv24, align 4)
206 renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr :: (load (s128) from %ir.lsr.iv1, align 4)
207 renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14, $noreg
208 renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
209 MVE_VPST 8, implicit $vpr
210 MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr :: (store (s128) into %ir.lsr.iv1, align 4)
211 renamable $lr = t2LoopDec killed renamable $lr, 1
212 $r0 = tMOVr $r3, 14, $noreg
213 t2LoopEnd renamable $lr, %bb.2, implicit-def dead $cpsr
217 $sp = tADDspi $sp, 1, 14, $noreg
218 tPOP_RET 14, $noreg, def $r7, def $pc
224 exposesReturnsTwice: false
226 regBankSelected: false
229 tracksRegLiveness: true
233 - { reg: '$r0', virtual-reg: '' }
234 - { reg: '$r1', virtual-reg: '' }
235 - { reg: '$r2', virtual-reg: '' }
236 - { reg: '$r3', virtual-reg: '' }
238 isFrameAddressTaken: false
239 isReturnAddressTaken: false
249 cvBytesOfCalleeSavedRegisters: 0
250 hasOpaqueSPAdjustment: false
252 hasMustTailInVarArgFunc: false
258 - { id: 0, name: '', type: spill-slot, offset: -12, size: 4, alignment: 4,
259 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
260 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
261 - { id: 1, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
262 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
263 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
264 - { id: 2, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
265 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true,
266 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
269 machineFunctionInfo: {}
271 ; CHECK-LABEL: name: test_vstr_p0
273 ; CHECK: successors: %bb.3(0x30000000), %bb.1(0x50000000)
274 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
275 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $lr, implicit-def $sp, implicit $sp
276 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
277 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
278 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
279 ; CHECK: dead $r7 = frame-setup tMOVr $sp, 14 /* CC::al */, $noreg
280 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_register $r7
281 ; CHECK: $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
282 ; CHECK: tCBZ $r2, %bb.3
284 ; CHECK: successors: %bb.2(0x80000000)
285 ; CHECK: liveins: $r0, $r1, $r2, $r3
286 ; CHECK: renamable $r12 = t2ADDri renamable $r2, 3, 14 /* CC::al */, $noreg, $noreg
287 ; CHECK: renamable $lr = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
288 ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg
289 ; CHECK: $vpr = VMSR_P0 killed $r3, 14 /* CC::al */, $noreg
290 ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg
291 ; CHECK: VSTR_P0_off killed renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
292 ; CHECK: $r3 = tMOVr $r0, 14 /* CC::al */, $noreg
293 ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg
295 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
296 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
297 ; CHECK: renamable $vpr = VLDR_P0_off $sp, 0, 14 /* CC::al */, $noreg :: (load (s32) from %stack.0)
298 ; CHECK: MVE_VPST 2, implicit $vpr
299 ; CHECK: renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
300 ; CHECK: renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr
301 ; CHECK: renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr
302 ; CHECK: VSTR_P0_off renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
303 ; CHECK: renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14 /* CC::al */, $noreg
304 ; CHECK: renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
305 ; CHECK: MVE_VPST 8, implicit $vpr
306 ; CHECK: MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr
307 ; CHECK: $r0 = tMOVr $r3, 14 /* CC::al */, $noreg
308 ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2
310 ; CHECK: $sp = tADDspi $sp, 1, 14 /* CC::al */, $noreg
311 ; CHECK: tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
313 successors: %bb.3(0x30000000), %bb.1(0x50000000)
314 liveins: $r0, $r1, $r2, $r3, $lr
316 frame-setup tPUSH 14, $noreg, killed $lr, implicit-def $sp, implicit $sp
317 frame-setup CFI_INSTRUCTION def_cfa_offset 8
318 frame-setup CFI_INSTRUCTION offset $lr, -4
319 frame-setup CFI_INSTRUCTION offset $r7, -8
320 $r7 = frame-setup tMOVr $sp, 14, $noreg
321 frame-setup CFI_INSTRUCTION def_cfa_register $r7
322 $sp = frame-setup tSUBspi $sp, 1, 14, $noreg
326 successors: %bb.2(0x80000000)
327 liveins: $r0, $r1, $r2, $r3
329 renamable $r12 = t2ADDri renamable $r2, 3, 14, $noreg, $noreg
330 renamable $lr = t2MOVi 1, 14, $noreg, $noreg
331 renamable $r12 = t2BICri killed renamable $r12, 3, 14, $noreg, $noreg
332 $vpr = VMSR_P0 killed $r3, 14, $noreg
333 renamable $r12 = t2SUBri killed renamable $r12, 4, 14, $noreg, $noreg
334 VSTR_P0_off killed renamable $vpr, $sp, 0, 14, $noreg :: (store (s32) into %stack.0)
335 $r3 = tMOVr $r0, 14, $noreg
336 renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14, $noreg, $noreg
337 $lr = t2DoLoopStart renamable $lr
340 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
341 liveins: $lr, $r0, $r1, $r2, $r3
343 renamable $vpr = VLDR_P0_off $sp, 0, 14, $noreg :: (load (s32) from %stack.0)
344 MVE_VPST 2, implicit $vpr
345 renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
346 renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr
347 renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr
348 VSTR_P0_off renamable $vpr, $sp, 0, 14, $noreg :: (store (s32) into %stack.0)
349 renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14, $noreg
350 renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
351 MVE_VPST 8, implicit $vpr
352 MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr
353 renamable $lr = t2LoopDec killed renamable $lr, 1
354 $r0 = tMOVr $r3, 14, $noreg
355 t2LoopEnd renamable $lr, %bb.2, implicit-def dead $cpsr
359 $sp = tADDspi $sp, 1, 14, $noreg
360 tPOP_RET 14, $noreg, def $r7, def $pc
366 exposesReturnsTwice: false
368 regBankSelected: false
371 tracksRegLiveness: true
375 - { reg: '$r0', virtual-reg: '' }
376 - { reg: '$r1', virtual-reg: '' }
377 - { reg: '$r2', virtual-reg: '' }
378 - { reg: '$r3', virtual-reg: '' }
380 isFrameAddressTaken: false
381 isReturnAddressTaken: false
391 cvBytesOfCalleeSavedRegisters: 0
392 hasOpaqueSPAdjustment: false
394 hasMustTailInVarArgFunc: false
400 - { id: 0, name: '', type: spill-slot, offset: -12, size: 4, alignment: 4,
401 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
402 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
403 - { id: 1, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
404 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
405 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
406 - { id: 2, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
407 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true,
408 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
411 machineFunctionInfo: {}
413 ; CHECK-LABEL: name: test_vmsr_p0
415 ; CHECK: successors: %bb.3(0x30000000), %bb.1(0x50000000)
416 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
417 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $lr, implicit-def $sp, implicit $sp
418 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
419 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
420 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
421 ; CHECK: dead $r7 = frame-setup tMOVr $sp, 14 /* CC::al */, $noreg
422 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_register $r7
423 ; CHECK: $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
424 ; CHECK: tCBZ $r2, %bb.3
426 ; CHECK: successors: %bb.2(0x80000000)
427 ; CHECK: liveins: $r0, $r1, $r2, $r3
428 ; CHECK: renamable $r12 = t2ADDri renamable $r2, 3, 14 /* CC::al */, $noreg, $noreg
429 ; CHECK: renamable $lr = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
430 ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg
431 ; CHECK: $vpr = VMSR_P0 killed $r3, 14 /* CC::al */, $noreg
432 ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg
433 ; CHECK: VSTR_P0_off killed renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
434 ; CHECK: $r3 = tMOVr $r0, 14 /* CC::al */, $noreg
435 ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg
437 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
438 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
439 ; CHECK: renamable $vpr = VLDR_P0_off $sp, 0, 14 /* CC::al */, $noreg :: (load (s32) from %stack.0)
440 ; CHECK: MVE_VPST 2, implicit $vpr
441 ; CHECK: renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
442 ; CHECK: renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr
443 ; CHECK: renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, killed renamable $vpr
444 ; CHECK: $vpr = VMSR_P0 $r3, 14 /* CC::al */, $noreg
445 ; CHECK: renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14 /* CC::al */, $noreg
446 ; CHECK: renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
447 ; CHECK: MVE_VPST 8, implicit $vpr
448 ; CHECK: MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr
449 ; CHECK: $r0 = tMOVr $r3, 14 /* CC::al */, $noreg
450 ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2
452 ; CHECK: $sp = tADDspi $sp, 1, 14 /* CC::al */, $noreg
453 ; CHECK: tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
455 successors: %bb.3(0x30000000), %bb.1(0x50000000)
456 liveins: $r0, $r1, $r2, $r3, $lr
458 frame-setup tPUSH 14, $noreg, killed $lr, implicit-def $sp, implicit $sp
459 frame-setup CFI_INSTRUCTION def_cfa_offset 8
460 frame-setup CFI_INSTRUCTION offset $lr, -4
461 frame-setup CFI_INSTRUCTION offset $r7, -8
462 $r7 = frame-setup tMOVr $sp, 14, $noreg
463 frame-setup CFI_INSTRUCTION def_cfa_register $r7
464 $sp = frame-setup tSUBspi $sp, 1, 14, $noreg
468 successors: %bb.2(0x80000000)
469 liveins: $r0, $r1, $r2, $r3
471 renamable $r12 = t2ADDri renamable $r2, 3, 14, $noreg, $noreg
472 renamable $lr = t2MOVi 1, 14, $noreg, $noreg
473 renamable $r12 = t2BICri killed renamable $r12, 3, 14, $noreg, $noreg
474 $vpr = VMSR_P0 killed $r3, 14, $noreg
475 renamable $r12 = t2SUBri killed renamable $r12, 4, 14, $noreg, $noreg
476 VSTR_P0_off killed renamable $vpr, $sp, 0, 14, $noreg :: (store (s32) into %stack.0)
477 $r3 = tMOVr $r0, 14, $noreg
478 renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14, $noreg, $noreg
479 $lr = t2DoLoopStart renamable $lr
482 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
483 liveins: $lr, $r0, $r1, $r2, $r3
485 renamable $vpr = VLDR_P0_off $sp, 0, 14, $noreg :: (load (s32) from %stack.0)
486 MVE_VPST 2, implicit $vpr
487 renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
488 renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr
489 renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr
490 $vpr = VMSR_P0 $r3, 14, $noreg
491 renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14, $noreg
492 renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
493 MVE_VPST 8, implicit $vpr
494 MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr
495 renamable $lr = t2LoopDec killed renamable $lr, 1
496 $r0 = tMOVr $r3, 14, $noreg
497 t2LoopEnd renamable $lr, %bb.2, implicit-def dead $cpsr
501 $sp = tADDspi $sp, 1, 14, $noreg
502 tPOP_RET 14, $noreg, def $r7, def $pc
508 exposesReturnsTwice: false
510 regBankSelected: false
513 tracksRegLiveness: true
517 - { reg: '$r0', virtual-reg: '' }
518 - { reg: '$r1', virtual-reg: '' }
519 - { reg: '$r2', virtual-reg: '' }
520 - { reg: '$r3', virtual-reg: '' }
522 isFrameAddressTaken: false
523 isReturnAddressTaken: false
533 cvBytesOfCalleeSavedRegisters: 0
534 hasOpaqueSPAdjustment: false
536 hasMustTailInVarArgFunc: false
542 - { id: 0, name: '', type: spill-slot, offset: -12, size: 4, alignment: 4,
543 stack-id: default, callee-saved-register: '', callee-saved-restored: true,
544 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
545 - { id: 1, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
546 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
547 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
548 - { id: 2, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
549 stack-id: default, callee-saved-register: '$r7', callee-saved-restored: true,
550 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
553 machineFunctionInfo: {}
555 ; CHECK-LABEL: name: test_vmrs_p0
557 ; CHECK: successors: %bb.3(0x30000000), %bb.1(0x50000000)
558 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
559 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $lr, implicit-def $sp, implicit $sp
560 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
561 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
562 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
563 ; CHECK: dead $r7 = frame-setup tMOVr $sp, 14 /* CC::al */, $noreg
564 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_register $r7
565 ; CHECK: $sp = frame-setup tSUBspi $sp, 1, 14 /* CC::al */, $noreg
566 ; CHECK: tCBZ $r2, %bb.3
568 ; CHECK: successors: %bb.2(0x80000000)
569 ; CHECK: liveins: $r0, $r1, $r2, $r3
570 ; CHECK: renamable $r12 = t2ADDri renamable $r2, 3, 14 /* CC::al */, $noreg, $noreg
571 ; CHECK: renamable $lr = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
572 ; CHECK: renamable $r12 = t2BICri killed renamable $r12, 3, 14 /* CC::al */, $noreg, $noreg
573 ; CHECK: $vpr = VMSR_P0 killed $r3, 14 /* CC::al */, $noreg
574 ; CHECK: renamable $r12 = t2SUBri killed renamable $r12, 4, 14 /* CC::al */, $noreg, $noreg
575 ; CHECK: VSTR_P0_off killed renamable $vpr, $sp, 0, 14 /* CC::al */, $noreg :: (store (s32) into %stack.0)
576 ; CHECK: $r3 = tMOVr $r0, 14 /* CC::al */, $noreg
577 ; CHECK: renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14 /* CC::al */, $noreg, $noreg
579 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
580 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3
581 ; CHECK: renamable $vpr = VLDR_P0_off $sp, 0, 14 /* CC::al */, $noreg :: (load (s32) from %stack.0)
582 ; CHECK: MVE_VPST 2, implicit $vpr
583 ; CHECK: renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
584 ; CHECK: renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr
585 ; CHECK: dead renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr
586 ; CHECK: $r3 = VMRS_P0 $vpr, 14 /* CC::al */, $noreg
587 ; CHECK: renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14 /* CC::al */, $noreg
588 ; CHECK: renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
589 ; CHECK: MVE_VPST 8, implicit $vpr
590 ; CHECK: MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr
591 ; CHECK: $r0 = tMOVr $r3, 14 /* CC::al */, $noreg
592 ; CHECK: $lr = t2LEUpdate killed renamable $lr, %bb.2
594 ; CHECK: $sp = tADDspi $sp, 1, 14 /* CC::al */, $noreg
595 ; CHECK: tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
597 successors: %bb.3(0x30000000), %bb.1(0x50000000)
598 liveins: $r0, $r1, $r2, $r3, $lr
600 frame-setup tPUSH 14, $noreg, killed $lr, implicit-def $sp, implicit $sp
601 frame-setup CFI_INSTRUCTION def_cfa_offset 8
602 frame-setup CFI_INSTRUCTION offset $lr, -4
603 frame-setup CFI_INSTRUCTION offset $r7, -8
604 $r7 = frame-setup tMOVr $sp, 14, $noreg
605 frame-setup CFI_INSTRUCTION def_cfa_register $r7
606 $sp = frame-setup tSUBspi $sp, 1, 14, $noreg
610 successors: %bb.2(0x80000000)
611 liveins: $r0, $r1, $r2, $r3
613 renamable $r12 = t2ADDri renamable $r2, 3, 14, $noreg, $noreg
614 renamable $lr = t2MOVi 1, 14, $noreg, $noreg
615 renamable $r12 = t2BICri killed renamable $r12, 3, 14, $noreg, $noreg
616 $vpr = VMSR_P0 killed $r3, 14, $noreg
617 renamable $r12 = t2SUBri killed renamable $r12, 4, 14, $noreg, $noreg
618 VSTR_P0_off killed renamable $vpr, $sp, 0, 14, $noreg :: (store (s32) into %stack.0)
619 $r3 = tMOVr $r0, 14, $noreg
620 renamable $lr = nuw nsw t2ADDrs killed renamable $lr, killed renamable $r12, 19, 14, $noreg, $noreg
621 $lr = t2DoLoopStart renamable $lr
624 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
625 liveins: $lr, $r0, $r1, $r2, $r3
627 renamable $vpr = VLDR_P0_off $sp, 0, 14, $noreg :: (load (s32) from %stack.0)
628 MVE_VPST 2, implicit $vpr
629 renamable $vpr = MVE_VCTP32 renamable $r2, 1, killed renamable $vpr
630 renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr
631 renamable $r3, renamable $q1 = MVE_VLDRWU32_post killed renamable $r3, 16, 1, renamable $vpr
632 $r3 = VMRS_P0 $vpr, 14, $noreg
633 renamable $r2, dead $cpsr = tSUBi8 killed renamable $r2, 4, 14, $noreg
634 renamable $q0 = nsw MVE_VMULi32 killed renamable $q1, killed renamable $q0, 0, $noreg, undef renamable $q0
635 MVE_VPST 8, implicit $vpr
636 MVE_VSTRWU32 killed renamable $q0, killed renamable $r0, 0, 1, killed renamable $vpr
637 renamable $lr = t2LoopDec killed renamable $lr, 1
638 $r0 = tMOVr $r3, 14, $noreg
639 t2LoopEnd renamable $lr, %bb.2, implicit-def dead $cpsr
643 $sp = tADDspi $sp, 1, 14, $noreg
644 tPOP_RET 14, $noreg, def $r7, def $pc