@@ -22,53 +22,53 @@ target triple = "thumbv8.1m.main-arm-none-eabi"
2222; CHECK: Cost of 1 for VF 2: induction instruction %inc = add nuw nsw i32 %i.016, 1
2323; CHECK: Cost of 0 for VF 2: induction instruction %i.016 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.inc ]
2424; CHECK: Cost of 1 for VF 2: exit condition instruction %exitcond.not = icmp eq i32 %inc, %n
25- ; CHECK: Cost of 0 for VF 2: EMIT vp<%2 > = CANONICAL-INDUCTION ir<0>, vp<%index.next>
26- ; CHECK: Cost of 0 for VF 2: vp<%3 > = SCALAR-STEPS vp<%2 >, ir<1>
27- ; CHECK: Cost of 0 for VF 2: CLONE ir<%arrayidx> = getelementptr inbounds ir<%s>, vp<%3 >
28- ; CHECK: Cost of 0 for VF 2: vp<%4 > = vector-pointer ir<%arrayidx>
29- ; CHECK: Cost of 18 for VF 2: WIDEN ir<%1> = load vp<%4 >
25+ ; CHECK: Cost of 0 for VF 2: EMIT vp<{{.+}} > = CANONICAL-INDUCTION ir<0>, vp<%index.next>
26+ ; CHECK: Cost of 0 for VF 2: vp<{{.+}} > = SCALAR-STEPS vp<{{.+}} >, ir<1>
27+ ; CHECK: Cost of 0 for VF 2: CLONE ir<%arrayidx> = getelementptr inbounds ir<%s>, vp<{{.+}} >
28+ ; CHECK: Cost of 0 for VF 2: vp<{{.+}} > = vector-pointer ir<%arrayidx>
29+ ; CHECK: Cost of 18 for VF 2: WIDEN ir<%1> = load vp<{{.+}} >
3030; CHECK: Cost of 4 for VF 2: WIDEN-CAST ir<%conv> = sext ir<%1> to i32
3131; CHECK: Cost of 20 for VF 2: WIDEN ir<%cmp2> = icmp sgt ir<%conv>, ir<%conv1>
3232; CHECK: Cost of 26 for VF 2: WIDEN ir<%conv6> = add ir<%1>, ir<%0>
33- ; CHECK: Cost of 0 for VF 2: CLONE ir<%arrayidx7> = getelementptr ir<%d>, vp<%3 >
34- ; CHECK: Cost of 0 for VF 2: vp<%5 > = vector-pointer ir<%arrayidx7>
35- ; CHECK: Cost of 16 for VF 2: WIDEN store vp<%5 >, ir<%conv6>, ir<%cmp2>
36- ; CHECK: Cost of 0 for VF 2: EMIT vp<%index.next> = add nuw vp<%2 >, vp<%0 >
37- ; CHECK: Cost of 0 for VF 2: EMIT branch-on-count vp<%index.next>, vp<%1 >
33+ ; CHECK: Cost of 0 for VF 2: CLONE ir<%arrayidx7> = getelementptr ir<%d>, vp<{{.+}} >
34+ ; CHECK: Cost of 0 for VF 2: vp<{{.+}} > = vector-pointer ir<%arrayidx7>
35+ ; CHECK: Cost of 16 for VF 2: WIDEN store vp<{{.+}} >, ir<%conv6>, ir<%cmp2>
36+ ; CHECK: Cost of 0 for VF 2: EMIT vp<%index.next> = add nuw vp<{{.+}} >, vp<{{.+}} >
37+ ; CHECK: Cost of 0 for VF 2: EMIT branch-on-count vp<%index.next>, vp<{{.+}} >
3838; CHECK: Cost for VF 2: 86 (Estimated cost per lane: 43.
3939; CHECK: Cost of 1 for VF 4: induction instruction %inc = add nuw nsw i32 %i.016, 1
4040; CHECK: Cost of 0 for VF 4: induction instruction %i.016 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.inc ]
4141; CHECK: Cost of 1 for VF 4: exit condition instruction %exitcond.not = icmp eq i32 %inc, %n
42- ; CHECK: Cost of 0 for VF 4: EMIT vp<%2 > = CANONICAL-INDUCTION ir<0>, vp<%index.next>
43- ; CHECK: Cost of 0 for VF 4: vp<%3 > = SCALAR-STEPS vp<%2 >, ir<1>
44- ; CHECK: Cost of 0 for VF 4: CLONE ir<%arrayidx> = getelementptr inbounds ir<%s>, vp<%3 >
45- ; CHECK: Cost of 0 for VF 4: vp<%4 > = vector-pointer ir<%arrayidx>
46- ; CHECK: Cost of 2 for VF 4: WIDEN ir<%1> = load vp<%4 >
42+ ; CHECK: Cost of 0 for VF 4: EMIT vp<{{.+}} > = CANONICAL-INDUCTION ir<0>, vp<%index.next>
43+ ; CHECK: Cost of 0 for VF 4: vp<{{.+}} > = SCALAR-STEPS vp<{{.+}} >, ir<1>
44+ ; CHECK: Cost of 0 for VF 4: CLONE ir<%arrayidx> = getelementptr inbounds ir<%s>, vp<{{.+}} >
45+ ; CHECK: Cost of 0 for VF 4: vp<{{.+}} > = vector-pointer ir<%arrayidx>
46+ ; CHECK: Cost of 2 for VF 4: WIDEN ir<%1> = load vp<{{.+}} >
4747; CHECK: Cost of 0 for VF 4: WIDEN-CAST ir<%conv> = sext ir<%1> to i32
4848; CHECK: Cost of 2 for VF 4: WIDEN ir<%cmp2> = icmp sgt ir<%conv>, ir<%conv1>
4949; CHECK: Cost of 2 for VF 4: WIDEN ir<%conv6> = add ir<%1>, ir<%0>
50- ; CHECK: Cost of 0 for VF 4: CLONE ir<%arrayidx7> = getelementptr ir<%d>, vp<%3 >
51- ; CHECK: Cost of 0 for VF 4: vp<%5 > = vector-pointer ir<%arrayidx7>
52- ; CHECK: Cost of 2 for VF 4: WIDEN store vp<%5 >, ir<%conv6>, ir<%cmp2>
53- ; CHECK: Cost of 0 for VF 4: EMIT vp<%index.next> = add nuw vp<%2 >, vp<%0 >
54- ; CHECK: Cost of 0 for VF 4: EMIT branch-on-count vp<%index.next>, vp<%1 >
50+ ; CHECK: Cost of 0 for VF 4: CLONE ir<%arrayidx7> = getelementptr ir<%d>, vp<{{.+}} >
51+ ; CHECK: Cost of 0 for VF 4: vp<{{.+}} > = vector-pointer ir<%arrayidx7>
52+ ; CHECK: Cost of 2 for VF 4: WIDEN store vp<{{.+}} >, ir<%conv6>, ir<%cmp2>
53+ ; CHECK: Cost of 0 for VF 4: EMIT vp<%index.next> = add nuw vp<{{.+}} >, vp<{{.+}} >
54+ ; CHECK: Cost of 0 for VF 4: EMIT branch-on-count vp<%index.next>, vp<{{.+}} >
5555; CHECK: Cost for VF 4: 10 (Estimated cost per lane: 2.
5656; CHECK: Cost of 1 for VF 8: induction instruction %inc = add nuw nsw i32 %i.016, 1
5757; CHECK: Cost of 0 for VF 8: induction instruction %i.016 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.inc ]
5858; CHECK: Cost of 1 for VF 8: exit condition instruction %exitcond.not = icmp eq i32 %inc, %n
59- ; CHECK: Cost of 0 for VF 8: EMIT vp<%2 > = CANONICAL-INDUCTION ir<0>, vp<%index.next>
60- ; CHECK: Cost of 0 for VF 8: vp<%3 > = SCALAR-STEPS vp<%2 >, ir<1>
61- ; CHECK: Cost of 0 for VF 8: CLONE ir<%arrayidx> = getelementptr inbounds ir<%s>, vp<%3 >
62- ; CHECK: Cost of 0 for VF 8: vp<%4 > = vector-pointer ir<%arrayidx>
63- ; CHECK: Cost of 2 for VF 8: WIDEN ir<%1> = load vp<%4 >
59+ ; CHECK: Cost of 0 for VF 8: EMIT vp<{{.+}} > = CANONICAL-INDUCTION ir<0>, vp<%index.next>
60+ ; CHECK: Cost of 0 for VF 8: vp<{{.+}} > = SCALAR-STEPS vp<{{.+}} >, ir<1>
61+ ; CHECK: Cost of 0 for VF 8: CLONE ir<%arrayidx> = getelementptr inbounds ir<%s>, vp<{{.+}} >
62+ ; CHECK: Cost of 0 for VF 8: vp<{{.+}} > = vector-pointer ir<%arrayidx>
63+ ; CHECK: Cost of 2 for VF 8: WIDEN ir<%1> = load vp<{{.+}} >
6464; CHECK: Cost of 2 for VF 8: WIDEN-CAST ir<%conv> = sext ir<%1> to i32
6565; CHECK: Cost of 36 for VF 8: WIDEN ir<%cmp2> = icmp sgt ir<%conv>, ir<%conv1>
6666; CHECK: Cost of 2 for VF 8: WIDEN ir<%conv6> = add ir<%1>, ir<%0>
67- ; CHECK: Cost of 0 for VF 8: CLONE ir<%arrayidx7> = getelementptr ir<%d>, vp<%3 >
68- ; CHECK: Cost of 0 for VF 8: vp<%5 > = vector-pointer ir<%arrayidx7>
69- ; CHECK: Cost of 2 for VF 8: WIDEN store vp<%5 >, ir<%conv6>, ir<%cmp2>
70- ; CHECK: Cost of 0 for VF 8: EMIT vp<%index.next> = add nuw vp<%2 >, vp<%0 >
71- ; CHECK: Cost of 0 for VF 8: EMIT branch-on-count vp<%index.next>, vp<%1 >
67+ ; CHECK: Cost of 0 for VF 8: CLONE ir<%arrayidx7> = getelementptr ir<%d>, vp<{{.+}} >
68+ ; CHECK: Cost of 0 for VF 8: vp<{{.+}} > = vector-pointer ir<%arrayidx7>
69+ ; CHECK: Cost of 2 for VF 8: WIDEN store vp<{{.+}} >, ir<%conv6>, ir<%cmp2>
70+ ; CHECK: Cost of 0 for VF 8: EMIT vp<%index.next> = add nuw vp<{{.+}} >, vp<{{.+}} >
71+ ; CHECK: Cost of 0 for VF 8: EMIT branch-on-count vp<%index.next>, vp<{{.+}} >
7272; CHECK: Cost for VF 8: 46 (Estimated cost per lane: 5.
7373; CHECK: LV: Selecting VF: 4.
7474define void @expensive_icmp (ptr noalias nocapture %d , ptr nocapture readonly %s , i32 %n , i16 zeroext %m ) #0 {
@@ -155,7 +155,7 @@ for.inc: ; preds = %for.body, %if.then
155155; CHECK: Cost of 0 for VF 2: WIDEN-CAST ir<%conv4> = trunc ir<%spec.select.i> to i8
156156; CHECK: Cost of 0 for VF 2: vp<[[VEC_PTR3:%.+]]> = vector-pointer vp<%next.gep>.1
157157; CHECK: Cost of 18 for VF 2: WIDEN store vp<[[VEC_PTR3]]>, ir<%conv4>
158- ; CHECK: Cost of 0 for VF 2: EMIT vp<%index.next> = add nuw vp<[[CAN_IV]]>, vp<%0 >
158+ ; CHECK: Cost of 0 for VF 2: EMIT vp<%index.next> = add nuw vp<[[CAN_IV]]>, vp<{{.+}} >
159159; CHECK: Cost of 0 for VF 2: EMIT branch-on-count vp<%index.next>, vp<{{.+}}>
160160; CHECK: Cost for VF 2: 130 (Estimated cost per lane: 65.
161161; CHECK: Cost of 1 for VF 4: induction instruction %dec = add i32 %blkCnt.012, -1
@@ -187,7 +187,7 @@ for.inc: ; preds = %for.body, %if.then
187187; CHECK: Cost of 0 for VF 4: WIDEN-CAST ir<%conv4> = trunc ir<%spec.select.i> to i8
188188; CHECK: Cost of 0 for VF 4: vp<[[VEC_PTR2:%.+]]> = vector-pointer vp<%next.gep>.1
189189; CHECK: Cost of 2 for VF 4: WIDEN store vp<[[VEC_PTR2]]>, ir<%conv4>
190- ; CHECK: Cost of 0 for VF 4: EMIT vp<%index.next> = add nuw vp<[[CAN_IV]]>, vp<%0 >
190+ ; CHECK: Cost of 0 for VF 4: EMIT vp<%index.next> = add nuw vp<[[CAN_IV]]>, vp<{{.+}} >
191191; CHECK: Cost of 0 for VF 4: EMIT branch-on-count vp<%index.next>, vp<{{.+}}>
192192; CHECK: Cost for VF 4: 14 (Estimated cost per lane: 3.
193193; CHECK: Cost of 1 for VF 8: induction instruction %dec = add i32 %blkCnt.012, -1
0 commit comments