[Mlir-commits] [mlir] [mlir][Vector] Add a rewrite pattern for gather over a strided memref (PR #72991)
Diego Caballero
llvmlistbot at llvm.org
Tue Nov 28 06:37:13 PST 2023
================
@@ -168,6 +244,6 @@ struct Gather1DToConditionalLoads : OpRewritePattern<vector::GatherOp> {
void mlir::vector::populateVectorGatherLoweringPatterns(
RewritePatternSet &patterns, PatternBenefit benefit) {
- patterns.add<FlattenGather, Gather1DToConditionalLoads>(patterns.getContext(),
- benefit);
+ patterns.add<FlattenGather, RemoveStrideFromGatherSource,
----------------
dcaballe wrote:
Thanks! I was more thinking that we don't know the order in which all these patterns will be applied. If we have a pattern that is able to remove the stride and we want that to always happen before the gather is lowered, we have to make sure that the rest of the patterns have a check to bail out when a stride is found.
https://github.com/llvm/llvm-project/pull/72991
More information about the Mlir-commits
mailing list