[Mlir-commits] [mlir] [mlir][vector] Sink vector.extract/splat into load/store ops (PR #134389)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Apr 8 10:37:42 PDT 2025
================
@@ -1103,6 +1103,127 @@ class ExtractOpFromElementwise final
}
};
+/// Pattern to rewrite vector.extract(vector.load) -> vector/memref.load.
+/// ```
+/// vector.load %arg0[%arg1] : memref<?xf32>, vector<4xf32>
+/// vector.extract %0[1] : f32 from vector<4xf32>
+/// ```
+/// Gets converted to:
----------------
banach-space wrote:
Here and in other places, to improve the flow:
```suggestion
/// Pattern to rewrite vector.extract(vector.load) -> vector/memref.load.
///
/// Example:
/// ```
/// vector.load %arg0[%arg1] : memref<?xf32>, vector<4xf32>
/// vector.extract %0[1] : f32 from vector<4xf32>
/// ```
/// gets converted to:
```
https://github.com/llvm/llvm-project/pull/134389
More information about the Mlir-commits
mailing list