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

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

Issue 1803453003: [wasm] Int64Lowering of Word64Popcnt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@arm-shr
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 e25b38463274a4f4a3c80d6213999f6987e7309f..6099170eb056143b277ac6d9360f26bd0065078d 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -29,7 +29,9 @@ namespace compiler {
class Int64LoweringTest : public GraphTest {
public:
Int64LoweringTest()
- : GraphTest(), machine_(zone(), MachineRepresentation::kWord32) {
+ : GraphTest(),
+ machine_(zone(), MachineRepresentation::kWord32,
+ MachineOperatorBuilder::Flag::kAllOptionalOps) {
value_[0] = 0x1234567890abcdef;
value_[1] = 0x1edcba098765432f;
value_[2] = 0x1133557799886644;
@@ -512,6 +514,18 @@ TEST_F(Int64LoweringTest, Dfs) {
IsInt32Constant(high_word_value(1)))),
start(), start()));
}
+
+TEST_F(Int64LoweringTest, I64Popcnt) {
+ LowerGraph(graph()->NewNode(machine()->Word64PopcntPlaceholder(),
+ Int64Constant(value(0))),
+ MachineRepresentation::kWord64);
+
+ EXPECT_THAT(
+ graph()->end()->InputAt(1),
+ IsReturn2(IsInt32Add(IsWord32Popcnt(IsInt32Constant(low_word_value(0))),
+ IsWord32Popcnt(IsInt32Constant(high_word_value(0)))),
+ IsInt32Constant(0), start(), start()));
+}
} // namespace compiler
} // namespace internal
} // namespace v8
« 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