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

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

Issue 1770333002: [wasm] Use MachineOperatorBuilder::word() instead of kPointerSize to determine the word size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use Is32 instead of word() == MachineRepresentation::kWord32 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 | « src/compiler/wasm-compiler.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 a1bb341cadbc8e1777ca61b28fbcb0696d0853fa..e5d2a4b33378fe20d9eef27e3acf223254705940 100644
--- a/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/test/unittests/compiler/int64-lowering-unittest.cc
@@ -28,7 +28,8 @@ namespace compiler {
class Int64LoweringTest : public GraphTest {
public:
- Int64LoweringTest() : GraphTest(), machine_(zone()) {
+ Int64LoweringTest()
+ : GraphTest(), machine_(zone(), MachineRepresentation::kWord32) {
value_[0] = 0x1234567890abcdef;
value_[1] = 0x1edcba098765432f;
value_[2] = 0x1133557799886644;
@@ -114,8 +115,6 @@ class Int64LoweringTest : public GraphTest {
};
TEST_F(Int64LoweringTest, Int64Constant) {
- if (4 != kPointerSize) return;
-
LowerGraph(Int64Constant(value(0)), MachineRepresentation::kWord64);
EXPECT_THAT(graph()->end()->InputAt(1),
IsReturn2(IsInt32Constant(low_word_value(0)),
@@ -123,8 +122,6 @@ TEST_F(Int64LoweringTest, Int64Constant) {
}
TEST_F(Int64LoweringTest, Int64Load) {
- if (4 != kPointerSize) return;
-
int32_t base = 0x1234;
int32_t index = 0x5678;
@@ -150,8 +147,6 @@ TEST_F(Int64LoweringTest, Int64Load) {
}
TEST_F(Int64LoweringTest, Int64Store) {
- if (4 != kPointerSize) return;
-
// We have to build the TF graph explicitly here because Store does not return
// a value.
@@ -195,8 +190,6 @@ TEST_F(Int64LoweringTest, Int64Store) {
}
TEST_F(Int64LoweringTest, Int64And) {
- if (4 != kPointerSize) return;
-
LowerGraph(graph()->NewNode(machine()->Word64And(), Int64Constant(value(0)),
Int64Constant(value(1))),
MachineRepresentation::kWord64);
@@ -209,8 +202,6 @@ TEST_F(Int64LoweringTest, Int64And) {
}
TEST_F(Int64LoweringTest, TruncateInt64ToInt32) {
- if (4 != kPointerSize) return;
-
LowerGraph(graph()->NewNode(machine()->TruncateInt64ToInt32(),
Int64Constant(value(0))),
MachineRepresentation::kWord32);
@@ -219,8 +210,6 @@ TEST_F(Int64LoweringTest, TruncateInt64ToInt32) {
}
TEST_F(Int64LoweringTest, Parameter) {
- if (4 != kPointerSize) return;
-
LowerGraph(Parameter(0), MachineRepresentation::kWord64,
MachineRepresentation::kWord64, 1);
@@ -229,8 +218,6 @@ TEST_F(Int64LoweringTest, Parameter) {
}
TEST_F(Int64LoweringTest, Parameter2) {
- if (4 != kPointerSize) return;
-
Signature<MachineRepresentation>::Builder sig_builder(zone(), 1, 5);
sig_builder.AddReturn(MachineRepresentation::kWord32);
@@ -251,8 +238,6 @@ TEST_F(Int64LoweringTest, Parameter2) {
}
TEST_F(Int64LoweringTest, CallI64Return) {
- if (4 != kPointerSize) return;
-
int32_t function = 0x9999;
Signature<MachineRepresentation>::Builder sig_builder(zone(), 1, 0);
@@ -281,8 +266,6 @@ TEST_F(Int64LoweringTest, CallI64Return) {
}
TEST_F(Int64LoweringTest, CallI64Parameter) {
- if (4 != kPointerSize) return;
-
int32_t function = 0x9999;
Signature<MachineRepresentation>::Builder sig_builder(zone(), 1, 3);
@@ -328,8 +311,6 @@ TEST_F(Int64LoweringTest, CallI64Parameter) {
// kExprI64And:
// kExprI64Ior:
TEST_F(Int64LoweringTest, Int64Ior) {
- if (4 != kPointerSize) return;
-
LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)),
Int64Constant(value(1))),
MachineRepresentation::kWord64);
@@ -343,8 +324,6 @@ TEST_F(Int64LoweringTest, Int64Ior) {
// kExprI64Xor:
TEST_F(Int64LoweringTest, Int64Xor) {
- if (4 != kPointerSize) return;
-
LowerGraph(graph()->NewNode(machine()->Word64Xor(), Int64Constant(value(0)),
Int64Constant(value(1))),
MachineRepresentation::kWord64);
@@ -357,8 +336,6 @@ TEST_F(Int64LoweringTest, Int64Xor) {
}
// kExprI64Shl:
TEST_F(Int64LoweringTest, Int64Shl) {
- if (4 != kPointerSize) return;
-
LowerGraph(graph()->NewNode(machine()->Word64Shl(), Int64Constant(value(0)),
Int64Constant(value(1))),
MachineRepresentation::kWord64);
@@ -377,8 +354,6 @@ TEST_F(Int64LoweringTest, Int64Shl) {
// kExprI64ShrS:
// kExprI64Eq:
TEST_F(Int64LoweringTest, Int64Eq) {
- if (4 != kPointerSize) return;
-
LowerGraph(graph()->NewNode(machine()->Word64Equal(), Int64Constant(value(0)),
Int64Constant(value(1))),
MachineRepresentation::kWord32);
@@ -396,24 +371,20 @@ TEST_F(Int64LoweringTest, Int64Eq) {
// kExprI64Ne:
// kExprI64LtS:
TEST_F(Int64LoweringTest, Int64LtS) {
- if (4 != kPointerSize) return;
TestComparison(machine()->Int64LessThan(), IsInt32LessThan, IsUint32LessThan);
}
// kExprI64LeS:
TEST_F(Int64LoweringTest, Int64LeS) {
- if (4 != kPointerSize) return;
TestComparison(machine()->Int64LessThanOrEqual(), IsInt32LessThan,
IsUint32LessThanOrEqual);
}
// kExprI64LtU:
TEST_F(Int64LoweringTest, Int64LtU) {
- if (4 != kPointerSize) return;
TestComparison(machine()->Uint64LessThan(), IsUint32LessThan,
IsUint32LessThan);
}
// kExprI64LeU:
TEST_F(Int64LoweringTest, Int64LeU) {
- if (4 != kPointerSize) return;
TestComparison(machine()->Uint64LessThanOrEqual(), IsUint32LessThan,
IsUint32LessThanOrEqual);
}
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698