summaryrefslogtreecommitdiff
path: root/compiler/optimizing/parallel_move_test.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-09-29 10:33:25 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-09-29 11:04:07 +0100
commit740475d5f45b8caa2c3c6fc51e657ecf4f3547e5 (patch)
tree81196b753045fa16c13a4c1106031c1f28d9d233 /compiler/optimizing/parallel_move_test.cc
parent13c4e8f4ef687f650aa76fb15ab12762d5a85602 (diff)
Fix a bug in the insertion of parallel move.
To make sure we do not connect interval siblings in the same parallel move, I added a new field in MoveOperands that tells for which instruction this move is for. A parallel move should not contains moves for the same instructions. The checks revealed a bug when connecting siblings, where we would choose the wrong parallel move. Change-Id: I70f27ec120886745c187071453c78da4c47c1dd2
Diffstat (limited to 'compiler/optimizing/parallel_move_test.cc')
-rw-r--r--compiler/optimizing/parallel_move_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/optimizing/parallel_move_test.cc b/compiler/optimizing/parallel_move_test.cc
index 093856d497..863e107ee6 100644
--- a/compiler/optimizing/parallel_move_test.cc
+++ b/compiler/optimizing/parallel_move_test.cc
@@ -71,7 +71,8 @@ static HParallelMove* BuildParallelMove(ArenaAllocator* allocator,
for (size_t i = 0; i < number_of_moves; ++i) {
moves->AddMove(new (allocator) MoveOperands(
Location::RegisterLocation(ManagedRegister(operands[i][0])),
- Location::RegisterLocation(ManagedRegister(operands[i][1]))));
+ Location::RegisterLocation(ManagedRegister(operands[i][1])),
+ nullptr));
}
return moves;
}