Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 4981f6427aaa412efb9146020d900abdee088699..01c5f6f3c64e963f4f95cee8fcfabd749710ebfb 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(), g.Use(value)); |
Jarin
2015/08/04 12:38:30
Any reason for calling g.Use(value)? This might ke
|
+ } else { |
+ Emit(kArchRet, g.NoOutput(), |
+ g.UseLocation(value, linkage()->GetReturnLocation(), |
+ linkage()->GetReturnType())); |
+ } |
} |