Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index f38fb7d5e3d4312383c198cf23b25a7cf2f8f602..2b525159b0ba2be12d386e718c4c0377f33a5448 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -3341,6 +3341,9 @@ HInstruction* HMod::New( |
if (c_left->HasInteger32Value() && c_right->HasInteger32Value()) { |
int32_t dividend = c_left->Integer32Value(); |
int32_t divisor = c_right->Integer32Value(); |
+ if (dividend == kMinInt && divisor == -1) { |
+ return H_CONSTANT_DOUBLE(-0.0); |
+ } |
if (divisor != 0) { |
int32_t res = dividend % divisor; |
if ((res == 0) && (dividend < 0)) { |