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

Unified Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 2556793003: MIPS[64]: Fix `MIPS: Improve Float(32|64)(Max|Min)`. (Closed)
Patch Set: Created 4 years 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
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 c8383d1efdfec9c8b2ed703beef45dc29b5bf02b..eaa9da174ba5f401da3c6f0c0c9335ecc8e7dc66 100644
--- a/src/crankshaft/mips64/lithium-codegen-mips64.cc
+++ b/src/crankshaft/mips64/lithium-codegen-mips64.cc
@@ -1887,7 +1887,9 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) {
FPURegister right_reg = ToDoubleRegister(right);
FPURegister result_reg = ToDoubleRegister(instr->result());
Label nan, done;
- if (operation == HMathMinMax::kMathMax) {
+ if (left_reg.is(right_reg)) {
ivica.bogosavljevic 2016/12/07 14:59:15 can we move this check to Float64Max?
Ilija.Pavlovic1 2016/12/08 13:50:06 Yes. Now, these checks are in Float(32|64)(Max|Min
+ __ Move(result_reg, left_reg);
+ } else if (operation == HMathMinMax::kMathMax) {
__ Float64Max(result_reg, left_reg, right_reg, &nan);
} else {
DCHECK(operation == HMathMinMax::kMathMin);

Powered by Google App Engine
This is Rietveld 408576698