[Mlir-commits] [mlir] [mlir][tensor] Avoid asserts in reshape verifiers on unranked tensors (PR #179005)

Samarth Narang llvmlistbot at llvm.org
Mon Feb 2 11:54:58 PST 2026


================
@@ -2051,8 +2051,8 @@ static LogicalResult verifyTensorReshapeOp(TensorReshapeOp op,
 }
 
 LogicalResult ExpandShapeOp::verify() {
-  auto srcType = getSrcType();
-  auto resultType = getResultType();
+  auto srcType = llvm::cast<RankedTensorType>(getSrc().getType());
+  auto resultType = llvm::cast<RankedTensorType>(getResult().getType());
----------------
snarang181 wrote:

It looks like I do need a cast.

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


More information about the Mlir-commits mailing list