Skip to content

Commit 2526c7a

Browse files
committed
Split check
1 parent 7ea6cca commit 2526c7a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,12 +1065,20 @@ LogicalResult spirv::Deserializer::processCooperativeMatrixTypeKHR(
10651065
IntegerAttr columnsAttr = getConstantInt(operands[4]);
10661066
IntegerAttr useAttr = getConstantInt(operands[5]);
10671067

1068-
if (!rowsAttr || !columnsAttr || !useAttr)
1069-
return emitError(
1070-
unknownLoc,
1071-
"OpTypeCooperativeMatrixKHR references undefined constant <id> ")
1072-
<< (rowsAttr ? (columnsAttr ? operands[5] : operands[4])
1073-
: operands[3]);
1068+
if (!rowsAttr)
1069+
return emitError(unknownLoc, "OpTypeCooperativeMatrixKHR `Rows` references "
1070+
"undefined constant <id> ")
1071+
<< operands[3];
1072+
1073+
if (!columnsAttr)
1074+
return emitError(unknownLoc, "OpTypeCooperativeMatrixKHR `Columns` "
1075+
"references undefined constant <id> ")
1076+
<< operands[4];
1077+
1078+
if (!useAttr)
1079+
return emitError(unknownLoc, "OpTypeCooperativeMatrixKHR `Use` references "
1080+
"undefined constant <id> ")
1081+
<< operands[5];
10741082

10751083
unsigned rows = rowsAttr.getInt();
10761084
unsigned columns = columnsAttr.getInt();

0 commit comments

Comments
 (0)