[Mlir-commits] [mlir] [MLIR][Linalg] Diagnose unsupported types in Linalg named op region builders (PR #181616)

Renato Golin llvmlistbot at llvm.org
Mon Feb 16 05:03:19 PST 2026


================
@@ -6582,13 +6593,20 @@ void BatchReduceMatmulOp::regionBuilder(
   SmallVector<Value> yields;
 
   auto toType = block.getArgument(2).getType();
-  Value castValA =
-      helper.buildTypeFn(TypeFn::cast_signed, toType, block.getArgument(0));
-  Value castValB =
-      helper.buildTypeFn(TypeFn::cast_signed, toType, block.getArgument(1));
-  Value mulVal = helper.buildBinaryFn(BinaryFn::mul, castValA, castValB);
+  Value castValA = helper.buildTypeFn(TypeFn::cast_signed, toType,
+                                      block.getArgument(0), emitError);
+  Value castValB = helper.buildTypeFn(TypeFn::cast_signed, toType,
+                                      block.getArgument(1), emitError);
+  if (!castValA || !castValB)
----------------
rengolin wrote:

please, merge _all_ checks into one.

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


More information about the Mlir-commits mailing list