Index: src/crankshaft/mips64/lithium-codegen-mips64.cc |
diff --git a/src/crankshaft/mips64/lithium-codegen-mips64.cc b/src/crankshaft/mips64/lithium-codegen-mips64.cc |
index 8c7f1dc641098ec9005b45667a74404812a50b24..f76e11bc4092f01bb25cbb351616c29762361a33 100644 |
--- a/src/crankshaft/mips64/lithium-codegen-mips64.cc |
+++ b/src/crankshaft/mips64/lithium-codegen-mips64.cc |
@@ -1166,7 +1166,7 @@ void LCodeGen::DoFlooringDivByPowerOf2I(LFlooringDivByPowerOf2I* instr) { |
DCHECK(!result.is(dividend) || !scratch.is(dividend)); |
// If the divisor is 1, return the dividend. |
- if (divisor == 1) { |
+ if (divisor == 0) { |
__ Move(result, dividend); |
return; |
} |
@@ -3840,14 +3840,8 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
DCHECK(ToRegister(instr->result()).is(v0)); |
__ li(a0, Operand(instr->arity())); |
- if (instr->arity() == 1) { |
- // We only need the allocation site for the case we have a length argument. |
- // The case may bail out to the runtime, which will determine the correct |
- // elements kind with the site. |
- __ li(a2, instr->hydrogen()->site()); |
- } else { |
- __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
- } |
+ __ li(a2, instr->hydrogen()->site()); |
+ |
ElementsKind kind = instr->hydrogen()->elements_kind(); |
AllocationSiteOverrideMode override_mode = |
(AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE) |
@@ -3879,7 +3873,7 @@ void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
__ bind(&done); |
} else { |
- ArrayNArgumentsConstructorStub stub(isolate(), kind, override_mode); |
+ ArrayNArgumentsConstructorStub stub(isolate()); |
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
} |
} |