We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfb20cc commit 5e98ed0Copy full SHA for 5e98ed0
mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
@@ -63,11 +63,18 @@ parseDynamicIndex(OpAsmParser &parser,
63
}
64
65
OpAsmParser::UnresolvedOperand operand = OpAsmParser::UnresolvedOperand{};
66
- if (parser.parseOperand(operand)) {
67
- dynamicSize = operand;
+ OptionalParseResult hasOperand = parser.parseOptionalOperand(operand);
+ if (!hasOperand.has_value()) {
68
+ dynamicSize = std::nullopt;
69
return success();
70
- return failure();
71
+
72
+ if (failed(hasOperand.value())) {
73
+ return failure();
74
+ }
75
76
+ dynamicSize = operand;
77
+ return success();
78
79
80
static void printDynamicIndex(OpAsmPrinter &printer, Operation *op,
0 commit comments