[Mlir-commits] [mlir] [mlir][vector] Prevent folding non memref-type gather into maskedload (PR #135371)

Andrzej WarzyƄski llvmlistbot at llvm.org
Fri Apr 11 09:38:22 PDT 2025


================
@@ -5340,6 +5340,9 @@ class FoldContiguousGather final : public OpRewritePattern<GatherOp> {
   using OpRewritePattern::OpRewritePattern;
   LogicalResult matchAndRewrite(GatherOp op,
                                 PatternRewriter &rewriter) const override {
+    if (!op.getBase().getType().isa<MemRefType>())
+      return failure();
----------------
banach-space wrote:

[nit] Could you use `notifyMatchFailure`? Thanks!

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


More information about the Mlir-commits mailing list