[Mlir-commits] [mlir] [mlir][vector] Add pattern to rewrite contiguous ExtractStridedSlice into Extract (PR #111541)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Oct 8 08:19:06 PDT 2024
================
@@ -329,12 +329,76 @@ class DecomposeNDExtractStridedSlice
}
};
+static void populateFromInt64AttrArray(ArrayAttr arrayAttr,
+ SmallVectorImpl<int64_t> &results) {
+ for (auto attr : arrayAttr)
+ results.push_back(llvm::cast<IntegerAttr>(attr).getInt());
+}
----------------
kuhar wrote:
You should be able to use this helper: https://github.com/llvm/llvm-project/blob/7fa0d05a04056aac4365c69c4b515f613a43e454/mlir/lib/Dialect/Utils/IndexingUtils.cpp#L281
https://github.com/llvm/llvm-project/pull/111541
More information about the Mlir-commits
mailing list