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

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

Issue 1778493004: [wasm] Int64Lowering of Int64Add on ia32 and arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 9 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 1bbbe3977c953834651d6289cab260d7970083a0..fb0c3f261e82be9debf552c3f2ce1361a796ee9f 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -1406,6 +1406,50 @@ class IsLoadContextMatcher final : public NodeMatcher {
const Matcher<Node*> context_matcher_;
};
+class IsQuadopMatcher final : public NodeMatcher {
+ public:
+ IsQuadopMatcher(IrOpcode::Value opcode, const Matcher<Node*>& a_matcher,
+ const Matcher<Node*>& b_matcher,
+ const Matcher<Node*>& c_matcher,
+ const Matcher<Node*>& d_matcher)
+ : NodeMatcher(opcode),
+ a_matcher_(a_matcher),
+ b_matcher_(b_matcher),
+ c_matcher_(c_matcher),
+ d_matcher_(d_matcher) {}
+
+ void DescribeTo(std::ostream* os) const final {
+ NodeMatcher::DescribeTo(os);
+ *os << " whose a (";
+ a_matcher_.DescribeTo(os);
+ *os << ") and b (";
+ b_matcher_.DescribeTo(os);
+ *os << ") and c (";
+ c_matcher_.DescribeTo(os);
+ *os << ") and d (";
+ d_matcher_.DescribeTo(os);
+ *os << ")";
+ }
+
+ bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
+ return (NodeMatcher::MatchAndExplain(node, listener) &&
+ PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), "a",
+ a_matcher_, listener) &&
+ PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), "b",
+ b_matcher_, listener) &&
+ PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2), "c",
+ c_matcher_, listener) &&
+ PrintMatchAndExplain(NodeProperties::GetValueInput(node, 3), "d",
+ d_matcher_, listener));
+ }
+
+ private:
+ const Matcher<Node*> a_matcher_;
+ const Matcher<Node*> b_matcher_;
+ const Matcher<Node*> c_matcher_;
+ const Matcher<Node*> d_matcher_;
+};
+
class IsTernopMatcher final : public NodeMatcher {
public:
IsTernopMatcher(IrOpcode::Value opcode, const Matcher<Node*>& lhs_matcher,
@@ -2104,6 +2148,16 @@ Matcher<Node*> IsLoadFramePointer() {
return MakeMatcher(new NodeMatcher(IrOpcode::kLoadFramePointer));
}
+#define IS_QUADOP_MATCHER(Name) \
+ Matcher<Node*> Is##Name( \
+ const Matcher<Node*>& a_matcher, const Matcher<Node*>& b_matcher, \
+ const Matcher<Node*>& c_matcher, const Matcher<Node*>& d_matcher) { \
+ return MakeMatcher(new IsQuadopMatcher(IrOpcode::k##Name, a_matcher, \
+ b_matcher, c_matcher, d_matcher)); \
+ }
+
+IS_QUADOP_MATCHER(Int32PairAdd)
+
#define IS_TERNOP_MATCHER(Name) \
Matcher<Node*> Is##Name(const Matcher<Node*>& lhs_matcher, \
const Matcher<Node*>& mid_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