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

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

Issue 1810473002: [wasm] Int64Lowering of Word64Clz. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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') | no next file » | 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 874488b476ab0b1409d4b8f72f83cdb92b54e668..002775c57207a05e92f925c475fb60a75ab03954 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -551,6 +551,28 @@ TEST_F(Int64LoweringTest, I64ReinterpretF64) {
start(), start()));
}
// kExprI64Clz:
+TEST_F(Int64LoweringTest, I64Clz) {
+ LowerGraph(graph()->NewNode(machine()->Word64Clz(), Int64Constant(value(0))),
+ MachineRepresentation::kWord64);
+
+ Capture<Node*> branch_capture;
+ Matcher<Node*> branch_matcher = IsBranch(
+ IsWord32Equal(IsInt32Constant(high_word_value(0)), IsInt32Constant(0)),
+ start());
+
+ EXPECT_THAT(
+ graph()->end()->InputAt(1),
+ IsReturn2(
+ IsPhi(MachineRepresentation::kWord32,
+ IsInt32Add(IsWord32Clz(IsInt32Constant(low_word_value(0))),
+ IsInt32Constant(32)),
+ IsWord32Clz(IsInt32Constant(high_word_value(0))),
+ IsMerge(
+ IsIfTrue(AllOf(CaptureEq(&branch_capture), branch_matcher)),
+ IsIfFalse(
+ AllOf(CaptureEq(&branch_capture), branch_matcher)))),
+ IsInt32Constant(0), start(), start()));
+}
// kExprI64Ctz:
// kExprI64Popcnt:
« no previous file with comments | « test/cctest/wasm/test-run-wasm-64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698