Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index ba8d03b6f6f8f04839fee8c07dbfcc9a1c33943c..c93bc1144af36376167cbac155e664ec57cda72c 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1788,7 +1788,7 @@ Range* HMul::InferRange(Zone* zone) { |
} |
-Range* HDiv::InferRange(Zone* zone) { |
+Range* HBinaryOperation::InferRangeForDiv(Zone* zone) { |
if (representation().IsInteger32()) { |
Range* a = left()->range(); |
Range* b = right()->range(); |
@@ -1797,11 +1797,11 @@ Range* HDiv::InferRange(Zone* zone) { |
(a->CanBeMinusZero() || |
(a->CanBeZero() && b->CanBeNegative()))); |
if (!a->Includes(kMinInt) || !b->Includes(-1)) { |
- ClearFlag(HValue::kCanOverflow); |
+ ClearFlag(kCanOverflow); |
} |
if (!b->CanBeZero()) { |
- ClearFlag(HValue::kCanBeDivByZero); |
+ ClearFlag(kCanBeDivByZero); |
} |
return result; |
} else { |
@@ -1810,6 +1810,16 @@ Range* HDiv::InferRange(Zone* zone) { |
} |
+Range* HDiv::InferRange(Zone* zone) { |
+ return InferRangeForDiv(zone); |
+} |
+ |
+ |
+Range* HMathFloorOfDiv::InferRange(Zone* zone) { |
+ return InferRangeForDiv(zone); |
+} |
+ |
+ |
Range* HMod::InferRange(Zone* zone) { |
if (representation().IsInteger32()) { |
Range* a = left()->range(); |