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

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

Issue 1403373016: Fix debug mode test failures on MIPS and PPC after f1aa5562. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « test/cctest/compiler/test-gap-resolver.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 c7c92a0321baa1c75ff383826706bb84f26da8ef..9a31d2f770753d3bc17f318431cfb2b09df83b05 100644
--- a/test/unittests/compiler/move-optimizer-unittest.cc
+++ b/test/unittests/compiler/move-optimizer-unittest.cc
@@ -104,11 +104,18 @@ TEST_F(MoveOptimizerTest, RemovesRedundant) {
TEST_F(MoveOptimizerTest, RemovesRedundantExplicit) {
+ int first_reg_index =
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN)
+ ->GetAllocatableGeneralCode(0);
+ int second_reg_index =
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN)
+ ->GetAllocatableGeneralCode(1);
+
StartBlock();
auto first_instr = EmitNop();
- AddMove(first_instr, Reg(0), ExplicitReg(1));
+ AddMove(first_instr, Reg(first_reg_index), ExplicitReg(second_reg_index));
auto last_instr = EmitNop();
- AddMove(last_instr, Reg(1), Reg(0));
+ AddMove(last_instr, Reg(second_reg_index), Reg(first_reg_index));
EndBlock(Last());
Optimize();
@@ -116,7 +123,7 @@ TEST_F(MoveOptimizerTest, RemovesRedundantExplicit) {
CHECK_EQ(0, NonRedundantSize(first_instr->parallel_moves()[0]));
auto move = last_instr->parallel_moves()[0];
CHECK_EQ(1, NonRedundantSize(move));
- CHECK(Contains(move, Reg(0), ExplicitReg(1)));
+ CHECK(Contains(move, Reg(first_reg_index), ExplicitReg(second_reg_index)));
}
« no previous file with comments | « test/cctest/compiler/test-gap-resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698