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

Hocky Yudhiono llvmlistbot at llvm.org
Tue Mar 24 20:12:09 PDT 2026


================
@@ -1502,7 +1521,7 @@ OpFoldResult GreaterOp::fold(FoldAdaptor adaptor) {
   auto rhsAttr =
       llvm::dyn_cast_if_present<DenseElementsAttr>(adaptor.getInput2());
 
-  if (!lhsAttr || !rhsAttr)
+  if (!resultTy || !lhsAttr || !rhsAttr)
----------------
hockyy wrote:

Yes, I just learned about DenseElementsAttr. I'm moving the resultTy check to binary folder for proper check

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


More information about the Mlir-commits mailing list