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

Unified Diff: test/unittests/compiler/move-optimizer-unittest.cc

Issue 1116923002: [test] make instruction sequence test emit cfgs more like the scheduler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/unittests/compiler/instruction-sequence-unittest.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/move-optimizer-unittest.cc
diff --git a/test/unittests/compiler/move-optimizer-unittest.cc b/test/unittests/compiler/move-optimizer-unittest.cc
index 975706abbb0bb0e5a84d671758ce19950a71e441..fb2b6ad45739ac76ce1c3e685530243a080d1479 100644
--- a/test/unittests/compiler/move-optimizer-unittest.cc
+++ b/test/unittests/compiler/move-optimizer-unittest.cc
@@ -136,9 +136,11 @@ TEST_F(MoveOptimizerTest, SimpleMerge) {
StartBlock();
EndBlock(Last());
+ auto last = LastInstruction();
+
Optimize();
- auto move = LastInstruction()->parallel_moves()[0];
+ auto move = last->parallel_moves()[0];
CHECK_EQ(1, NonRedundantSize(move));
CHECK(Contains(move, Reg(0), Reg(1)));
}
@@ -163,11 +165,13 @@ TEST_F(MoveOptimizerTest, SimpleMergeCycle) {
StartBlock();
EndBlock(Last());
+ auto last = LastInstruction();
+
Optimize();
CHECK(gap_0->AreMovesRedundant());
CHECK(gap_1->AreMovesRedundant());
- auto move = LastInstruction()->parallel_moves()[0];
+ auto move = last->parallel_moves()[0];
CHECK_EQ(2, NonRedundantSize(move));
CHECK(Contains(move, Reg(0), Reg(1)));
CHECK(Contains(move, Reg(1), Reg(0)));
« no previous file with comments | « test/unittests/compiler/instruction-sequence-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698