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

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


================
@@ -1538,7 +1557,7 @@ OpFoldResult EqualOp::fold(FoldAdaptor adaptor) {
     return DenseElementsAttr::get(resultTy, true);
   }
 
-  if (!lhsAttr || !rhsAttr)
+  if (!resultTy || !lhsAttr || !rhsAttr)
----------------
lhutton1 wrote:

The same crash seems possible if the result type is ranked, but not static

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


More information about the Mlir-commits mailing list