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

Unified Diff: test/unittests/compiler/int64-lowering-unittest.cc

Issue 1806593003: [wasm] Int64Lowering of Word64Ctz. (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/cctest/wasm/test-run-wasm-64.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/int64-lowering-unittest.cc
diff --git a/test/unittests/compiler/int64-lowering-unittest.cc b/test/unittests/compiler/int64-lowering-unittest.cc
index e3a69d08b71aedbc1c01b0f0914c935b080056ec..05d38400515e70a57cda20afe54a6230878c73e4 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -590,6 +590,27 @@ TEST_F(Int64LoweringTest, I64Clz) {
IsInt32Constant(0), start(), start()));
}
// kExprI64Ctz:
+TEST_F(Int64LoweringTest, I64Ctz) {
+ LowerGraph(graph()->NewNode(machine()->Word64CtzPlaceholder(),
+ Int64Constant(value(0))),
+ MachineRepresentation::kWord64);
+ Capture<Node*> branch_capture;
+ Matcher<Node*> branch_matcher = IsBranch(
+ IsWord32Equal(IsInt32Constant(low_word_value(0)), IsInt32Constant(0)),
+ start());
+ EXPECT_THAT(
+ graph()->end()->InputAt(1),
+ IsReturn2(
+ IsPhi(MachineRepresentation::kWord32,
+ IsInt32Add(IsWord32Ctz(IsInt32Constant(high_word_value(0))),
+ IsInt32Constant(32)),
+ IsWord32Ctz(IsInt32Constant(low_word_value(0))),
+ IsMerge(
+ IsIfTrue(AllOf(CaptureEq(&branch_capture), branch_matcher)),
+ IsIfFalse(
+ AllOf(CaptureEq(&branch_capture), branch_matcher)))),
+ IsInt32Constant(0), start(), start()));
+}
// kExprI64Popcnt:
TEST_F(Int64LoweringTest, Dfs) {
« no previous file with comments | « test/cctest/wasm/test-run-wasm-64.cc ('k') | test/unittests/compiler/node-test-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698