You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[IA] Add support for [de]interleave{4,6,8} (#141512)
This teaches the interleaved access pass to the lower the intrinsics for
factors 4,6 and 8 added in #139893 to target intrinsics.
Because factors 4 and 8 could either have been recursively
[de]interleaved or have just been a single intrinsic, we need to check
that it's the former it before reshuffling around the values via
interleaveLeafValues.
After this patch, we can teach the loop vectorizer to emit a single
interleave intrinsic for factors 2 through to 8, and then we can remove
the recursive interleaving matching in interleaved access pass.
%v0 = call <8 x i32> @llvm.vector.interleave2.v8i32(<4 x i32> %a, <4 x i32> %c)
202
214
%v1 = call <8 x i32> @llvm.vector.interleave2.v8i32(<4 x i32> %b, <4 x i32> %d)
@@ -216,6 +228,17 @@ define void @vector_interleave_store_factor5(<4 x i32> %a, <4 x i32> %b, <4 x i3
216
228
retvoid
217
229
}
218
230
231
+
definevoid@vector_interleave_store_factor6(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d, <4 x i32> %e, <4 x i32> %f, ptr%p) {
232
+
; CHECK-LABEL: vector_interleave_store_factor6:
233
+
; CHECK: # %bb.0:
234
+
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
235
+
; CHECK-NEXT: vsseg6e32.v v8, (a0)
236
+
; CHECK-NEXT: ret
237
+
%v = call <24 x i32> @llvm.vector.interleave6(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d, <4 x i32> %e, <4 x i32> %f)
238
+
store <24 x i32> %v, ptr%p
239
+
retvoid
240
+
}
241
+
219
242
definevoid@vector_interleave_store_factor7(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d, <4 x i32> %e, <4 x i32> %f, <4 x i32> %g, ptr%p) {
220
243
; CHECK-LABEL: vector_interleave_store_factor7:
221
244
; CHECK: # %bb.0:
@@ -232,6 +255,18 @@ define void @vector_interleave_store_factor8(<4 x i32> %a, <4 x i32> %b, <4 x i3
232
255
; CHECK: # %bb.0:
233
256
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
234
257
; CHECK-NEXT: vsseg8e32.v v8, (a0)
258
+
; CHECK-NEXT: ret
259
+
%v = call <32 x i32> @llvm.vector.interleave8(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d, <4 x i32> %e, <4 x i32> %f, <4 x i32> %g, <4 x i32> %h)
260
+
store <32 x i32> %v, ptr%p
261
+
retvoid
262
+
}
263
+
264
+
; TODO: Remove once recursive interleaving support is removed
265
+
definevoid@vector_interleave_store_factor8_recursive(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d, <4 x i32> %e, <4 x i32> %f, <4 x i32> %g, <4 x i32> %h, ptr%p) {
0 commit comments