Skip to content

Commit 3ecdbad

Browse files
fixup! add cost information
1 parent 6c07ad0 commit 3ecdbad

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

llvm/test/Transforms/LoopVectorize/conditional-scalar-assignment-vplan.ll

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,25 @@ loop: ; preds = %loop.preheader, %loop
106106
; NO-EVL-NEXT: No successors
107107
; NO-EVL-NEXT: }
108108

109+
; NO-EVL: Cost of 1 for VF vscale x 1: induction instruction %iv.next = add nuw nsw i64 %iv, 1
110+
; NO-EVL-NEXT: Cost of 1 for VF vscale x 1: induction instruction %iv = phi i64 [ 0, %loop.preheader ], [ %iv.next, %loop ]
111+
; NO-EVL-NEXT: Cost of 1 for VF vscale x 1: exit condition instruction %exitcond.not = icmp eq i64 %iv.next, %wide.trip.count
112+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%3> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
113+
; NO-EVL-NEXT: Cost of 2 for VF vscale x 1: EMIT ir<%t.010> = csa-data-phi ir<poison>, ir<%spec.select>
114+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%csa.mask.phi> = csa-mask-phi ir<false>
115+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: vp<%4> = SCALAR-STEPS vp<%3>, ir<1>
116+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: CLONE ir<%arrayidx> = getelementptr inbounds ir<%data>, vp<%4>
117+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: vp<%5> = vector-pointer ir<%arrayidx>
118+
; NO-EVL-NEXT: Cost of 1 for VF vscale x 1: WIDEN ir<%0> = load vp<%5>
119+
; NO-EVL-NEXT: Cost of 1 for VF vscale x 1: WIDEN-CAST ir<%1> = sext ir<%0> to i64
120+
; NO-EVL-NEXT: Cost of 1 for VF vscale x 1: WIDEN ir<%cmp1> = icmp slt ir<%a>, ir<%1>
121+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%csa.cond.anyof> = any-of ir<%cmp1>
122+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%csa.mask.sel> = csa-mask-sel ir<%cmp1>, vp<%csa.mask.phi>, vp<%csa.cond.anyof>
123+
; NO-EVL-NEXT: Cost of 4 for VF vscale x 1: EMIT ir<%spec.select> = csa-data-update ir<%t.010>, ir<%cmp1>, ir<%0>, ir<%t.010>, vp<%csa.mask.sel>, vp<%csa.cond.anyof>
124+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%index.next> = add nuw vp<%3>, vp<%0>
125+
; NO-EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT branch-on-count vp<%index.next>, vp<%1>
126+
; NO-EVL-NEXT: Cost of 1 for VF vscale x 1: vector loop backedge
127+
109128
; EVL: VPlan 'Initial VPlan for VF={vscale x 1},UF>=1' {
110129
; EVL-NEXT: Live-in vp<%0> = VF
111130
; EVL-NEXT: Live-in vp<%1> = VF * UF
@@ -184,3 +203,21 @@ loop: ; preds = %loop.preheader, %loop
184203
; EVL-NEXT: IR %spec.select.lcssa = phi i32 [ %spec.select, %loop ] (extra operand: vp<%9> from middle.block)
185204
; EVL-NEXT: No successors
186205
; EVL-NEXT: }
206+
207+
; EVL: Cost of 1 for VF vscale x 1: induction instruction %iv.next = add nuw nsw i64 %iv, 1
208+
; EVL-NEXT: Cost of 1 for VF vscale x 1: induction instruction %iv = phi i64 [ 0, %loop.preheader ], [ %iv.next, %loop ]
209+
; EVL-NEXT: Cost of 1 for VF vscale x 1: exit condition instruction %exitcond.not = icmp eq i64 %iv.next, %wide.trip.count
210+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%5> = CANONICAL-INDUCTION ir<0>, vp<%index.next>
211+
; EVL-NEXT: Cost of 0 for VF vscale x 1: ir<%iv> = WIDEN-INDUCTION ir<0>, ir<1>, vp<%0>
212+
; EVL-NEXT: Cost of 2 for VF vscale x 1: EMIT ir<%t.010> = csa-data-phi ir<poison>, ir<%spec.select>
213+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%csa.mask.phi> = csa-mask-phi ir<false>
214+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%6> = icmp ule ir<%iv>, vp<%3>
215+
; EVL-NEXT: Cost of 0 for VF vscale x 1: WIDEN-GEP Inv[Var] ir<%arrayidx> = getelementptr inbounds ir<%data>, ir<%iv>
216+
; EVL-NEXT: Cost of 1 for VF vscale x 1: WIDEN-CAST ir<%1> = sext vp<%7> to i64
217+
; EVL-NEXT: Cost of 1 for VF vscale x 1: WIDEN ir<%cmp1> = icmp slt ir<%a>, ir<%1>
218+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%csa.cond.anyof> = any-of ir<%cmp1>
219+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%csa.mask.sel> = csa-mask-sel ir<%cmp1>, vp<%csa.mask.phi>, vp<%csa.cond.anyof>
220+
; EVL-NEXT: Cost of 4 for VF vscale x 1: EMIT ir<%spec.select> = csa-data-update ir<%t.010>, ir<%cmp1>, vp<%7>, ir<%t.010>, vp<%csa.mask.sel>, vp<%csa.cond.anyof>
221+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT vp<%index.next> = add vp<%5>, vp<%1>
222+
; EVL-NEXT: Cost of 0 for VF vscale x 1: EMIT branch-on-count vp<%index.next>, vp<%2>
223+
; EVL-NEXT: Cost of 1 for VF vscale x 1: vector loop backedge

0 commit comments

Comments
 (0)