A64: Improve the deoptimization exit code for LMathRound.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/203253004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c8a6fd01
......@@ -4027,7 +4027,6 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
DoubleRegister temp1 = ToDoubleRegister(instr->temp1());
Register result = ToRegister(instr->result());
Label try_rounding;
Label deopt;
Label done;
// Math.round() rounds to the nearest integer, with ties going towards
......@@ -4049,8 +4048,7 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
__ Fmov(result, input);
__ Cmp(result, 0);
DeoptimizeIf(mi, instr->environment()); // [-0.5, -0.0].
DeoptimizeIfNegative(result, instr->environment()); // [-0.5, -0.0].
}
__ Fcmp(input, dot_five);
__ Mov(result, 1); // +0.5.
......@@ -4059,9 +4057,6 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
__ Csel(result, result, xzr, eq);
__ B(&done);
__ Bind(&deopt);
Deoptimize(instr->environment());
__ Bind(&try_rounding);
// Since we're providing a 32-bit result, we can implement ties-to-infinity by
// adding 0.5 to the input, then taking the floor of the result. This does not
......@@ -4076,7 +4071,7 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
// * the result is not representable using a 32-bit integer.
__ Fcmp(input, 0.0);
__ Ccmp(result, Operand(result.W(), SXTW), NoFlag, vc);
__ B(ne, &deopt);
DeoptimizeIf(ne, instr->environment());
__ Bind(&done);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment