| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 6c516f2497e01ae6e63a9cca6f241d55d2929172..2178184404eddca42bffc22bfc39c7ec46f25c08 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -2567,6 +2567,16 @@ class HMod: public HArithmeticBinaryOperation {
|
| SetFlag(kCanBeDivByZero);
|
| }
|
|
|
| + bool HasPowerOf2Divisor() {
|
| + if (right()->IsConstant() &&
|
| + HConstant::cast(right())->HasInteger32Value()) {
|
| + int32_t value = HConstant::cast(right())->Integer32Value();
|
| + return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value));
|
| + }
|
| +
|
| + return false;
|
| + }
|
| +
|
| virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
|
|
|
| DECLARE_CONCRETE_INSTRUCTION(Mod, "mod")
|
|
|