Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 4981f6427aaa412efb9146020d900abdee088699..fde7ba3c3d22ff64eb37b040e0de402f23daee80 100644 |
--- a/src/compiler/instruction-selector.cc |
+++ b/src/compiler/instruction-selector.cc |
@@ -1000,9 +1000,13 @@ void InstructionSelector::VisitGoto(BasicBlock* target) { |
void InstructionSelector::VisitReturn(Node* value) { |
DCHECK_NOT_NULL(value); |
OperandGenerator g(this); |
- Emit(kArchRet, g.NoOutput(), |
- g.UseLocation(value, linkage()->GetReturnLocation(), |
- linkage()->GetReturnType())); |
+ if (linkage()->GetIncomingDescriptor()->ReturnCount() == 0) { |
+ Emit(kArchRet, g.NoOutput()); |
+ } else { |
+ Emit(kArchRet, g.NoOutput(), |
+ g.UseLocation(value, linkage()->GetReturnLocation(), |
+ linkage()->GetReturnType())); |
+ } |
} |