Index: test/unittests/compiler/node-test-utils.cc |
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc |
index cf2be44505f75d3c3adba11a036e1a67aabdfbf9..51100fa9895694620fe7db5990b96bd499bd537a 100644 |
--- a/test/unittests/compiler/node-test-utils.cc |
+++ b/test/unittests/compiler/node-test-utils.cc |
@@ -809,6 +809,7 @@ class IsSpeculativeBinopMatcher final : public NodeMatcher { |
const Matcher<Node*>& effect_matcher, |
const Matcher<Node*>& control_matcher) |
: NodeMatcher(opcode), |
+ hint_matcher_(hint_matcher), |
lhs_matcher_(lhs_matcher), |
rhs_matcher_(rhs_matcher), |
effect_matcher_(effect_matcher), |
@@ -817,6 +818,9 @@ class IsSpeculativeBinopMatcher final : public NodeMatcher { |
bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { |
return (NodeMatcher::MatchAndExplain(node, listener) && |
// TODO(bmeurer): The type parameter is currently ignored. |
+ PrintMatchAndExplain( |
+ OpParameter<BinaryOperationHints::Hint>(node->op()), "hints", |
+ hint_matcher_, listener) && |
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), "lhs", |
lhs_matcher_, listener) && |
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), "rhs", |
@@ -828,6 +832,7 @@ class IsSpeculativeBinopMatcher final : public NodeMatcher { |
} |
private: |
+ const Matcher<BinaryOperationHints::Hint> hint_matcher_; |
const Matcher<Type*> type_matcher_; |
const Matcher<Node*> lhs_matcher_; |
const Matcher<Node*> rhs_matcher_; |
@@ -2068,6 +2073,26 @@ Matcher<Node*> IsSpeculativeNumberShiftLeft( |
rhs_matcher, effect_matcher, control_matcher)); |
} |
+Matcher<Node*> IsSpeculativeNumberShiftRight( |
+ const Matcher<BinaryOperationHints::Hint>& hint_matcher, |
+ const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, |
+ const Matcher<Node*>& effect_matcher, |
+ const Matcher<Node*>& control_matcher) { |
+ return MakeMatcher(new IsSpeculativeBinopMatcher( |
+ IrOpcode::kSpeculativeNumberShiftRight, hint_matcher, lhs_matcher, |
+ rhs_matcher, effect_matcher, control_matcher)); |
+} |
+ |
+Matcher<Node*> IsSpeculativeNumberShiftRightLogical( |
+ const Matcher<BinaryOperationHints::Hint>& hint_matcher, |
+ const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, |
+ const Matcher<Node*>& effect_matcher, |
+ const Matcher<Node*>& control_matcher) { |
+ return MakeMatcher(new IsSpeculativeBinopMatcher( |
+ IrOpcode::kSpeculativeNumberShiftRightLogical, hint_matcher, lhs_matcher, |
+ rhs_matcher, effect_matcher, control_matcher)); |
+} |
+ |
Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher, |
const Matcher<Node*>& effect_matcher, |
const Matcher<Node*>& control_matcher) { |