Index: src/compiler/node-matchers.h |
diff --git a/src/compiler/node-matchers.h b/src/compiler/node-matchers.h |
index 2d8ec0005d596d5f8506c7c5ed71a7b0423f3522..c317fdd5e7b5edd17f0fc0be056062034d47f6e1 100644 |
--- a/src/compiler/node-matchers.h |
+++ b/src/compiler/node-matchers.h |
@@ -167,6 +167,9 @@ struct FloatMatcher final : public ValueMatcher<T, kOpcode> { |
bool IsNormal() const { |
return this->HasValue() && std::isnormal(this->Value()); |
} |
+ bool IsInteger() const { |
+ return this->HasValue() && std::nearbyint(this->Value()) == this->Value(); |
+ } |
bool IsPositiveOrNegativePowerOf2() const { |
if (!this->HasValue() || (this->Value() == 0.0)) { |
return false; |