Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: src/a64/lithium-codegen-a64.cc

Issue 203253004: A64: Improve the deoptimization exit code for LMathRound. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on top of tree. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 48f8ea6136f34c07a9c62b332cb2a2d41d9398f5..63ef184ece3c61cd1fcdcbd73b49f895db4312e2 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -4025,7 +4025,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
@@ -4047,8 +4046,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.
@@ -4057,9 +4055,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
@@ -4074,7 +4069,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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698