@@ -27,7 +27,7 @@ define void @vp_smax(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
2727; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
2828; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
2929; IF-EVL-NEXT: WIDEN ir<[[LD2:%.+]]> = vp.load vp<[[PTR2]]>, vp<[[EVL]]>
30- ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[SMAX:%.+]]> = call llvm.smax(ir<[[LD1]]>, ir<[[LD2]]>)
30+ ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[SMAX:%.+]]> = call llvm.vp. smax(ir<[[LD1]]>, ir<[[LD2]]>, vp<[[EVL ]]>)
3131; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
3232; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
3333; IF-EVL-NEXT: WIDEN vp.store vp<[[PTR3]]>, ir<[[SMAX]]>, vp<[[EVL]]>
@@ -39,20 +39,20 @@ define void @vp_smax(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
3939; IF-EVL-NEXT: }
4040
4141entry:
42- br label %for.body
43-
44- for.body :
45- %indvars. iv = phi i64 [ %indvars. iv.next , %for.body ], [ 0 , %entry ]
46- %arrayidx = getelementptr inbounds i32 , ptr %b , i64 %indvars. iv
47- %0 = load i32 , ptr %arrayidx , align 4
48- %arrayidx3 = getelementptr inbounds i32 , ptr %c , i64 %indvars. iv
49- %1 = load i32 , ptr %arrayidx3 , align 4
42+ br label %loop
43+
44+ loop :
45+ %iv = phi i64 [ %iv.next , %loop ], [ 0 , %entry ]
46+ %gep = getelementptr inbounds i32 , ptr %b , i64 %iv
47+ %0 = load i32 , ptr %gep , align 4
48+ %gep3 = getelementptr inbounds i32 , ptr %c , i64 %iv
49+ %1 = load i32 , ptr %gep3 , align 4
5050 %. = tail call i32 @llvm.smax.i32 (i32 %0 , i32 %1 )
51- %arrayidx11 = getelementptr inbounds i32 , ptr %a , i64 %indvars. iv
52- store i32 %. , ptr %arrayidx11 , align 4
53- %indvars. iv.next = add nuw nsw i64 %indvars. iv , 1
54- %exitcond.not = icmp eq i64 %indvars. iv.next , %N
55- br i1 %exitcond.not , label %exit , label %for.body
51+ %gep11 = getelementptr inbounds i32 , ptr %a , i64 %iv
52+ store i32 %. , ptr %gep11 , align 4
53+ %iv.next = add nuw nsw i64 %iv , 1
54+ %exitcond.not = icmp eq i64 %iv.next , %N
55+ br i1 %exitcond.not , label %exit , label %loop
5656
5757exit:
5858 ret void
@@ -80,7 +80,7 @@ define void @vp_smin(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
8080; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
8181; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
8282; IF-EVL-NEXT: WIDEN ir<[[LD2:%.+]]> = vp.load vp<[[PTR2]]>, vp<[[EVL]]>
83- ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[SMIN:%.+]]> = call llvm.smin(ir<[[LD1]]>, ir<[[LD2]]>)
83+ ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[SMIN:%.+]]> = call llvm.vp. smin(ir<[[LD1]]>, ir<[[LD2]]>, vp<[[EVL ]]>)
8484; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
8585; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
8686; IF-EVL-NEXT: WIDEN vp.store vp<[[PTR3]]>, ir<[[SMIN]]>, vp<[[EVL]]>
@@ -92,20 +92,20 @@ define void @vp_smin(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
9292; IF-EVL-NEXT: }
9393
9494entry:
95- br label %for.body
96-
97- for.body :
98- %indvars. iv = phi i64 [ %indvars. iv.next , %for.body ], [ 0 , %entry ]
99- %arrayidx = getelementptr inbounds i32 , ptr %b , i64 %indvars. iv
100- %0 = load i32 , ptr %arrayidx , align 4
101- %arrayidx3 = getelementptr inbounds i32 , ptr %c , i64 %indvars. iv
102- %1 = load i32 , ptr %arrayidx3 , align 4
95+ br label %loop
96+
97+ loop :
98+ %iv = phi i64 [ %iv.next , %loop ], [ 0 , %entry ]
99+ %gep = getelementptr inbounds i32 , ptr %b , i64 %iv
100+ %0 = load i32 , ptr %gep , align 4
101+ %gep3 = getelementptr inbounds i32 , ptr %c , i64 %iv
102+ %1 = load i32 , ptr %gep3 , align 4
103103 %. = tail call i32 @llvm.smin.i32 (i32 %0 , i32 %1 )
104- %arrayidx11 = getelementptr inbounds i32 , ptr %a , i64 %indvars. iv
105- store i32 %. , ptr %arrayidx11 , align 4
106- %indvars. iv.next = add nuw nsw i64 %indvars. iv , 1
107- %exitcond.not = icmp eq i64 %indvars. iv.next , %N
108- br i1 %exitcond.not , label %exit , label %for.body
104+ %gep11 = getelementptr inbounds i32 , ptr %a , i64 %iv
105+ store i32 %. , ptr %gep11 , align 4
106+ %iv.next = add nuw nsw i64 %iv , 1
107+ %exitcond.not = icmp eq i64 %iv.next , %N
108+ br i1 %exitcond.not , label %exit , label %loop
109109
110110exit:
111111 ret void
@@ -133,7 +133,7 @@ define void @vp_umax(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
133133; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
134134; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
135135; IF-EVL-NEXT: WIDEN ir<[[LD2:%.+]]> = vp.load vp<[[PTR2]]>, vp<[[EVL]]>
136- ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[UMAX:%.+]]> = call llvm.umax(ir<[[LD1]]>, ir<[[LD2]]>)
136+ ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[UMAX:%.+]]> = call llvm.vp. umax(ir<[[LD1]]>, ir<[[LD2]]>, vp<[[EVL ]]>)
137137; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
138138; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
139139; IF-EVL-NEXT: WIDEN vp.store vp<[[PTR3]]>, ir<[[UMAX]]>, vp<[[EVL]]>
@@ -145,20 +145,20 @@ define void @vp_umax(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
145145; IF-EVL-NEXT: }
146146
147147entry:
148- br label %for.body
149-
150- for.body :
151- %indvars. iv = phi i64 [ %indvars. iv.next , %for.body ], [ 0 , %entry ]
152- %arrayidx = getelementptr inbounds i32 , ptr %b , i64 %indvars. iv
153- %0 = load i32 , ptr %arrayidx , align 4
154- %arrayidx3 = getelementptr inbounds i32 , ptr %c , i64 %indvars. iv
155- %1 = load i32 , ptr %arrayidx3 , align 4
148+ br label %loop
149+
150+ loop :
151+ %iv = phi i64 [ %iv.next , %loop ], [ 0 , %entry ]
152+ %gep = getelementptr inbounds i32 , ptr %b , i64 %iv
153+ %0 = load i32 , ptr %gep , align 4
154+ %gep3 = getelementptr inbounds i32 , ptr %c , i64 %iv
155+ %1 = load i32 , ptr %gep3 , align 4
156156 %. = tail call i32 @llvm.umax.i32 (i32 %0 , i32 %1 )
157- %arrayidx11 = getelementptr inbounds i32 , ptr %a , i64 %indvars. iv
158- store i32 %. , ptr %arrayidx11 , align 4
159- %indvars. iv.next = add nuw nsw i64 %indvars. iv , 1
160- %exitcond.not = icmp eq i64 %indvars. iv.next , %N
161- br i1 %exitcond.not , label %exit , label %for.body
157+ %gep11 = getelementptr inbounds i32 , ptr %a , i64 %iv
158+ store i32 %. , ptr %gep11 , align 4
159+ %iv.next = add nuw nsw i64 %iv , 1
160+ %exitcond.not = icmp eq i64 %iv.next , %N
161+ br i1 %exitcond.not , label %exit , label %loop
162162
163163exit:
164164 ret void
@@ -186,7 +186,7 @@ define void @vp_umin(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
186186; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
187187; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
188188; IF-EVL-NEXT: WIDEN ir<[[LD2:%.+]]> = vp.load vp<[[PTR2]]>, vp<[[EVL]]>
189- ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[UMIN:%.+]]> = call llvm.umin(ir<[[LD1]]>, ir<[[LD2]]>)
189+ ; IF-EVL-NEXT: WIDEN-INTRINSIC ir<[[UMIN:%.+]]> = call llvm.vp. umin(ir<[[LD1]]>, ir<[[LD2]]>, vp<[[EVL ]]>)
190190; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
191191; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
192192; IF-EVL-NEXT: WIDEN vp.store vp<[[PTR3]]>, ir<[[UMIN]]>, vp<[[EVL]]>
@@ -198,20 +198,20 @@ define void @vp_umin(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
198198; IF-EVL-NEXT: }
199199
200200entry:
201- br label %for.body
202-
203- for.body :
204- %indvars. iv = phi i64 [ %indvars. iv.next , %for.body ], [ 0 , %entry ]
205- %arrayidx = getelementptr inbounds i32 , ptr %b , i64 %indvars. iv
206- %0 = load i32 , ptr %arrayidx , align 4
207- %arrayidx3 = getelementptr inbounds i32 , ptr %c , i64 %indvars. iv
208- %1 = load i32 , ptr %arrayidx3 , align 4
201+ br label %loop
202+
203+ loop :
204+ %iv = phi i64 [ %iv.next , %loop ], [ 0 , %entry ]
205+ %gep = getelementptr inbounds i32 , ptr %b , i64 %iv
206+ %0 = load i32 , ptr %gep , align 4
207+ %gep3 = getelementptr inbounds i32 , ptr %c , i64 %iv
208+ %1 = load i32 , ptr %gep3 , align 4
209209 %. = tail call i32 @llvm.umin.i32 (i32 %0 , i32 %1 )
210- %arrayidx11 = getelementptr inbounds i32 , ptr %a , i64 %indvars. iv
211- store i32 %. , ptr %arrayidx11 , align 4
212- %indvars. iv.next = add nuw nsw i64 %indvars. iv , 1
213- %exitcond.not = icmp eq i64 %indvars. iv.next , %N
214- br i1 %exitcond.not , label %exit , label %for.body
210+ %gep11 = getelementptr inbounds i32 , ptr %a , i64 %iv
211+ store i32 %. , ptr %gep11 , align 4
212+ %iv.next = add nuw nsw i64 %iv , 1
213+ %exitcond.not = icmp eq i64 %iv.next , %N
214+ br i1 %exitcond.not , label %exit , label %loop
215215
216216exit:
217217 ret void
0 commit comments