forked from OSchip/llvm-project
[mlir] Fix ReturnInst printing for zero operands
No longer prints a trailing ':'. PiperOrigin-RevId: 207103812
This commit is contained in:
parent
2a003256ae
commit
6472f5fbbb
|
@ -945,9 +945,10 @@ void CFGFunctionPrinter::print(const CondBranchInst *inst) {
|
|||
void CFGFunctionPrinter::print(const ReturnInst *inst) {
|
||||
os << "return";
|
||||
|
||||
if (inst->getNumOperands() != 0)
|
||||
os << ' ';
|
||||
if (inst->getNumOperands() == 0)
|
||||
return;
|
||||
|
||||
os << ' ';
|
||||
interleaveComma(inst->getOperands(),
|
||||
[&](const CFGValue *operand) { printValueID(operand); });
|
||||
os << " : ";
|
||||
|
|
|
@ -85,7 +85,7 @@ cfgfunc @simpleCFGUsingBBArgs(i32, i64) {
|
|||
bb42 (%arg0: i32, %f: i64):
|
||||
// CHECK: "bar"(%arg1) : (i64) -> (i1, i1, i1)
|
||||
%2 = "bar"(%f) : (i64) -> (i1,i1,i1)
|
||||
// CHECK: return
|
||||
// CHECK: return{{$}}
|
||||
return
|
||||
// CHECK: }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue