[Mlir-commits] [mlir] [mlir][Vector] Add `vector.shuffle` tree transformation (PR #145740)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Jun 30 08:55:34 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> {
----------------
banach-space wrote:
Comparing these function names its hard to tell what the difference is:
* `@to_from_elements_single_input_shuffle`,
* `@from_elements_to_elements_single_shuffle`
Wouldn't this be clearer:
* `@single_input`
* `@multiple_inputs` or `@two_inputs`
Ultimately, it's:
```mlir
// single input
%1 = vector.from_elements %0#7, %0#0, %0#6, %0#1, %0#5, %0#2, %0#4, %0#3 : vector<8xf32>
```
vs
```mlir
// two inputs
%2 = vector.from_elements %0#7, %1#0, %0#6, %1#1, %0#5, %1#2, %0#4, %1#3 : vector<8xf32>
```
https://github.com/llvm/llvm-project/pull/145740
More information about the Mlir-commits
mailing list