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

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

Issue 10825071: Use integer division in a certain case. (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 5 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
Index: src/ia32/lithium-codegen-ia32.cc
===================================================================
--- src/ia32/lithium-codegen-ia32.cc (revision 12214)
+++ src/ia32/lithium-codegen-ia32.cc (working copy)
@@ -1019,8 +1019,10 @@
__ idiv(right_reg);
// Deoptimize if remainder is not 0.
- __ test(edx, Operand(edx));
- DeoptimizeIf(not_zero, instr->environment());
+ if (!instr->hydrogen()->CheckFlag(HValue::kWillTruncateToInt32)) {
+ __ test(edx, Operand(edx));
+ DeoptimizeIf(not_zero, instr->environment());
+ }
}

Powered by Google App Engine
This is Rietveld 408576698