| Index: test/cctest/compiler/test-jump-threading.cc
|
| diff --git a/test/cctest/compiler/test-jump-threading.cc b/test/cctest/compiler/test-jump-threading.cc
|
| index b2d3008aa9322ef48498bc256df6fef5520a72f4..300da3338efe8a08cc544b1cbc82f5e3f10815ef 100644
|
| --- a/test/cctest/compiler/test-jump-threading.cc
|
| +++ b/test/cctest/compiler/test-jump-threading.cc
|
| @@ -58,16 +58,16 @@ class TestCode : public HandleAndZoneScope {
|
| void RedundantMoves() {
|
| Start();
|
| sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop));
|
| - int index = static_cast<int>(sequence_.instructions().size()) - 2;
|
| - sequence_.AddGapMove(index, RegisterOperand::New(13, main_zone()),
|
| - RegisterOperand::New(13, main_zone()));
|
| + int index = static_cast<int>(sequence_.instructions().size()) - 1;
|
| + AddGapMove(index, RegisterOperand::New(13, main_zone()),
|
| + RegisterOperand::New(13, main_zone()));
|
| }
|
| void NonRedundantMoves() {
|
| Start();
|
| sequence_.AddInstruction(Instruction::New(main_zone(), kArchNop));
|
| - int index = static_cast<int>(sequence_.instructions().size()) - 2;
|
| - sequence_.AddGapMove(index, ImmediateOperand::New(11, main_zone()),
|
| - RegisterOperand::New(11, main_zone()));
|
| + int index = static_cast<int>(sequence_.instructions().size()) - 1;
|
| + AddGapMove(index, ImmediateOperand::New(11, main_zone()),
|
| + RegisterOperand::New(11, main_zone()));
|
| }
|
| void Other() {
|
| Start();
|
| @@ -96,6 +96,11 @@ class TestCode : public HandleAndZoneScope {
|
| CHECK(current_ == NULL);
|
| Start(true);
|
| }
|
| + void AddGapMove(int index, InstructionOperand* from, InstructionOperand* to) {
|
| + sequence_.InstructionAt(index)
|
| + ->GetOrCreateParallelMove(Instruction::START, main_zone())
|
| + ->AddMove(from, to, main_zone());
|
| + }
|
| };
|
|
|
|
|
|
|