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

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 2428443002: [wasm] Trim graph before scheduling. (Closed)
Patch Set: Also make the high word projection optional. Created 4 years, 2 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
Index: test/cctest/compiler/test-run-machops.cc
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index 50b46d7d0e288424e10ab97155590f346b6a4bf6..8d1d4c33e7661426142bafdec6b4f20981eb7ed0 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -4161,6 +4161,27 @@ TEST(RunInt32PairAdd) {
}
}
+TEST(RunInt32PairAddUseOnlyHighWord) {
titzer 2016/10/19 09:20:42 Can you add tests for all the Int32Pair* operation
ahaas 2016/10/19 09:59:19 Done.
+ BufferedRawMachineAssemblerTester<int32_t> m(
+ MachineType::Uint32(), MachineType::Uint32(), MachineType::Uint32(),
+ MachineType::Uint32());
+
+ Node* PairAdd = m.Int32PairAdd(m.Parameter(0), m.Parameter(1), m.Parameter(2),
+ m.Parameter(3));
+
+ m.Return(m.Projection(1, PairAdd));
+
+ FOR_UINT64_INPUTS(i) {
+ FOR_UINT64_INPUTS(j) {
+ CHECK_EQ(static_cast<uint32_t>((*i + *j) >> 32),
+ m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+ static_cast<uint32_t>(*i >> 32),
+ static_cast<uint32_t>(*j & 0xffffffff),
+ static_cast<uint32_t>(*j >> 32)));
+ }
+ }
+}
+
void TestInt32PairAddWithSharedInput(int a, int b, int c, int d) {
BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Uint32(),
MachineType::Uint32());

Powered by Google App Engine
This is Rietveld 408576698