From 0edbf9e709f4a64518be7ec9879b051e56ecff5a Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Tue, 11 Jun 2013 17:41:03 +0000 Subject: [PATCH] MIPS: Skip some conditional deopts for Div/Mul when all uses are truncating. Port r15060 (8cdd204) Original commit message: - set "can be minus zero" flag properly so minus-zero checks are skipped - skip "integer result?" check in division code when uses are truncating - drive-by cleanup: consolidated computation of kCanOverflow flag for Add/Sub into range inference phase BUG=v8:2132 R=plind44@gmail.com Review URL: https://codereview.chromium.org/16645007 Patch from Balazs Kilvady . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/lithium-codegen-mips.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 1c8973fe7e..3c583e3897 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -1246,8 +1246,10 @@ void LCodeGen::DoDivI(LDivI* instr) { __ bind(&left_not_min_int); } - __ mfhi(result); - DeoptimizeIf(ne, instr->environment(), result, Operand(zero_reg)); + if (!instr->hydrogen()->CheckFlag(HInstruction::kAllUsesTruncatingToInt32)) { + __ mfhi(result); + DeoptimizeIf(ne, instr->environment(), result, Operand(zero_reg)); + } __ mflo(result); }