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 -o - | FileCheck %s
7 define arm_aapcs_vfpcc void @test_ctlz_i8(<8 x i16>* %a, <8 x i16>* %b, <8 x i16>* %c, i32 %elts, i32 %iters) #0 {
9 %cmp = icmp slt i32 %elts, 1
10 br i1 %cmp, label %exit, label %loop.ph
12 loop.ph: ; preds = %entry
13 %start = call i32 @llvm.start.loop.iterations.i32(i32 %iters)
16 loop.body: ; preds = %loop.body, %loop.ph
17 %lsr.iv = phi i32 [ %lsr.iv.next, %loop.body ], [ %start, %loop.ph ]
18 %count = phi i32 [ %elts, %loop.ph ], [ %elts.rem, %loop.body ]
19 %addr.a = phi <8 x i16>* [ %a, %loop.ph ], [ %addr.a.next, %loop.body ]
20 %addr.b = phi <8 x i16>* [ %b, %loop.ph ], [ %addr.b.next, %loop.body ]
21 %addr.c = phi <8 x i16>* [ %c, %loop.ph ], [ %addr.c.next, %loop.body ]
22 %pred = call <8 x i1> @llvm.arm.mve.vctp16(i32 %count)
23 %elts.rem = sub i32 %count, 8
24 %masked.load.a = call <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>* %addr.a, i32 2, <8 x i1> %pred, <8 x i16> undef)
25 %masked.load.b = call <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>* %addr.b, i32 2, <8 x i1> %pred, <8 x i16> undef)
26 %bitcast.a = bitcast <8 x i16> %masked.load.a to <16 x i8>
27 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %bitcast.a, i1 false)
28 %shrn = call <16 x i8> @llvm.arm.mve.vshrn.v16i8.v8i16(<16 x i8> %ctlz, <8 x i16> %masked.load.b, i32 1, i32 1, i32 0, i32 1, i32 0, i32 1)
29 %bitcast = bitcast <16 x i8> %shrn to <8 x i16>
30 call void @llvm.masked.store.v8i16.p0v8i16(<8 x i16> %bitcast, <8 x i16>* %addr.c, i32 2, <8 x i1> %pred)
31 %addr.a.next = getelementptr <8 x i16>, <8 x i16>* %addr.b, i32 1
32 %addr.b.next = getelementptr <8 x i16>, <8 x i16>* %addr.b, i32 1
33 %addr.c.next = getelementptr <8 x i16>, <8 x i16>* %addr.c, i32 1
34 %loop.dec = call i32 @llvm.loop.decrement.reg.i32.i32.i32(i32 %lsr.iv, i32 1)
35 %end = icmp ne i32 %loop.dec, 0
36 %lsr.iv.next = add i32 %lsr.iv, -1
37 br i1 %end, label %loop.body, label %exit
39 exit: ; preds = %loop.body, %entry
43 define arm_aapcs_vfpcc void @test_ctlz_i16(<4 x i32>* %a, <4 x i32>* %b, <4 x i32>* %c, i32 %elts, i32 %iters) #0 {
45 %cmp = icmp slt i32 %elts, 1
46 br i1 %cmp, label %exit, label %loop.ph
48 loop.ph: ; preds = %entry
49 %start = call i32 @llvm.start.loop.iterations.i32(i32 %iters)
52 loop.body: ; preds = %loop.body, %loop.ph
53 %lsr.iv = phi i32 [ %lsr.iv.next, %loop.body ], [ %start, %loop.ph ]
54 %count = phi i32 [ %elts, %loop.ph ], [ %elts.rem, %loop.body ]
55 %addr.a = phi <4 x i32>* [ %a, %loop.ph ], [ %addr.a.next, %loop.body ]
56 %addr.b = phi <4 x i32>* [ %b, %loop.ph ], [ %addr.b.next, %loop.body ]
57 %addr.c = phi <4 x i32>* [ %c, %loop.ph ], [ %addr.c.next, %loop.body ]
58 %pred = call <4 x i1> @llvm.arm.mve.vctp32(i32 %count)
59 %elts.rem = sub i32 %count, 4
60 %masked.load.a = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %addr.a, i32 4, <4 x i1> %pred, <4 x i32> undef)
61 %masked.load.b = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %addr.b, i32 4, <4 x i1> %pred, <4 x i32> undef)
62 %bitcast.a = bitcast <4 x i32> %masked.load.a to <8 x i16>
63 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %bitcast.a, i1 false)
64 %shrn = call <8 x i16> @llvm.arm.mve.vshrn.v8i16.v4i32(<8 x i16> %ctlz, <4 x i32> %masked.load.b, i32 3, i32 1, i32 0, i32 1, i32 0, i32 1)
65 %bitcast = bitcast <8 x i16> %shrn to <4 x i32>
66 call void @llvm.masked.store.v4i32.p0v4i32(<4 x i32> %bitcast, <4 x i32>* %addr.c, i32 4, <4 x i1> %pred)
67 %addr.a.next = getelementptr <4 x i32>, <4 x i32>* %addr.a, i32 1
68 %addr.b.next = getelementptr <4 x i32>, <4 x i32>* %addr.b, i32 1
69 %addr.c.next = getelementptr <4 x i32>, <4 x i32>* %addr.c, i32 1
70 %loop.dec = call i32 @llvm.loop.decrement.reg.i32.i32.i32(i32 %lsr.iv, i32 1)
71 %end = icmp ne i32 %loop.dec, 0
72 %lsr.iv.next = add i32 %lsr.iv, -1
73 br i1 %end, label %loop.body, label %exit
75 exit: ; preds = %loop.body, %entry
79 define arm_aapcs_vfpcc void @test_ctlz_i32(<4 x i32>* %a, <4 x i32>* %b, <4 x i32>* %c, i32 %elts, i32 %iters) #0 {
81 %cmp = icmp slt i32 %elts, 1
82 br i1 %cmp, label %exit, label %loop.ph
84 loop.ph: ; preds = %entry
85 %start = call i32 @llvm.start.loop.iterations.i32(i32 %iters)
88 loop.body: ; preds = %loop.body, %loop.ph
89 %lsr.iv = phi i32 [ %lsr.iv.next, %loop.body ], [ %start, %loop.ph ]
90 %count = phi i32 [ %elts, %loop.ph ], [ %elts.rem, %loop.body ]
91 %addr.a = phi <4 x i32>* [ %a, %loop.ph ], [ %addr.a.next, %loop.body ]
92 %addr.b = phi <4 x i32>* [ %b, %loop.ph ], [ %addr.b.next, %loop.body ]
93 %addr.c = phi <4 x i32>* [ %c, %loop.ph ], [ %addr.c.next, %loop.body ]
94 %pred = call <4 x i1> @llvm.arm.mve.vctp32(i32 %count)
95 %elts.rem = sub i32 %count, 4
96 %masked.load.a = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %addr.a, i32 4, <4 x i1> %pred, <4 x i32> undef)
97 %masked.load.b = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %addr.b, i32 4, <4 x i1> %pred, <4 x i32> undef)
98 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %masked.load.b, i1 false)
99 %bitcast.a = bitcast <4 x i32> %masked.load.a to <8 x i16>
100 %shrn = call <8 x i16> @llvm.arm.mve.vshrn.v8i16.v4i32(<8 x i16> %bitcast.a, <4 x i32> %ctlz, i32 3, i32 1, i32 0, i32 1, i32 0, i32 1)
101 %bitcast = bitcast <8 x i16> %shrn to <4 x i32>
102 call void @llvm.masked.store.v4i32.p0v4i32(<4 x i32> %bitcast, <4 x i32>* %addr.c, i32 4, <4 x i1> %pred)
103 %addr.a.next = getelementptr <4 x i32>, <4 x i32>* %addr.a, i32 1
104 %addr.b.next = getelementptr <4 x i32>, <4 x i32>* %addr.b, i32 1
105 %addr.c.next = getelementptr <4 x i32>, <4 x i32>* %addr.c, i32 1
106 %loop.dec = call i32 @llvm.loop.decrement.reg.i32.i32.i32(i32 %lsr.iv, i32 1)
107 %end = icmp ne i32 %loop.dec, 0
108 %lsr.iv.next = add i32 %lsr.iv, -1
109 br i1 %end, label %loop.body, label %exit
111 exit: ; preds = %loop.body, %entry
115 declare <4 x i32> @llvm.ctlz.v4i32(<4 x i32>, i1 immarg)
116 declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1 immarg)
117 declare <16 x i8> @llvm.ctlz.v16i8(<16 x i8>, i1 immarg)
118 declare i32 @llvm.start.loop.iterations.i32(i32)
119 declare i32 @llvm.loop.decrement.reg.i32.i32.i32(i32, i32)
120 declare <4 x i1> @llvm.arm.mve.vctp32(i32)
121 declare <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>*, i32 immarg, <4 x i1>, <4 x i32>)
122 declare void @llvm.masked.store.v4i32.p0v4i32(<4 x i32>, <4 x i32>*, i32 immarg, <4 x i1>)
123 declare <8 x i16> @llvm.arm.mve.vshrn.v8i16.v4i32(<8 x i16>, <4 x i32>, i32, i32, i32, i32, i32, i32)
124 declare <8 x i1> @llvm.arm.mve.vctp16(i32)
125 declare <8 x i16> @llvm.masked.load.v8i16.p0v8i16(<8 x i16>*, i32 immarg, <8 x i1>, <8 x i16>)
126 declare void @llvm.masked.store.v8i16.p0v8i16(<8 x i16>, <8 x i16>*, i32 immarg, <8 x i1>)
127 declare <16 x i8> @llvm.arm.mve.vshrn.v16i8.v8i16(<16 x i8>, <8 x i16>, i32, i32, i32, i32, i32, i32)
133 tracksRegLiveness: true
136 - { reg: '$r0', virtual-reg: '' }
137 - { reg: '$r1', virtual-reg: '' }
138 - { reg: '$r2', virtual-reg: '' }
139 - { reg: '$r3', virtual-reg: '' }
145 - { id: 0, type: default, offset: 0, size: 4, alignment: 8, stack-id: default,
146 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
147 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
149 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
150 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
151 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
152 - { id: 1, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
153 stack-id: default, callee-saved-register: '$r4', callee-saved-restored: true,
154 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
157 machineFunctionInfo: {}
159 ; CHECK-LABEL: name: test_ctlz_i8
161 ; CHECK: successors: %bb.1(0x80000000)
162 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r4
163 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $lr, implicit-def $sp, implicit $sp
164 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
165 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
166 ; CHECK: frame-setup CFI_INSTRUCTION offset $r4, -8
167 ; CHECK: tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
168 ; CHECK: t2IT 11, 8, implicit-def $itstate
169 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r4, def $pc, implicit killed $itstate
170 ; CHECK: bb.1.loop.ph:
171 ; CHECK: successors: %bb.2(0x80000000)
172 ; CHECK: liveins: $r0, $r1, $r2, $r3
173 ; CHECK: renamable $lr = t2LDRi12 $sp, 8, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
174 ; CHECK: $r4 = tMOVr killed $lr, 14 /* CC::al */, $noreg
175 ; CHECK: bb.2.loop.body:
176 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
177 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4
178 ; CHECK: $lr = tMOVr $r4, 14 /* CC::al */, $noreg
179 ; CHECK: renamable $vpr = MVE_VCTP16 renamable $r3, 0, $noreg
180 ; CHECK: MVE_VPST 4, implicit $vpr
181 ; CHECK: renamable $r1, renamable $q0 = MVE_VLDRHU16_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.b, align 2)
182 ; CHECK: renamable $q1 = MVE_VLDRHU16 killed renamable $r0, 0, 1, renamable $vpr :: (load (s128) from %ir.addr.a, align 2)
183 ; CHECK: renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 8, 14 /* CC::al */, $noreg
184 ; CHECK: renamable $r4, dead $cpsr = tSUBi8 killed $r4, 1, 14 /* CC::al */, $noreg
185 ; CHECK: renamable $q1 = MVE_VCLZs8 killed renamable $q1, 0, $noreg, undef renamable $q1
186 ; CHECK: $r0 = tMOVr $r1, 14 /* CC::al */, $noreg
187 ; CHECK: renamable $q1 = MVE_VQSHRUNs16th killed renamable $q1, killed renamable $q0, 1, 0, $noreg
188 ; CHECK: MVE_VPST 8, implicit $vpr
189 ; CHECK: renamable $r2 = MVE_VSTRHU16_post killed renamable $q1, killed renamable $r2, 16, 1, killed renamable $vpr :: (store (s128) into %ir.addr.c, align 2)
190 ; CHECK: dead $lr = t2LEUpdate killed renamable $lr, %bb.2
192 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $pc
194 successors: %bb.1(0x80000000)
195 liveins: $r0, $r1, $r2, $r3, $r4, $lr
197 frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r4, killed $lr, implicit-def $sp, implicit $sp
198 frame-setup CFI_INSTRUCTION def_cfa_offset 8
199 frame-setup CFI_INSTRUCTION offset $lr, -4
200 frame-setup CFI_INSTRUCTION offset $r4, -8
201 tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
202 t2IT 11, 8, implicit-def $itstate
203 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r4, def $pc, implicit killed $itstate
206 successors: %bb.2(0x80000000)
207 liveins: $r0, $r1, $r2, $r3
209 renamable $lr = t2LDRi12 $sp, 8, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
210 renamable $lr = t2DoLoopStart killed renamable $lr
211 $r4 = tMOVr killed $lr, 14 /* CC::al */, $noreg
214 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
215 liveins: $r0, $r1, $r2, $r3, $r4
217 $lr = tMOVr $r4, 14 /* CC::al */, $noreg
218 renamable $vpr = MVE_VCTP16 renamable $r3, 0, $noreg
219 MVE_VPST 4, implicit $vpr
220 renamable $r1, renamable $q0 = MVE_VLDRHU16_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.b, align 2)
221 renamable $q1 = MVE_VLDRHU16 killed renamable $r0, 0, 1, renamable $vpr :: (load (s128) from %ir.addr.a, align 2)
222 renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 8, 14 /* CC::al */, $noreg
223 renamable $r4, dead $cpsr = tSUBi8 killed $r4, 1, 14 /* CC::al */, $noreg
224 renamable $q1 = MVE_VCLZs8 killed renamable $q1, 0, $noreg, undef renamable $q1
225 renamable $lr = t2LoopDec killed renamable $lr, 1
226 $r0 = tMOVr $r1, 14 /* CC::al */, $noreg
227 renamable $q1 = MVE_VQSHRUNs16th killed renamable $q1, killed renamable $q0, 1, 0, $noreg
228 MVE_VPST 8, implicit $vpr
229 renamable $r2 = MVE_VSTRHU16_post killed renamable $q1, killed renamable $r2, 16, 1, killed renamable $vpr :: (store (s128) into %ir.addr.c, align 2)
230 t2LoopEnd killed renamable $lr, %bb.2, implicit-def dead $cpsr
231 tB %bb.3, 14 /* CC::al */, $noreg
234 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r4, def $pc
240 tracksRegLiveness: true
243 - { reg: '$r0', virtual-reg: '' }
244 - { reg: '$r1', virtual-reg: '' }
245 - { reg: '$r2', virtual-reg: '' }
246 - { reg: '$r3', virtual-reg: '' }
252 - { id: 0, type: default, offset: 0, size: 4, alignment: 8, stack-id: default,
253 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
254 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
256 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
257 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
258 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
259 - { id: 1, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
260 stack-id: default, callee-saved-register: '$r4', callee-saved-restored: true,
261 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
264 machineFunctionInfo: {}
266 ; CHECK-LABEL: name: test_ctlz_i16
268 ; CHECK: successors: %bb.1(0x80000000)
269 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r4, $r7
270 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
271 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
272 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
273 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
274 ; CHECK: tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
275 ; CHECK: t2IT 11, 8, implicit-def $itstate
276 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def dead $r7, def $pc, implicit killed $itstate
277 ; CHECK: bb.1.loop.ph:
278 ; CHECK: successors: %bb.2(0x80000000)
279 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4
280 ; CHECK: renamable $lr = t2LDRi12 $sp, 8, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
281 ; CHECK: $r12 = tMOVr killed $lr, 14 /* CC::al */, $noreg
282 ; CHECK: bb.2.loop.body:
283 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
284 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r12
285 ; CHECK: $lr = tMOVr $r12, 14 /* CC::al */, $noreg
286 ; CHECK: renamable $vpr = MVE_VCTP32 renamable $r3, 0, $noreg
287 ; CHECK: MVE_VPST 4, implicit $vpr
288 ; CHECK: renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.b, align 4)
289 ; CHECK: renamable $r0, renamable $q1 = MVE_VLDRWU32_post killed renamable $r0, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.a, align 4)
290 ; CHECK: renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 4, 14 /* CC::al */, $noreg
291 ; CHECK: renamable $r12 = t2SUBri killed $r12, 1, 14 /* CC::al */, $noreg, $noreg
292 ; CHECK: renamable $q1 = MVE_VCLZs16 killed renamable $q1, 0, $noreg, undef renamable $q1
293 ; CHECK: renamable $q1 = MVE_VQSHRUNs32th killed renamable $q1, killed renamable $q0, 3, 0, $noreg
294 ; CHECK: MVE_VPST 8, implicit $vpr
295 ; CHECK: renamable $r2 = MVE_VSTRWU32_post killed renamable $q1, killed renamable $r2, 16, 1, killed renamable $vpr :: (store (s128) into %ir.addr.c, align 4)
296 ; CHECK: dead $lr = t2LEUpdate killed renamable $lr, %bb.2
298 ; CHECK: liveins: $r4
299 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def dead $r7, def $pc
301 successors: %bb.1(0x80000000)
302 liveins: $r0, $r1, $r2, $r3, $r7, $lr
304 frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
305 frame-setup CFI_INSTRUCTION def_cfa_offset 8
306 frame-setup CFI_INSTRUCTION offset $lr, -4
307 frame-setup CFI_INSTRUCTION offset $r7, -8
308 tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
309 t2IT 11, 8, implicit-def $itstate
310 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
313 successors: %bb.2(0x80000000)
314 liveins: $r0, $r1, $r2, $r3
316 renamable $lr = t2LDRi12 $sp, 8, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
317 renamable $lr = t2DoLoopStart killed renamable $lr
318 $r12 = tMOVr killed $lr, 14 /* CC::al */, $noreg
321 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
322 liveins: $r0, $r1, $r2, $r3, $r12
324 $lr = tMOVr $r12, 14 /* CC::al */, $noreg
325 renamable $vpr = MVE_VCTP32 renamable $r3, 0, $noreg
326 MVE_VPST 4, implicit $vpr
327 renamable $r1, renamable $q0 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.b, align 4)
328 renamable $r0, renamable $q1 = MVE_VLDRWU32_post killed renamable $r0, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.a, align 4)
329 renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 4, 14 /* CC::al */, $noreg
330 renamable $r12 = t2SUBri killed $r12, 1, 14 /* CC::al */, $noreg, $noreg
331 renamable $q1 = MVE_VCLZs16 killed renamable $q1, 0, $noreg, undef renamable $q1
332 renamable $lr = t2LoopDec killed renamable $lr, 1
333 renamable $q1 = MVE_VQSHRUNs32th killed renamable $q1, killed renamable $q0, 3, 0, $noreg
334 MVE_VPST 8, implicit $vpr
335 renamable $r2 = MVE_VSTRWU32_post killed renamable $q1, killed renamable $r2, 16, 1, killed renamable $vpr :: (store (s128) into %ir.addr.c, align 4)
336 t2LoopEnd killed renamable $lr, %bb.2, implicit-def dead $cpsr
337 tB %bb.3, 14 /* CC::al */, $noreg
340 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc
346 tracksRegLiveness: true
349 - { reg: '$r0', virtual-reg: '' }
350 - { reg: '$r1', virtual-reg: '' }
351 - { reg: '$r2', virtual-reg: '' }
352 - { reg: '$r3', virtual-reg: '' }
358 - { id: 0, type: default, offset: 0, size: 4, alignment: 8, stack-id: default,
359 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
360 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
362 - { id: 0, name: '', type: spill-slot, offset: -4, size: 4, alignment: 4,
363 stack-id: default, callee-saved-register: '$lr', callee-saved-restored: false,
364 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
365 - { id: 1, name: '', type: spill-slot, offset: -8, size: 4, alignment: 4,
366 stack-id: default, callee-saved-register: '$r4', callee-saved-restored: true,
367 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
370 machineFunctionInfo: {}
372 ; CHECK-LABEL: name: test_ctlz_i32
374 ; CHECK: successors: %bb.1(0x80000000)
375 ; CHECK: liveins: $lr, $r0, $r1, $r2, $r3, $r4, $r7
376 ; CHECK: frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
377 ; CHECK: frame-setup CFI_INSTRUCTION def_cfa_offset 8
378 ; CHECK: frame-setup CFI_INSTRUCTION offset $lr, -4
379 ; CHECK: frame-setup CFI_INSTRUCTION offset $r7, -8
380 ; CHECK: tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
381 ; CHECK: t2IT 11, 8, implicit-def $itstate
382 ; CHECK: frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def dead $r7, def $pc, implicit killed $itstate
383 ; CHECK: bb.1.loop.ph:
384 ; CHECK: successors: %bb.2(0x80000000)
385 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4
386 ; CHECK: renamable $lr = t2LDRi12 $sp, 8, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
387 ; CHECK: $r12 = tMOVr killed $lr, 14 /* CC::al */, $noreg
388 ; CHECK: bb.2.loop.body:
389 ; CHECK: successors: %bb.2(0x7c000000), %bb.3(0x04000000)
390 ; CHECK: liveins: $r0, $r1, $r2, $r3, $r4, $r12
391 ; CHECK: $lr = tMOVr $r12, 14 /* CC::al */, $noreg
392 ; CHECK: renamable $vpr = MVE_VCTP32 renamable $r3, 0, $noreg
393 ; CHECK: MVE_VPST 4, implicit $vpr
394 ; CHECK: renamable $r0, renamable $q0 = MVE_VLDRWU32_post killed renamable $r0, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.a, align 4)
395 ; CHECK: renamable $r1, renamable $q1 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.b, align 4)
396 ; CHECK: renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 4, 14 /* CC::al */, $noreg
397 ; CHECK: renamable $r12 = t2SUBri killed $r12, 1, 14 /* CC::al */, $noreg, $noreg
398 ; CHECK: renamable $q1 = MVE_VCLZs32 killed renamable $q1, 0, $noreg, undef renamable $q1
399 ; CHECK: renamable $q0 = MVE_VQSHRUNs32th killed renamable $q0, killed renamable $q1, 3, 0, $noreg
400 ; CHECK: MVE_VPST 8, implicit $vpr
401 ; CHECK: renamable $r2 = MVE_VSTRWU32_post killed renamable $q0, killed renamable $r2, 16, 1, killed renamable $vpr :: (store (s128) into %ir.addr.c, align 4)
402 ; CHECK: dead $lr = t2LEUpdate killed renamable $lr, %bb.2
404 ; CHECK: liveins: $r4
405 ; CHECK: frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def dead $r7, def $pc
407 successors: %bb.1(0x80000000)
408 liveins: $r0, $r1, $r2, $r3, $r7, $lr
410 frame-setup tPUSH 14 /* CC::al */, $noreg, killed $r7, killed $lr, implicit-def $sp, implicit $sp
411 frame-setup CFI_INSTRUCTION def_cfa_offset 8
412 frame-setup CFI_INSTRUCTION offset $lr, -4
413 frame-setup CFI_INSTRUCTION offset $r7, -8
414 tCMPi8 renamable $r3, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
415 t2IT 11, 8, implicit-def $itstate
416 frame-destroy tPOP_RET 11 /* CC::lt */, killed $cpsr, def $r7, def $pc, implicit killed $itstate
419 successors: %bb.2(0x80000000)
420 liveins: $r0, $r1, $r2, $r3
422 renamable $lr = t2LDRi12 $sp, 8, 14 /* CC::al */, $noreg :: (load (s32) from %fixed-stack.0, align 8)
423 renamable $lr = t2DoLoopStart killed renamable $lr
424 $r12 = tMOVr killed $lr, 14 /* CC::al */, $noreg
427 successors: %bb.2(0x7c000000), %bb.3(0x04000000)
428 liveins: $r0, $r1, $r2, $r3, $r12
430 $lr = tMOVr $r12, 14 /* CC::al */, $noreg
431 renamable $vpr = MVE_VCTP32 renamable $r3, 0, $noreg
432 MVE_VPST 4, implicit $vpr
433 renamable $r0, renamable $q0 = MVE_VLDRWU32_post killed renamable $r0, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.a, align 4)
434 renamable $r1, renamable $q1 = MVE_VLDRWU32_post killed renamable $r1, 16, 1, renamable $vpr :: (load (s128) from %ir.addr.b, align 4)
435 renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 4, 14 /* CC::al */, $noreg
436 renamable $r12 = t2SUBri killed $r12, 1, 14 /* CC::al */, $noreg, $noreg
437 renamable $q1 = MVE_VCLZs32 killed renamable $q1, 0, $noreg, undef renamable $q1
438 renamable $lr = t2LoopDec killed renamable $lr, 1
439 renamable $q0 = MVE_VQSHRUNs32th killed renamable $q0, killed renamable $q1, 3, 0, $noreg
440 MVE_VPST 8, implicit $vpr
441 renamable $r2 = MVE_VSTRWU32_post killed renamable $q0, killed renamable $r2, 16, 1, killed renamable $vpr :: (store (s128) into %ir.addr.c, align 4)
442 t2LoopEnd killed renamable $lr, %bb.2, implicit-def dead $cpsr
443 tB %bb.3, 14 /* CC::al */, $noreg
446 frame-destroy tPOP_RET 14 /* CC::al */, $noreg, def $r7, def $pc