Skip to content

Commit

Permalink
Fixes for b74192b7ae0781200be7df40e673d4f918b32587.
Browse files Browse the repository at this point in the history
To be integrated into branch...

PiperOrigin-RevId: 492770717
  • Loading branch information
chsigg authored and copybara-github committed Dec 5, 2022
1 parent 32e5715 commit 5f5ce43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sair_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,9 @@ void SairProjLastOp::print(OpAsmPrinter &printer) {
// Prints the sair.return operation.
void SairReturnOp::print(OpAsmPrinter &printer) {
printer << " ";
printer.printOperands(operands());
printer.printOperands(getOperands());
printer.printOptionalAttrDict(getOperation()->getAttrs());
if (operands().empty()) return;
if (getOperands().empty()) return;
printer << " : ";
llvm::interleaveComma(getOperands().getTypes(), printer,
[&](mlir::Type type) { printer.printType(type); });
Expand Down Expand Up @@ -1310,7 +1310,7 @@ static mlir::LogicalResult VerifyBodyTerminator(Operation *op) {

llvm::SmallVector<mlir::Type, 4> result_types;
ExtractElementTypes(op->getResults(), result_types);
mlir::TypeRange return_operand_types = return_op.operands().getTypes();
mlir::TypeRange return_operand_types = return_op.getOperands().getTypes();
if (!std::equal(result_types.begin(), result_types.end(),
return_operand_types.begin(), return_operand_types.end())) {
return op->emitOpError(
Expand Down
2 changes: 1 addition & 1 deletion sair_ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def SairReturnOp : Op<SairDialect, "return", [Terminator]> {
OpBuilder<(ins),
[{ return build($_builder, $_state, ValueRange()); }]>];

let arguments = (ins Variadic<AnyType>:$operands);
let arguments = (ins Variadic<AnyType>);
let hasCustomAssemblyFormat = 1;
}

Expand Down

0 comments on commit 5f5ce43

Please sign in to comment.