| Index: src/compiler/node-matchers.h
|
| diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h
|
| index 7cbd1c5e65bf445383c53572ce75e8b308663d26..fc11a0a8cf03f17e80b7a6d45196badf4e9adc7c 100644
|
| --- a/src/compiler/node-matchers.h
|
| +++ b/src/compiler/node-matchers.h
|
| @@ -102,6 +102,9 @@ template <typename T, IrOpcode::Value kOpcode>
|
| struct IntMatcher FINAL : public ValueMatcher<T, kOpcode> {
|
| explicit IntMatcher(Node* node) : ValueMatcher<T, kOpcode>(node) {}
|
|
|
| + bool IsMultipleOf(T n) const {
|
| + return this->HasValue() && (this->Value() % n) == 0;
|
| + }
|
| bool IsPowerOf2() const {
|
| return this->HasValue() && this->Value() > 0 &&
|
| (this->Value() & (this->Value() - 1)) == 0;
|
|
|