@@ -92,3 +92,51 @@ for.end.loopexit:
9292for.end:
9393 ret void
9494}
95+
96+ ; CHECK-LABEL: s172
97+ ; CHECK-NOT: vector.body
98+
99+ @b = global [32000 x float ] zeroinitializer , align 64
100+ @a = global [32000 x float ] zeroinitializer , align 64
101+
102+ ; for (int i = xa - 1; i < 32000; i += xb)
103+ ; a[i] += b[i];
104+ ;
105+ define float @s172 (i32 signext %xa , i32 signext %xb ) mustprogress {
106+ entry:
107+ %cmp214 = icmp slt i32 %xa , 32001
108+ br i1 %cmp214 , label %for.body.us.preheader , label %for.cond.cleanup
109+
110+ for.body.us.preheader: ; preds = %entry
111+ %sub = add i32 %xa , -1
112+ %0 = sext i32 %sub to i64
113+ %1 = sext i32 %xb to i64
114+ br label %for.body.us
115+
116+ for.body.us: ; preds = %for.body.us.preheader, %for.cond1.for.cond.cleanup3_crit_edge.us
117+ %nl.016.us = phi i32 [ %inc.us , %for.cond1.for.cond.cleanup3_crit_edge.us ], [ 0 , %for.body.us.preheader ]
118+ br label %for.body4.us
119+
120+ for.body4.us: ; preds = %for.body.us, %for.body4.us
121+ %indvars.iv = phi i64 [ %0 , %for.body.us ], [ %indvars.iv.next , %for.body4.us ]
122+ %arrayidx.us = getelementptr inbounds [32000 x float ], ptr @b , i64 0 , i64 %indvars.iv
123+ %2 = load float , ptr %arrayidx.us , align 4
124+ %arrayidx6.us = getelementptr inbounds [32000 x float ], ptr @a , i64 0 , i64 %indvars.iv
125+ %3 = load float , ptr %arrayidx6.us , align 4
126+ %add.us = fadd fast float %3 , %2
127+ store float %add.us , ptr %arrayidx6.us , align 4
128+ %indvars.iv.next = add i64 %indvars.iv , %1
129+ %cmp2.us = icmp slt i64 %indvars.iv.next , 32000
130+ br i1 %cmp2.us , label %for.body4.us , label %for.cond1.for.cond.cleanup3_crit_edge.us
131+
132+ for.cond1.for.cond.cleanup3_crit_edge.us: ; preds = %for.body4.us
133+ %inc.us = add nuw nsw i32 %nl.016.us , 1
134+ %exitcond.not = icmp eq i32 %inc.us , 100000
135+ br i1 %exitcond.not , label %for.cond.cleanup.loopexit , label %for.body.us
136+
137+ for.cond.cleanup.loopexit: ; preds = %for.cond1.for.cond.cleanup3_crit_edge.us
138+ br label %for.cond.cleanup
139+
140+ for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry
141+ ret float undef
142+ }
0 commit comments