[Mlir-commits] [mlir] [mlir][tosa] Fix unranked tosa canonicalizations crashes (PR #188188)

Luke Hutton llvmlistbot at llvm.org
Tue Mar 24 03:24:51 PDT 2026


================
@@ -424,6 +439,8 @@ struct ClampIsNoOp : public OpRewritePattern<tosa::ClampOp> {
                                 PatternRewriter &rewriter) const override {
     Value input = op.getInput();
     auto inputType = llvm::dyn_cast<RankedTensorType>(op.getInput().getType());
+    if (!inputType)
+      return failure();
----------------
lhutton1 wrote:

nit: could we return a `notifyMatchFailure` similar to below?

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


More information about the Mlir-commits mailing list