[Mlir-commits] [mlir] [mlir][Vector] Add `vector.shuffle` tree transformation (PR #145740)

Diego Caballero llvmlistbot at llvm.org
Mon Jun 30 22:52:36 PDT 2025


================
@@ -0,0 +1,329 @@
+// RUN: mlir-opt -lower-vector-to-from-elements-to-shuffle-tree -split-input-file %s | FileCheck %s
+
+// Captured variable names for `vector.shuffle` operations follow the L#SH# convention,
+// where L# refers to the level of the tree the shuffle belongs to, and SH# refers to
+// the shuffle index within that level.
+
+func.func @to_from_elements_single_input_shuffle(%a: vector<8xf32>) -> vector<8xf32> {
----------------
dcaballe wrote:

The logic that I've followed is:
  1. Shuffles have two inputs so no need to specify "multi_input" shuffle every time. It's the "default".
  2. Single input shuffle is the exception so it's worth adding the "single_input" tag for it.
  3. Shuffle tree has multiple shuffles in general so no need to specify "multi_suffle". It's the "default"
  4. Single shuffle tree is the exception so it's worth adding the "single_shuffle" tag for it.

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


More information about the Mlir-commits mailing list