[Mlir-commits] [mlir] [mlir][vector] Add Vector-dialect interleave-to-shuffle pattern, enable in VectorToSPIRV (PR #91800)

Benoit Jacob llvmlistbot at llvm.org
Mon May 13 08:02:44 PDT 2024


================
@@ -0,0 +1,21 @@
+// RUN: mlir-opt %s --transform-interpreter | FileCheck %s
+
+// CHECK-LABEL: @vector_interleave_to_shuffle
+func.func @vector_interleave_to_shuffle(%a: vector<7xi16>, %b: vector<7xi16>) -> vector<14xi16>
+{
+  %0 = vector.interleave %a, %b : vector<7xi16>
+  return %0 : vector<14xi16>
+}
+// CHECK: vector.shuffle %arg0, %arg1 [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6] : vector<7xi16>, vector<7xi16>
----------------
bjacob wrote:

Thanks for catching that. Pushed a fix.

https://github.com/llvm/llvm-project/pull/91800


More information about the Mlir-commits mailing list