[Mlir-commits] [mlir] d70cab4 - [mlir][spirv] Add LIT test for vector.interleave to spirv.VectorShuffle (#93189)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu May 23 10:31:54 PDT 2024
Author: Angel Zhang
Date: 2024-05-23T13:31:51-04:00
New Revision: d70cab4663f7893dce7e3be25b122e54a6b8deeb
URL: https://github.com/llvm/llvm-project/commit/d70cab4663f7893dce7e3be25b122e54a6b8deeb
DIFF: https://github.com/llvm/llvm-project/commit/d70cab4663f7893dce7e3be25b122e54a6b8deeb.diff
LOG: [mlir][spirv] Add LIT test for vector.interleave to spirv.VectorShuffle (#93189)
The plan is to replace this with a dedicated pattern
fom`vector.interleave` to `spirv.shuffle` in the future.
---------
Co-authored-by: Jakub Kuderski <kubakuderski at gmail.com>
Added:
mlir/test/mlir-vulkan-runner/addui_extended.mlir
Modified:
mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir
Removed:
mlir/test/mlir-vulkan-runner/iaddcarry_extended.mlir
################################################################################
diff --git a/mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir b/mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir
index cddc4ee385357..a7542086aa766 100644
--- a/mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir
+++ b/mlir/test/Conversion/VectorToSPIRV/vector-to-spirv.mlir
@@ -483,6 +483,17 @@ func.func @shuffle(%v0 : vector<1xi32>, %v1: vector<1xi32>) -> vector<2xi32> {
// -----
+// CHECK-LABEL: func @interleave
+// CHECK-SAME: (%[[ARG0:.+]]: vector<2xf32>, %[[ARG1:.+]]: vector<2xf32>)
+// CHECK: %[[SHUFFLE:.*]] = spirv.VectorShuffle [0 : i32, 2 : i32, 1 : i32, 3 : i32] %[[ARG0]], %[[ARG1]] : vector<2xf32>, vector<2xf32> -> vector<4xf32>
+// CHECK: return %[[SHUFFLE]]
+func.func @interleave(%a: vector<2xf32>, %b: vector<2xf32>) -> vector<4xf32> {
+ %0 = vector.interleave %a, %b : vector<2xf32>
+ return %0 : vector<4xf32>
+}
+
+// -----
+
// CHECK-LABEL: func @reduction_add
// CHECK-SAME: (%[[V:.+]]: vector<4xi32>)
// CHECK: %[[S0:.+]] = spirv.CompositeExtract %[[V]][0 : i32] : vector<4xi32>
diff --git a/mlir/test/mlir-vulkan-runner/iaddcarry_extended.mlir b/mlir/test/mlir-vulkan-runner/addui_extended.mlir
similarity index 100%
rename from mlir/test/mlir-vulkan-runner/iaddcarry_extended.mlir
rename to mlir/test/mlir-vulkan-runner/addui_extended.mlir
More information about the Mlir-commits
mailing list