[Mlir-commits] [mlir] [mlir][vector] Add pattern to rewrite contiguous ExtractStridedSlice into Extract (PR #111541)
Benoit Jacob
llvmlistbot at llvm.org
Tue Oct 8 18:48:39 PDT 2024
================
@@ -235,6 +235,11 @@ void populateVectorExtractStridedSliceToExtractInsertChainPatterns(
std::function<bool(ExtractStridedSliceOp)> controlFn = nullptr,
PatternBenefit benefit = 1);
+/// Pattern to rewrite simple cases of N-D extract_strided_slice, where the
+/// slice is contiguous, into extract and shape_cast.
+void populateVectorContiguousExtractStridedSliceToExtractPatterns(
+ RewritePatternSet &patterns, PatternBenefit benefit = 1);
----------------
bjacob wrote:
Good discussion! To help keep it concrete, I gave the canonicalizer idea a try: https://github.com/llvm/llvm-project/pull/111614.
https://github.com/llvm/llvm-project/pull/111541
More information about the Mlir-commits
mailing list