[Mlir-commits] [mlir] [mlir][shape] Fix crash in ShapeOfOpToConstShapeOp (PR #180737)

Longsheng Mou llvmlistbot at llvm.org
Tue Feb 10 06:54:38 PST 2026


================
@@ -1706,14 +1706,18 @@ struct ShapeOfOpToConstShapeOp : public OpRewritePattern<shape::ShapeOfOp> {
     auto type = llvm::dyn_cast<ShapedType>(op.getArg().getType());
     if (!type || !type.hasStaticShape())
       return failure();
+    Type resultType = op.getResult().getType();
+    if (isa<ShapeType>(resultType))
----------------
CoTinker wrote:

Thanks for your reply, I fixed it.

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


More information about the Mlir-commits mailing list