Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Unified Diff: test/unittests/compiler/node-test-utils.cc

Issue 2191883002: [turbofan] Adds speculative opcodes for shift right. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Really fix the merge conflicts. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698