[Mlir-commits] [mlir] [mlir][spirv] Check output of getConstantInt (PR #140568)
Igor Wodiany
llvmlistbot at llvm.org
Tue May 27 06:13:33 PDT 2025
================
@@ -1061,12 +1061,19 @@ LogicalResult spirv::Deserializer::processCooperativeMatrixTypeKHR(
<< operands[2];
}
- unsigned rows = getConstantInt(operands[3]).getInt();
- unsigned columns = getConstantInt(operands[4]).getInt();
+ IntegerAttr rowsAttr = getConstantInt(operands[3]);
+ assert(rowsAttr);
----------------
IgWod-IMG wrote:
I thought about it, but then decided against it, as I felt it's more of an internal deserializer issue, than a compilation problem - there is nothing wrong with the actual input. But now when I think about it again, having an actual `emitError` will be more useful than just having asserts. I'll update the PR.
https://github.com/llvm/llvm-project/pull/140568
More information about the Mlir-commits
mailing list