[Mlir-commits] [mlir] [mlir][vector] Add more patterns to Vector Linearize transformation (PR #136193)

James Newling llvmlistbot at llvm.org
Wed Apr 23 09:24:12 PDT 2025


================
@@ -273,6 +280,80 @@ struct LinearizeVectorExtractStridedSlice final
   unsigned targetVectorBitWidth;
 };
 
+/// This pattern linearizes the InsertStridedSliceOp by extracting rows from the
+/// source vector using ExtractStridedSliceOp and inserting them into the
+/// destination vector using InsertStridedSliceOp.
+/// Following,
+///   vector.insert_strided_slice %s, %d {offsets=[0, 0]}: vector<2x4xf32> into
+///   vector<4x4xf32>
+/// is converted to :
+///   %0 = vector.extract_strided_slice %s {offsets=[0], sizes=[4], strides=[1]}
----------------
newling wrote:

Please check formatting. Maybe `clang-format off` and `clang-format on` will be helpful? 

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


More information about the Mlir-commits mailing list