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

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

Issue 815743002: Revert of [turbofan] simplify gap ordering (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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-selector-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 2452d19914da05f0c5eaf82ad28dc0373a24709d..5b956f077a9657821f21b2aa5e1614ae249f8781 100644
--- a/test/unittests/compiler/move-optimizer-unittest.cc
+++ b/test/unittests/compiler/move-optimizer-unittest.cc
@@ -12,7 +12,11 @@
class MoveOptimizerTest : public InstructionSequenceTest {
public:
GapInstruction* LastGap() {
- return GapInstruction::cast(*(sequence()->instructions().rbegin() + 1));
+ auto instruction = sequence()->instructions().back();
+ if (!instruction->IsGapMoves()) {
+ instruction = *(sequence()->instructions().rbegin() + 1);
+ }
+ return GapInstruction::cast(instruction);
}
void AddMove(GapInstruction* gap, TestOperand from, TestOperand to,
@@ -86,10 +90,10 @@
TEST_F(MoveOptimizerTest, RemovesRedundant) {
StartBlock();
- EmitNop();
AddMove(LastGap(), Reg(0), Reg(1));
EmitNop();
AddMove(LastGap(), Reg(1), Reg(0));
+ EmitNop();
EndBlock(Last());
Optimize();
« no previous file with comments | « test/unittests/compiler/instruction-selector-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698