[Mlir-commits] [mlir] [mlir][tosa] Verify the output shape of tosa.mul and tosa.rescale (PR #193952)

Sayan Saha llvmlistbot at llvm.org
Fri Apr 24 06:23:19 PDT 2026


================
@@ -4891,19 +4904,7 @@ LogicalResult RescaleOp::verify() {
   if (succeeded(maybeOZp) && verifyOutputZeroPoint(*maybeOZp).failed())
     return failure();
 
-  auto multiplierType = llvm::dyn_cast<ShapedType>(getMultiplier().getType());
-  if (!multiplierType) {
-    emitOpError("expect shaped tensor for multiplier, got ")
-        << getMultiplier().getType();
-    return failure();
-  }
-
-  auto shiftType = llvm::dyn_cast<ShapedType>(getShift().getType());
-  if (!shiftType) {
-    emitOpError("expect shaped tensor for shift, got ") << getShift().getType();
-    return failure();
-  }
-
+  const auto multiplierType = cast<ShapedType>(getMultiplier().getType());
----------------
sahas3 wrote:

nit: llvm::cast vs cast -- it'll be good to pick one convention

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


More information about the Mlir-commits mailing list