[Mlir-commits] [mlir] [mlir][memref] Remove unsafe `getType()` from ReshapeOp (PR #205105)

Matthias Springer llvmlistbot at llvm.org
Fri Jun 26 01:23:31 PDT 2026


================
@@ -44,18 +44,19 @@ struct MemRefReshapeOpConverter : public OpRewritePattern<memref::ReshapeOp> {
     Location loc = op.getLoc();
     Value stride = nullptr;
     int64_t staticStride = 1;
+    MemRefType resultType = cast<MemRefType>(op.getType());
----------------
matthias-springer wrote:

Is this cast safe?


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


More information about the Mlir-commits mailing list