Index: src/compiler/node-matchers.h |
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h |
index c748c61e6a9cc0624c074bde0a579378b067abff..33ddf9a10df26d868b1f7915642a0aacc73a1f23 100644 |
--- a/src/compiler/node-matchers.h |
+++ b/src/compiler/node-matchers.h |
@@ -80,6 +80,10 @@ struct IntMatcher FINAL : public ValueMatcher<T, kOpcode> { |
return this->HasValue() && this->Value() > 0 && |
(this->Value() & (this->Value() - 1)) == 0; |
} |
+ bool IsNegativePowerOf2() const { |
+ return this->HasValue() && this->Value() < 0 && |
+ (-this->Value() & (-this->Value() - 1)) == 0; |
+ } |
}; |
typedef IntMatcher<int32_t, IrOpcode::kInt32Constant> Int32Matcher; |