[Mlir-commits] [mlir] [mlir][vector] Canonicalize gathers/scatters with trivial offsets (PR #117939)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Dec 31 08:21:10 PST 2024
================
@@ -5202,11 +5219,28 @@ class GatherFolder final : public OpRewritePattern<GatherOp> {
llvm_unreachable("Unexpected 1DMaskFormat on GatherFolder");
}
};
+
+/// Fold gathers with consecutive offsets [0, 1, 2, ...] into contiguous
+/// maskedload. Only 1D non-scalable vectors are supported for now.
+class GatherTrivialIndices final : public OpRewritePattern<GatherOp> {
----------------
banach-space wrote:
`GatherTrivialIndices` -> `FoldContiguousGather`?
https://github.com/llvm/llvm-project/pull/117939
More information about the Mlir-commits
mailing list