@@ -27,7 +27,7 @@ define void @vp_smax(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
27
27
; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
28
28
; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
29
29
; 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 ]]>)
31
31
; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
32
32
; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
33
33
; 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) {
39
39
; IF-EVL-NEXT: }
40
40
41
41
entry:
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
50
50
%. = 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
56
56
57
57
exit:
58
58
ret void
@@ -80,7 +80,7 @@ define void @vp_smin(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
80
80
; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
81
81
; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
82
82
; 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 ]]>)
84
84
; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
85
85
; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
86
86
; 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) {
92
92
; IF-EVL-NEXT: }
93
93
94
94
entry:
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
103
103
%. = 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
109
109
110
110
exit:
111
111
ret void
@@ -133,7 +133,7 @@ define void @vp_umax(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
133
133
; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
134
134
; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
135
135
; 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 ]]>)
137
137
; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
138
138
; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
139
139
; 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) {
145
145
; IF-EVL-NEXT: }
146
146
147
147
entry:
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
156
156
%. = 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
162
162
163
163
exit:
164
164
ret void
@@ -186,7 +186,7 @@ define void @vp_umin(ptr noalias %a, ptr noalias %b, ptr noalias %c, i64 %N) {
186
186
; IF-EVL-NEXT: CLONE ir<[[GEP2:%.+]]> = getelementptr inbounds ir<%c>, vp<[[ST]]>
187
187
; IF-EVL-NEXT: vp<[[PTR2:%[0-9]+]]> = vector-pointer ir<[[GEP2]]>
188
188
; 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 ]]>)
190
190
; IF-EVL-NEXT: CLONE ir<[[GEP3:%.+]]> = getelementptr inbounds ir<%a>, vp<[[ST]]>
191
191
; IF-EVL-NEXT: vp<[[PTR3:%[0-9]+]]> = vector-pointer ir<[[GEP3]]>
192
192
; 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) {
198
198
; IF-EVL-NEXT: }
199
199
200
200
entry:
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
209
209
%. = 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
215
215
216
216
exit:
217
217
ret void
0 commit comments