| 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 5b956f077a9657821f21b2aa5e1614ae249f8781..2452d19914da05f0c5eaf82ad28dc0373a24709d 100644
|
| --- a/test/unittests/compiler/move-optimizer-unittest.cc
|
| +++ b/test/unittests/compiler/move-optimizer-unittest.cc
|
| @@ -12,11 +12,7 @@ namespace compiler {
|
| class MoveOptimizerTest : public InstructionSequenceTest {
|
| public:
|
| GapInstruction* LastGap() {
|
| - auto instruction = sequence()->instructions().back();
|
| - if (!instruction->IsGapMoves()) {
|
| - instruction = *(sequence()->instructions().rbegin() + 1);
|
| - }
|
| - return GapInstruction::cast(instruction);
|
| + return GapInstruction::cast(*(sequence()->instructions().rbegin() + 1));
|
| }
|
|
|
| void AddMove(GapInstruction* gap, TestOperand from, TestOperand to,
|
| @@ -90,10 +86,10 @@ class MoveOptimizerTest : public InstructionSequenceTest {
|
|
|
| TEST_F(MoveOptimizerTest, RemovesRedundant) {
|
| StartBlock();
|
| + EmitNop();
|
| AddMove(LastGap(), Reg(0), Reg(1));
|
| EmitNop();
|
| AddMove(LastGap(), Reg(1), Reg(0));
|
| - EmitNop();
|
| EndBlock(Last());
|
|
|
| Optimize();
|
|
|