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

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

Issue 2201073002: [turbofan] Adds speculative operator for bitwise and, or and xor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handles kSigned32 feedback. Created 4 years, 4 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 b4d7a4501cfa80f0f617f0aa06d33277fbbb68a1..017b8aa598cf4d199f4bc209d21edf8b4db7d231 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -2043,55 +2043,18 @@ Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
new IsReferenceEqualMatcher(type_matcher, lhs_matcher, rhs_matcher));
}
-Matcher<Node*> IsSpeculativeNumberAdd(
- 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::kSpeculativeNumberAdd, hint_matcher, lhs_matcher, rhs_matcher,
- effect_matcher, control_matcher));
-}
-
-Matcher<Node*> IsSpeculativeNumberSubtract(
- 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::kSpeculativeNumberSubtract, hint_matcher, lhs_matcher,
- rhs_matcher, effect_matcher, control_matcher));
-}
-
-Matcher<Node*> IsSpeculativeNumberShiftLeft(
- 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::kSpeculativeNumberShiftLeft, hint_matcher, lhs_matcher,
- 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));
-}
+#define DEFINE_SPECULATIVE_BINOP_MATCHER(opcode) \
+ Matcher<Node*> Is##opcode( \
+ 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::k##opcode, hint_matcher, lhs_matcher, rhs_matcher, \
+ effect_matcher, control_matcher)); \
+ }
+SPECULATIVE_BINOPS(DEFINE_SPECULATIVE_BINOP_MATCHER);
+#undef DEFINE_SPECULATIVE_BINOP_MATCHER
Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher,
const Matcher<Node*>& effect_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