1 # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 %s -o - \
2 # RUN: -run-pass=ppc-mi-peepholes -verify-machineinstrs | FileCheck %s
4 # Test the peephole replacing unprimed accumulator PHI nodes by primed
5 # accumulator PHI nodes. We have a test for the simple case (PHI nodes with COPY
6 # operands), a test for PHI nodes with IMPLICIT_DEF operands, a test for PHI
7 # nodes with operands being other PHI nodes on unprimed accumulators and a test
8 # with an unprimed accumulator PHI node cycle.
11 define dso_local void @phiCopy(i32 signext %i, <16 x i8> %vc, ptr nocapture %ptr) {
13 %0 = tail call <512 x i1> @llvm.ppc.mma.xxsetaccz()
14 %tobool.not = icmp eq i32 %i, 0
15 br i1 %tobool.not, label %if.end, label %if.then
18 %1 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %0, <16 x i8> %vc, <16 x i8> %vc)
22 %vq.0 = phi <512 x i1> [ %1, %if.then ], [ %0, %entry ]
23 store <512 x i1> %vq.0, ptr %ptr, align 64
27 declare <512 x i1> @llvm.ppc.mma.xxsetaccz()
29 declare <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1>, <16 x i8>, <16 x i8>)
31 define dso_local void @phiCopyUndef(i32 signext %i, <16 x i8> %vc, ptr nocapture %ptr) {
33 %tobool.not = icmp eq i32 %i, 0
34 br i1 %tobool.not, label %if.end, label %if.then
37 %0 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> undef, <16 x i8> %vc, <16 x i8> %vc)
41 %vq.0 = phi <512 x i1> [ %0, %if.then ], [ undef, %entry ]
42 store <512 x i1> %vq.0, ptr %ptr, align 64
46 define dso_local void @phiPhis(i32 signext %i, <16 x i8> %vc, ptr nocapture %ptr) {
48 %cmp6 = icmp sgt i32 %i, 0
49 br i1 %cmp6, label %for.body.preheader, label %for.cond.cleanup
53 %xtraiter = and i32 %i, 7
54 %1 = icmp ult i32 %0, 7
55 br i1 %1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new
57 for.body.preheader.new:
58 %unroll_iter = and i32 %i, -8
59 %2 = add i32 %unroll_iter, -8
60 %3 = zext i32 %2 to i64
62 %5 = add nuw nsw i64 %4, 1
63 call void @llvm.set.loop.iterations.i64(i64 %5)
66 for.cond.cleanup.loopexit.unr-lcssa:
67 %vq.07.unr = phi <512 x i1> [ undef, %for.body.preheader ], [ %18, %for.body ]
68 %lcmp.mod.not = icmp eq i32 %xtraiter, 0
69 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil.preheader
71 for.body.epil.preheader:
72 %6 = add nsw i32 %xtraiter, -1
73 %7 = zext i32 %6 to i64
74 %8 = add nuw nsw i64 %7, 1
75 call void @llvm.set.loop.iterations.i64(i64 %8)
76 br label %for.body.epil
79 %vq.07.epil = phi <512 x i1> [ %9, %for.body.epil ], [ %vq.07.unr, %for.body.epil.preheader ]
80 %9 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %vq.07.epil, <16 x i8> %vc, <16 x i8> %vc)
81 %10 = call i1 @llvm.loop.decrement.i64(i64 1)
82 br i1 %10, label %for.body.epil, label %for.cond.cleanup
85 %vq.0.lcssa = phi <512 x i1> [ undef, %entry ], [ %vq.07.unr, %for.cond.cleanup.loopexit.unr-lcssa ], [ %9, %for.body.epil ]
86 %add.ptr = getelementptr inbounds <512 x i1>, ptr %ptr, i64 1
87 store <512 x i1> %vq.0.lcssa, ptr %add.ptr, align 64
91 %vq.07 = phi <512 x i1> [ undef, %for.body.preheader.new ], [ %18, %for.body ]
92 %11 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %vq.07, <16 x i8> %vc, <16 x i8> %vc)
93 %12 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %11, <16 x i8> %vc, <16 x i8> %vc)
94 %13 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %12, <16 x i8> %vc, <16 x i8> %vc)
95 %14 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %13, <16 x i8> %vc, <16 x i8> %vc)
96 %15 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %14, <16 x i8> %vc, <16 x i8> %vc)
97 %16 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %15, <16 x i8> %vc, <16 x i8> %vc)
98 %17 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %16, <16 x i8> %vc, <16 x i8> %vc)
99 %18 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %17, <16 x i8> %vc, <16 x i8> %vc)
100 %19 = call i1 @llvm.loop.decrement.i64(i64 1)
101 br i1 %19, label %for.body, label %for.cond.cleanup.loopexit.unr-lcssa
104 define dso_local void @phiCycle(i32 signext %i, <16 x i8> %vc, ptr nocapture %ptr) {
106 %cmp6 = icmp sgt i32 %i, 0
107 br i1 %cmp6, label %for.body.preheader, label %for.cond.cleanup
111 %xtraiter = and i32 %i, 7
112 %1 = icmp ult i32 %0, 7
113 br i1 %1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new
115 for.body.preheader.new:
116 %unroll_iter = and i32 %i, -8
117 %2 = add i32 %unroll_iter, -8
118 %3 = zext i32 %2 to i64
120 %5 = add nuw nsw i64 %4, 1
121 call void @llvm.set.loop.iterations.i64(i64 %5)
124 for.cond.cleanup.loopexit.unr-lcssa:
125 %vq.07.unr = phi <512 x i1> [ undef, %for.body.preheader ], [ %18, %for.body ], [ %vq.07.epil, %for.body.epil ]
126 %lcmp.mod.not = icmp eq i32 %xtraiter, 0
127 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil.preheader
129 for.body.epil.preheader:
130 %6 = add nsw i32 %xtraiter, -1
131 %7 = zext i32 %6 to i64
132 %8 = add nuw nsw i64 %7, 1
133 call void @llvm.set.loop.iterations.i64(i64 %8)
134 br label %for.body.epil
137 %vq.07.epil = phi <512 x i1> [ %9, %for.body.epil ], [ %vq.07.unr, %for.body.epil.preheader ]
138 %9 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %vq.07.epil, <16 x i8> %vc, <16 x i8> %vc)
139 %10 = call i1 @llvm.loop.decrement.i64(i64 1)
140 %test = icmp ult i32 %0, 7
141 br i1 %test, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.epil
142 ;br i1 %10, label %for.body.epil, label %for.cond.cleanup
145 %vq.0.lcssa = phi <512 x i1> [ undef, %entry ], [ %vq.07.unr, %for.cond.cleanup.loopexit.unr-lcssa ]
146 %add.ptr = getelementptr inbounds <512 x i1>, ptr %ptr, i64 1
147 store <512 x i1> %vq.0.lcssa, ptr %add.ptr, align 64
151 %vq.07 = phi <512 x i1> [ undef, %for.body.preheader.new ], [ %18, %for.body ]
152 %11 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %vq.07, <16 x i8> %vc, <16 x i8> %vc)
153 %12 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %11, <16 x i8> %vc, <16 x i8> %vc)
154 %13 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %12, <16 x i8> %vc, <16 x i8> %vc)
155 %14 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %13, <16 x i8> %vc, <16 x i8> %vc)
156 %15 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %14, <16 x i8> %vc, <16 x i8> %vc)
157 %16 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %15, <16 x i8> %vc, <16 x i8> %vc)
158 %17 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %16, <16 x i8> %vc, <16 x i8> %vc)
159 %18 = tail call <512 x i1> @llvm.ppc.mma.xvf32gerpp(<512 x i1> %17, <16 x i8> %vc, <16 x i8> %vc)
160 %19 = call i1 @llvm.loop.decrement.i64(i64 1)
161 br i1 %19, label %for.body, label %for.cond.cleanup.loopexit.unr-lcssa
164 declare void @llvm.set.loop.iterations.i64(i64)
166 declare i1 @llvm.loop.decrement.i64(i64)
172 exposesReturnsTwice: false
174 regBankSelected: false
177 tracksRegLiveness: true
180 - { id: 0, class: uaccrc, preferred-register: '' }
181 - { id: 1, class: uaccrc, preferred-register: '' }
182 - { id: 2, class: uaccrc, preferred-register: '' }
183 - { id: 3, class: g8rc, preferred-register: '' }
184 - { id: 4, class: vrrc, preferred-register: '' }
185 - { id: 5, class: g8rc_and_g8rc_nox0, preferred-register: '' }
186 - { id: 6, class: gprc, preferred-register: '' }
187 - { id: 7, class: accrc, preferred-register: '' }
188 - { id: 8, class: crrc, preferred-register: '' }
189 - { id: 9, class: vsrc, preferred-register: '' }
190 - { id: 10, class: accrc, preferred-register: '' }
191 - { id: 11, class: accrc, preferred-register: '' }
192 - { id: 12, class: accrc, preferred-register: '' }
193 - { id: 13, class: accrc, preferred-register: '' }
194 - { id: 14, class: vsrc, preferred-register: '' }
195 - { id: 15, class: vsrprc, preferred-register: '' }
196 - { id: 16, class: vsrprc, preferred-register: '' }
197 - { id: 17, class: vsrc, preferred-register: '' }
198 - { id: 18, class: vsrprc, preferred-register: '' }
199 - { id: 19, class: vsrprc, preferred-register: '' }
200 - { id: 20, class: vsrc, preferred-register: '' }
201 - { id: 21, class: vsrprc, preferred-register: '' }
202 - { id: 22, class: vsrprc, preferred-register: '' }
203 - { id: 23, class: vsrc, preferred-register: '' }
204 - { id: 24, class: vsrprc, preferred-register: '' }
206 - { reg: '$x3', virtual-reg: '%3' }
207 - { reg: '$v2', virtual-reg: '%4' }
208 - { reg: '$x7', virtual-reg: '%5' }
210 isFrameAddressTaken: false
211 isReturnAddressTaken: false
220 maxCallFrameSize: 4294967295
221 cvBytesOfCalleeSavedRegisters: 0
222 hasOpaqueSPAdjustment: false
224 hasMustTailInVarArgFunc: false
231 debugValueSubstitutions: []
233 machineFunctionInfo: {}
236 successors: %bb.2(0x30000000), %bb.1(0x50000000)
237 liveins: $x3, $v2, $x7
239 %5:g8rc_and_g8rc_nox0 = COPY $x7
242 %6:gprc = COPY %3.sub_32
245 %8:crrc = CMPLWI killed %6, 0
246 BCC 76, killed %8, %bb.2
250 successors: %bb.2(0x80000000)
254 %10:accrc = XVF32GERPP %11, %9, %9
258 ; We check that the PHI node on primed accumulator is inserted after
260 ; CHECK-LABEL: name: phiCopy
261 ; CHECK-LABEL: bb.{{[0-9]}}.if.end:
262 ; CHECK-NEXT: :accrc = PHI %7, %bb.0, %10, %bb.1
263 ; CHECK-NEXT: %2:uaccrc = PHI
264 %2:uaccrc = PHI %0, %bb.0, %1, %bb.1
266 %12:accrc = XXMFACC %13
267 %14:vsrc = COPY %12.sub_vsx1
268 %16:vsrprc = IMPLICIT_DEF
269 %15:vsrprc = INSERT_SUBREG %16, killed %14, %subreg.sub_vsx1
270 %17:vsrc = COPY %12.sub_vsx0
271 %18:vsrprc = INSERT_SUBREG %15, killed %17, %subreg.sub_vsx0
272 STXVP killed %18, 32, %5 :: (store (s256) into %ir.ptr + 32)
273 %19:vsrprc = COPY %12.sub_pair1
274 %20:vsrc = COPY %19.sub_vsx1
275 %22:vsrprc = IMPLICIT_DEF
276 %21:vsrprc = INSERT_SUBREG %22, killed %20, %subreg.sub_vsx1
277 %23:vsrc = COPY %19.sub_vsx0
278 %24:vsrprc = INSERT_SUBREG %21, killed %23, %subreg.sub_vsx0
279 STXVP killed %24, 0, %5 :: (store (s256) into %ir.ptr, align 64)
280 BLR8 implicit $lr8, implicit $rm
286 exposesReturnsTwice: false
288 regBankSelected: false
291 tracksRegLiveness: true
294 - { id: 0, class: uaccrc, preferred-register: '' }
295 - { id: 1, class: uaccrc, preferred-register: '' }
296 - { id: 2, class: g8rc, preferred-register: '' }
297 - { id: 3, class: vrrc, preferred-register: '' }
298 - { id: 4, class: g8rc_and_g8rc_nox0, preferred-register: '' }
299 - { id: 5, class: uaccrc, preferred-register: '' }
300 - { id: 6, class: gprc, preferred-register: '' }
301 - { id: 7, class: crrc, preferred-register: '' }
302 - { id: 8, class: vsrc, preferred-register: '' }
303 - { id: 9, class: accrc, preferred-register: '' }
304 - { id: 10, class: uaccrc, preferred-register: '' }
305 - { id: 11, class: accrc, preferred-register: '' }
306 - { id: 12, class: accrc, preferred-register: '' }
307 - { id: 13, class: accrc, preferred-register: '' }
308 - { id: 14, class: vsrc, preferred-register: '' }
309 - { id: 15, class: vsrprc, preferred-register: '' }
310 - { id: 16, class: vsrprc, preferred-register: '' }
311 - { id: 17, class: vsrc, preferred-register: '' }
312 - { id: 18, class: vsrprc, preferred-register: '' }
313 - { id: 19, class: vsrprc, preferred-register: '' }
314 - { id: 20, class: vsrc, preferred-register: '' }
315 - { id: 21, class: vsrprc, preferred-register: '' }
316 - { id: 22, class: vsrprc, preferred-register: '' }
317 - { id: 23, class: vsrc, preferred-register: '' }
318 - { id: 24, class: vsrprc, preferred-register: '' }
320 - { reg: '$x3', virtual-reg: '%2' }
321 - { reg: '$v2', virtual-reg: '%3' }
322 - { reg: '$x7', virtual-reg: '%4' }
324 isFrameAddressTaken: false
325 isReturnAddressTaken: false
334 maxCallFrameSize: 4294967295
335 cvBytesOfCalleeSavedRegisters: 0
336 hasOpaqueSPAdjustment: false
338 hasMustTailInVarArgFunc: false
345 debugValueSubstitutions: []
347 machineFunctionInfo: {}
350 successors: %bb.3(0x30000000), %bb.1(0x50000000)
351 liveins: $x3, $v2, $x7
353 %4:g8rc_and_g8rc_nox0 = COPY $x7
356 %6:gprc = COPY %2.sub_32
357 %7:crrc = CMPLWI killed %6, 0
358 BCC 68, killed %7, %bb.1
361 successors: %bb.2(0x80000000)
363 %5:uaccrc = IMPLICIT_DEF
367 successors: %bb.2(0x80000000)
370 %10:uaccrc = IMPLICIT_DEF
372 %9:accrc = XVF32GERPP %11, %8, %8
376 ; We check that the PHI node on primed accumulator is inserted after
378 ; CHECK-LABEL: name: phiCopyUndef
379 ; CHECK-LABEL: bb.{{[0-9]}}.if.end:
380 ; CHECK-NEXT: :accrc = PHI
381 ; CHECK-NEXT: %1:uaccrc = PHI
382 %1:uaccrc = PHI %5, %bb.3, %0, %bb.1
384 %12:accrc = XXMFACC %13
385 %14:vsrc = COPY %12.sub_vsx1
386 %16:vsrprc = IMPLICIT_DEF
387 %15:vsrprc = INSERT_SUBREG %16, killed %14, %subreg.sub_vsx1
388 %17:vsrc = COPY %12.sub_vsx0
389 %18:vsrprc = INSERT_SUBREG %15, killed %17, %subreg.sub_vsx0
390 STXVP killed %18, 32, %4 :: (store (s256) into %ir.ptr + 32)
391 %19:vsrprc = COPY %12.sub_pair1
392 %20:vsrc = COPY %19.sub_vsx1
393 %22:vsrprc = IMPLICIT_DEF
394 %21:vsrprc = INSERT_SUBREG %22, killed %20, %subreg.sub_vsx1
395 %23:vsrc = COPY %19.sub_vsx0
396 %24:vsrprc = INSERT_SUBREG %21, killed %23, %subreg.sub_vsx0
397 STXVP killed %24, 0, %4 :: (store (s256) into %ir.ptr, align 64)
398 BLR8 implicit $lr8, implicit $rm
404 exposesReturnsTwice: false
406 regBankSelected: false
409 tracksRegLiveness: true
412 - { id: 0, class: gprc_and_gprc_nor0, preferred-register: '' }
413 - { id: 1, class: uaccrc, preferred-register: '' }
414 - { id: 2, class: uaccrc, preferred-register: '' }
415 - { id: 3, class: uaccrc, preferred-register: '' }
416 - { id: 4, class: uaccrc, preferred-register: '' }
417 - { id: 5, class: uaccrc, preferred-register: '' }
418 - { id: 6, class: uaccrc, preferred-register: '' }
419 - { id: 7, class: g8rc, preferred-register: '' }
420 - { id: 8, class: vrrc, preferred-register: '' }
421 - { id: 9, class: g8rc_and_g8rc_nox0, preferred-register: '' }
422 - { id: 10, class: gprc_and_gprc_nor0, preferred-register: '' }
423 - { id: 11, class: uaccrc, preferred-register: '' }
424 - { id: 12, class: crrc, preferred-register: '' }
425 - { id: 13, class: uaccrc, preferred-register: '' }
426 - { id: 14, class: gprc, preferred-register: '' }
427 - { id: 15, class: crrc, preferred-register: '' }
428 - { id: 16, class: uaccrc, preferred-register: '' }
429 - { id: 17, class: gprc_and_gprc_nor0, preferred-register: '' }
430 - { id: 18, class: gprc, preferred-register: '' }
431 - { id: 19, class: g8rc, preferred-register: '' }
432 - { id: 20, class: g8rc, preferred-register: '' }
433 - { id: 21, class: g8rc_and_g8rc_nox0, preferred-register: '' }
434 - { id: 22, class: g8rc, preferred-register: '' }
435 - { id: 23, class: vsrc, preferred-register: '' }
436 - { id: 24, class: accrc, preferred-register: '' }
437 - { id: 25, class: accrc, preferred-register: '' }
438 - { id: 26, class: accrc, preferred-register: '' }
439 - { id: 27, class: accrc, preferred-register: '' }
440 - { id: 28, class: accrc, preferred-register: '' }
441 - { id: 29, class: accrc, preferred-register: '' }
442 - { id: 30, class: accrc, preferred-register: '' }
443 - { id: 31, class: accrc, preferred-register: '' }
444 - { id: 32, class: accrc, preferred-register: '' }
445 - { id: 33, class: crrc, preferred-register: '' }
446 - { id: 34, class: gprc, preferred-register: '' }
447 - { id: 35, class: g8rc, preferred-register: '' }
448 - { id: 36, class: g8rc, preferred-register: '' }
449 - { id: 37, class: g8rc_and_g8rc_nox0, preferred-register: '' }
450 - { id: 38, class: g8rc, preferred-register: '' }
451 - { id: 39, class: vsrc, preferred-register: '' }
452 - { id: 40, class: accrc, preferred-register: '' }
453 - { id: 41, class: accrc, preferred-register: '' }
454 - { id: 42, class: accrc, preferred-register: '' }
455 - { id: 43, class: accrc, preferred-register: '' }
456 - { id: 44, class: vsrc, preferred-register: '' }
457 - { id: 45, class: vsrprc, preferred-register: '' }
458 - { id: 46, class: vsrprc, preferred-register: '' }
459 - { id: 47, class: vsrc, preferred-register: '' }
460 - { id: 48, class: vsrprc, preferred-register: '' }
461 - { id: 49, class: vsrprc, preferred-register: '' }
462 - { id: 50, class: vsrc, preferred-register: '' }
463 - { id: 51, class: vsrprc, preferred-register: '' }
464 - { id: 52, class: vsrprc, preferred-register: '' }
465 - { id: 53, class: vsrc, preferred-register: '' }
466 - { id: 54, class: vsrprc, preferred-register: '' }
468 - { reg: '$x3', virtual-reg: '%7' }
469 - { reg: '$v2', virtual-reg: '%8' }
470 - { reg: '$x7', virtual-reg: '%9' }
472 isFrameAddressTaken: false
473 isReturnAddressTaken: false
482 maxCallFrameSize: 4294967295
483 cvBytesOfCalleeSavedRegisters: 0
484 hasOpaqueSPAdjustment: false
486 hasMustTailInVarArgFunc: false
493 debugValueSubstitutions: []
495 machineFunctionInfo: {}
498 successors: %bb.1(0x50000000), %bb.8(0x30000000)
499 liveins: $x3, $v2, $x7
501 %9:g8rc_and_g8rc_nox0 = COPY $x7
504 %10:gprc_and_gprc_nor0 = COPY %7.sub_32
505 %12:crrc = CMPWI %10, 1
506 BCC 4, killed %12, %bb.1
509 successors: %bb.6(0x80000000)
511 %11:uaccrc = IMPLICIT_DEF
514 bb.1.for.body.preheader:
515 successors: %bb.3(0x40000000), %bb.2(0x40000000)
517 %14:gprc = ADDI %10, -1
518 %0:gprc_and_gprc_nor0 = RLWINM %10, 0, 29, 31
519 %13:uaccrc = IMPLICIT_DEF
520 %15:crrc = CMPLWI killed %14, 7
521 BCC 12, killed %15, %bb.3
524 bb.2.for.body.preheader.new:
525 successors: %bb.7(0x80000000)
527 %17:gprc_and_gprc_nor0 = RLWINM %10, 0, 0, 28
528 %18:gprc = ADDI killed %17, -8
529 %20:g8rc = IMPLICIT_DEF
530 %19:g8rc = INSERT_SUBREG %20, killed %18, %subreg.sub_32
531 %21:g8rc_and_g8rc_nox0 = RLWINM8 %19, 29, 3, 31
532 %22:g8rc = nuw nsw ADDI8 killed %21, 1
533 MTCTR8loop killed %22, implicit-def dead $ctr8
534 %16:uaccrc = IMPLICIT_DEF
537 bb.3.for.cond.cleanup.loopexit.unr-lcssa:
538 successors: %bb.6(0x30000000), %bb.4(0x50000000)
540 %1:uaccrc = PHI %13, %bb.1, %6, %bb.7
541 %33:crrc = CMPLWI %0, 0
542 BCC 76, killed %33, %bb.6
545 bb.4.for.body.epil.preheader:
546 successors: %bb.5(0x80000000)
548 %34:gprc = nsw ADDI %0, -1
549 %36:g8rc = IMPLICIT_DEF
550 %35:g8rc = INSERT_SUBREG %36, killed %34, %subreg.sub_32
551 %37:g8rc_and_g8rc_nox0 = RLDICL killed %35, 0, 32
552 %38:g8rc = nuw nsw ADDI8 killed %37, 1
553 MTCTR8loop killed %38, implicit-def dead $ctr8
556 successors: %bb.5(0x7c000000), %bb.6(0x04000000)
557 ; We check that the PHI node on primed accumulator is inserted after
559 ; CHECK-LABEL: name: phiPhis
560 ; CHECK-LABEL: bb.{{[0-9]}}.for.body.epil:
561 ; CHECK-NEXT: successors: %bb.{{[0-9]}}(0x{{[0-9a-f]+}}), %bb.{{[0-9]}}(0x{{[0-9a-f]+}})
563 ; CHECK-NEXT: :accrc = PHI
564 ; CHECK-NEXT: %2:uaccrc = PHI
565 %2:uaccrc = PHI %1, %bb.4, %3, %bb.5
568 %40:accrc = XVF32GERPP %41, %39, %39
570 BDNZ8 %bb.5, implicit-def dead $ctr8, implicit $ctr8
573 bb.6.for.cond.cleanup:
574 %4:uaccrc = PHI %11, %bb.8, %1, %bb.3, %3, %bb.5
576 %42:accrc = XXMFACC %43
577 %44:vsrc = COPY %42.sub_vsx1
578 %46:vsrprc = IMPLICIT_DEF
579 %45:vsrprc = INSERT_SUBREG %46, killed %44, %subreg.sub_vsx1
580 %47:vsrc = COPY %42.sub_vsx0
581 %48:vsrprc = INSERT_SUBREG %45, killed %47, %subreg.sub_vsx0
582 STXVP killed %48, 96, %9 :: (store (s256) into %ir.add.ptr + 32)
583 %49:vsrprc = COPY %42.sub_pair1
584 %50:vsrc = COPY %49.sub_vsx1
585 %52:vsrprc = IMPLICIT_DEF
586 %51:vsrprc = INSERT_SUBREG %52, killed %50, %subreg.sub_vsx1
587 %53:vsrc = COPY %49.sub_vsx0
588 %54:vsrprc = INSERT_SUBREG %51, killed %53, %subreg.sub_vsx0
589 STXVP killed %54, 64, %9 :: (store (s256) into %ir.add.ptr, align 64)
590 BLR8 implicit $lr8, implicit $rm
593 successors: %bb.7(0x7c000000), %bb.3(0x04000000)
595 %5:uaccrc = PHI %16, %bb.2, %6, %bb.7
598 %24:accrc = XVF32GERPP %25, %23, %23
599 %26:accrc = XVF32GERPP %24, %23, %23
600 %27:accrc = XVF32GERPP %26, %23, %23
601 %28:accrc = XVF32GERPP %27, %23, %23
602 %29:accrc = XVF32GERPP %28, %23, %23
603 %30:accrc = XVF32GERPP %29, %23, %23
604 %31:accrc = XVF32GERPP %30, %23, %23
605 %32:accrc = XVF32GERPP %31, %23, %23
607 BDNZ8 %bb.7, implicit-def dead $ctr8, implicit $ctr8
614 exposesReturnsTwice: false
616 regBankSelected: false
619 tracksRegLiveness: true
622 - { id: 0, class: gprc_and_gprc_nor0, preferred-register: '' }
623 - { id: 1, class: uaccrc, preferred-register: '' }
624 - { id: 2, class: uaccrc, preferred-register: '' }
625 - { id: 3, class: uaccrc, preferred-register: '' }
626 - { id: 4, class: uaccrc, preferred-register: '' }
627 - { id: 5, class: uaccrc, preferred-register: '' }
628 - { id: 6, class: uaccrc, preferred-register: '' }
629 - { id: 7, class: g8rc, preferred-register: '' }
630 - { id: 8, class: vrrc, preferred-register: '' }
631 - { id: 9, class: g8rc_and_g8rc_nox0, preferred-register: '' }
632 - { id: 10, class: gprc_and_gprc_nor0, preferred-register: '' }
633 - { id: 11, class: uaccrc, preferred-register: '' }
634 - { id: 12, class: crrc, preferred-register: '' }
635 - { id: 13, class: uaccrc, preferred-register: '' }
636 - { id: 14, class: gprc, preferred-register: '' }
637 - { id: 15, class: crrc, preferred-register: '' }
638 - { id: 16, class: uaccrc, preferred-register: '' }
639 - { id: 17, class: gprc_and_gprc_nor0, preferred-register: '' }
640 - { id: 18, class: gprc, preferred-register: '' }
641 - { id: 19, class: g8rc, preferred-register: '' }
642 - { id: 20, class: g8rc, preferred-register: '' }
643 - { id: 21, class: g8rc_and_g8rc_nox0, preferred-register: '' }
644 - { id: 22, class: g8rc, preferred-register: '' }
645 - { id: 23, class: vsrc, preferred-register: '' }
646 - { id: 24, class: accrc, preferred-register: '' }
647 - { id: 25, class: accrc, preferred-register: '' }
648 - { id: 26, class: accrc, preferred-register: '' }
649 - { id: 27, class: accrc, preferred-register: '' }
650 - { id: 28, class: accrc, preferred-register: '' }
651 - { id: 29, class: accrc, preferred-register: '' }
652 - { id: 30, class: accrc, preferred-register: '' }
653 - { id: 31, class: accrc, preferred-register: '' }
654 - { id: 32, class: accrc, preferred-register: '' }
655 - { id: 33, class: crrc, preferred-register: '' }
656 - { id: 34, class: gprc, preferred-register: '' }
657 - { id: 35, class: g8rc, preferred-register: '' }
658 - { id: 36, class: g8rc, preferred-register: '' }
659 - { id: 37, class: g8rc_and_g8rc_nox0, preferred-register: '' }
660 - { id: 38, class: g8rc, preferred-register: '' }
661 - { id: 39, class: vsrc, preferred-register: '' }
662 - { id: 40, class: accrc, preferred-register: '' }
663 - { id: 41, class: accrc, preferred-register: '' }
664 - { id: 42, class: accrc, preferred-register: '' }
665 - { id: 43, class: accrc, preferred-register: '' }
666 - { id: 44, class: vsrc, preferred-register: '' }
667 - { id: 45, class: vsrprc, preferred-register: '' }
668 - { id: 46, class: vsrprc, preferred-register: '' }
669 - { id: 47, class: vsrc, preferred-register: '' }
670 - { id: 48, class: vsrprc, preferred-register: '' }
671 - { id: 49, class: vsrprc, preferred-register: '' }
672 - { id: 50, class: vsrc, preferred-register: '' }
673 - { id: 51, class: vsrprc, preferred-register: '' }
674 - { id: 52, class: vsrprc, preferred-register: '' }
675 - { id: 53, class: vsrc, preferred-register: '' }
676 - { id: 54, class: vsrprc, preferred-register: '' }
678 - { reg: '$x3', virtual-reg: '%7' }
679 - { reg: '$v2', virtual-reg: '%8' }
680 - { reg: '$x7', virtual-reg: '%9' }
682 isFrameAddressTaken: false
683 isReturnAddressTaken: false
692 maxCallFrameSize: 4294967295
693 cvBytesOfCalleeSavedRegisters: 0
694 hasOpaqueSPAdjustment: false
696 hasMustTailInVarArgFunc: false
703 debugValueSubstitutions: []
705 machineFunctionInfo: {}
708 successors: %bb.1(0x50000000), %bb.8(0x30000000)
709 liveins: $x3, $v2, $x7
711 %9:g8rc_and_g8rc_nox0 = COPY $x7
714 %10:gprc_and_gprc_nor0 = COPY %7.sub_32
715 %12:crrc = CMPWI %10, 1
716 BCC 4, killed %12, %bb.1
719 successors: %bb.6(0x80000000)
721 %11:uaccrc = IMPLICIT_DEF
724 bb.1.for.body.preheader:
725 successors: %bb.3(0x40000000), %bb.2(0x40000000)
727 %14:gprc = ADDI %10, -1
728 %0:gprc_and_gprc_nor0 = RLWINM %10, 0, 29, 31
729 %13:uaccrc = IMPLICIT_DEF
730 %15:crrc = CMPLWI %14, 7
731 BCC 12, killed %15, %bb.3
734 bb.2.for.body.preheader.new:
735 successors: %bb.7(0x80000000)
737 %17:gprc_and_gprc_nor0 = RLWINM %10, 0, 0, 28
738 %18:gprc = ADDI killed %17, -8
739 %20:g8rc = IMPLICIT_DEF
740 %19:g8rc = INSERT_SUBREG %20, killed %18, %subreg.sub_32
741 %21:g8rc_and_g8rc_nox0 = RLWINM8 %19, 29, 3, 31
742 %22:g8rc = nuw nsw ADDI8 killed %21, 1
743 MTCTR8loop killed %22, implicit-def dead $ctr8
744 %16:uaccrc = IMPLICIT_DEF
747 bb.3.for.cond.cleanup.loopexit.unr-lcssa:
748 successors: %bb.6(0x30000000), %bb.4(0x50000000)
749 ; We check that no phi node is inserted in the block.
750 ; CHECK-LABEL: name: phiCycle
751 ; CHECK-LABEL: bb.{{[0-9]}}.for.cond.cleanup.loopexit.unr-lcssa:
752 ; CHECK-NEXT: successors: %bb.{{[0-9]}}(0x{{[0-9a-f]+}}), %bb.{{[0-9]}}(0x{{[0-9a-f]+}})
754 ; CHECK-NEXT: %1:uaccrc = PHI
755 ; CHECK-NEXT: %33:crrc
756 %1:uaccrc = PHI %13, %bb.1, %6, %bb.7, %2, %bb.5
757 %33:crrc = CMPLWI %0, 0
758 BCC 76, killed %33, %bb.6
761 bb.4.for.body.epil.preheader:
762 successors: %bb.5(0x80000000)
764 %34:gprc = nsw ADDI %0, -1
765 %36:g8rc = IMPLICIT_DEF
766 %35:g8rc = INSERT_SUBREG %36, killed %34, %subreg.sub_32
767 %37:g8rc_and_g8rc_nox0 = RLDICL killed %35, 0, 32
768 %38:g8rc = nuw nsw ADDI8 killed %37, 1
769 MTCTR8loop killed %38, implicit-def dead $ctr8
772 successors: %bb.3(0x40000000), %bb.5(0x7c000000)
773 ; We check that no phi node is inserted in the block.
774 ; CHECK-LABEL: bb.{{[0-9]}}.for.body.epil:
775 ; CHECK-NEXT: successors: %bb.{{[0-9]}}(0x{{[0-9a-f]+}}), %bb.{{[0-9]}}(0x{{[0-9a-f]+}})
777 ; CHECK-NEXT: %2:uaccrc = PHI
778 ; CHECK-NEXT: %39:vsrc
779 %2:uaccrc = PHI %1, %bb.4, %3, %bb.5
782 %40:accrc = XVF32GERPP %41, %39, %39
784 %15:crrc = CMPLWI %14, 7
785 BCC 12, killed %15, %bb.5
788 bb.6.for.cond.cleanup:
789 %4:uaccrc = PHI %11, %bb.8, %1, %bb.3
791 %42:accrc = XXMFACC %43
792 %44:vsrc = COPY %42.sub_vsx1
793 %46:vsrprc = IMPLICIT_DEF
794 %45:vsrprc = INSERT_SUBREG %46, killed %44, %subreg.sub_vsx1
795 %47:vsrc = COPY %42.sub_vsx0
796 %48:vsrprc = INSERT_SUBREG %45, killed %47, %subreg.sub_vsx0
797 STXVP killed %48, 96, %9 :: (store (s256) into %ir.add.ptr + 32)
798 %49:vsrprc = COPY %42.sub_pair1
799 %50:vsrc = COPY %49.sub_vsx1
800 %52:vsrprc = IMPLICIT_DEF
801 %51:vsrprc = INSERT_SUBREG %52, killed %50, %subreg.sub_vsx1
802 %53:vsrc = COPY %49.sub_vsx0
803 %54:vsrprc = INSERT_SUBREG %51, killed %53, %subreg.sub_vsx0
804 STXVP killed %54, 64, %9 :: (store (s256) into %ir.add.ptr, align 64)
805 BLR8 implicit $lr8, implicit $rm
808 successors: %bb.7(0x7c000000), %bb.3(0x04000000)
810 %5:uaccrc = PHI %16, %bb.2, %6, %bb.7
813 %24:accrc = XVF32GERPP %25, %23, %23
814 %26:accrc = XVF32GERPP %24, %23, %23
815 %27:accrc = XVF32GERPP %26, %23, %23
816 %28:accrc = XVF32GERPP %27, %23, %23
817 %29:accrc = XVF32GERPP %28, %23, %23
818 %30:accrc = XVF32GERPP %29, %23, %23
819 %31:accrc = XVF32GERPP %30, %23, %23
820 %32:accrc = XVF32GERPP %31, %23, %23
822 BDNZ8 %bb.7, implicit-def dead $ctr8, implicit $ctr8