From 9021825d1e73998b99c81e89c73796f6f2845471 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 15 Apr 2015 11:56:51 +0100 Subject: Type MoveOperands. The ParallelMoveResolver implementation needs to know if a move is for 64bits or not, to handle swaps correctly. Bug found, and test case courtesy of Serguei I. Katkov. Change-Id: I9a0917a1cfed398c07e57ad6251aea8c9b0b8506 --- compiler/optimizing/parallel_move_resolver.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/parallel_move_resolver.cc') diff --git a/compiler/optimizing/parallel_move_resolver.cc b/compiler/optimizing/parallel_move_resolver.cc index 4936685367..0c7f0da611 100644 --- a/compiler/optimizing/parallel_move_resolver.cc +++ b/compiler/optimizing/parallel_move_resolver.cc @@ -189,9 +189,9 @@ MoveOperands* ParallelMoveResolver::PerformMove(size_t index) { const MoveOperands& other_move = *moves_.Get(i); if (other_move.Blocks(destination)) { DCHECK(other_move.IsPending()); - if (!destination.IsPair() && other_move.GetSource().IsPair()) { - // We swap pairs before swapping non-pairs. Go back from the - // cycle by returning the pair that must be swapped. + if (!move->Is64BitMove() && other_move.Is64BitMove()) { + // We swap 64bits moves before swapping 32bits moves. Go back from the + // cycle by returning the move that must be swapped. return moves_.Get(i); } do_swap = true; @@ -216,7 +216,7 @@ MoveOperands* ParallelMoveResolver::PerformMove(size_t index) { UpdateSourceOf(moves_.Get(i), swap_destination, source); } } - // If the swap was required because of a pair in the middle of a cycle, + // If the swap was required because of a 64bits move in the middle of a cycle, // we return the swapped move, so that the caller knows it needs to re-iterate // its dependency loop. return required_swap; -- cgit v1.2.3-59-g8ed1b