[Mlir-commits] [mlir] b0acbbe - [mlir][vector] Fix deprecation warning for `.isa`. NFC. (#135512)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Apr 12 18:49:43 PDT 2025


Author: Jakub Kuderski
Date: 2025-04-12T21:49:40-04:00
New Revision: b0acbbee88f8ae706658f2a7635df4ce39e15e74

URL: https://github.com/llvm/llvm-project/commit/b0acbbee88f8ae706658f2a7635df4ce39e15e74
DIFF: https://github.com/llvm/llvm-project/commit/b0acbbee88f8ae706658f2a7635df4ce39e15e74.diff

LOG: [mlir][vector] Fix deprecation warning for `.isa`. NFC. (#135512)

This was introduced in: https://github.com/llvm/llvm-project/pull/135371

Added: 
    

Modified: 
    mlir/lib/Dialect/Vector/IR/VectorOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
index fdbdc72c057af..4dadecd4995d4 100644
--- a/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+++ b/mlir/lib/Dialect/Vector/IR/VectorOps.cpp
@@ -5348,7 +5348,7 @@ class FoldContiguousGather final : public OpRewritePattern<GatherOp> {
   using OpRewritePattern::OpRewritePattern;
   LogicalResult matchAndRewrite(GatherOp op,
                                 PatternRewriter &rewriter) const override {
-    if (!op.getBase().getType().isa<MemRefType>())
+    if (!isa<MemRefType>(op.getBase().getType()))
       return rewriter.notifyMatchFailure(op, "base must be of memref type");
 
     if (failed(isZeroBasedContiguousSeq(op.getIndexVec())))


        


More information about the Mlir-commits mailing list