[llvm] [ConstantFolding] Add constant folding for scalable vector interleave intrinsics. (PR #168668)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 19 07:14:02 PST 2025
================
@@ -51,6 +51,22 @@ define <8 x i32> @fold_vector_interleave2() {
ret <8 x i32> %1
}
+define <vscale x 8 x i32> @fold_scalable_vector_interleave2() {
+; CHECK-LABEL: define <vscale x 8 x i32> @fold_scalable_vector_interleave2() {
+; CHECK-NEXT: ret <vscale x 8 x i32> zeroinitializer
+;
+ %1 = call <vscale x 8 x i32> @llvm.vector.interleave2.nxv8i32(<vscale x 4 x i32> zeroinitializer, <vscale x 4 x i32> zeroinitializer)
+ ret <vscale x 8 x i32> %1
+}
+
+define <vscale x 8 x i32> @fold_scalable_vector_interleave2_splat() {
----------------
preames wrote:
It looks like all of your tests are positive tests, would you mind adding one set of negative tests (don't need to repeat for all NFs). Say not a splat, and two different splats?
https://github.com/llvm/llvm-project/pull/168668
More information about the llvm-commits
mailing list