Index: src/compiler/register-allocator.cc |
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc |
index c65b906bbc6eab87045bd1af0c1e6047864bd0cd..23a7df6e9c0b839654a85aab18e455466e555c85 100644 |
--- a/src/compiler/register-allocator.cc |
+++ b/src/compiler/register-allocator.cc |
@@ -1525,7 +1525,13 @@ void RegisterAllocator::BuildLiveRanges() { |
for (UsePosition* pos = range->first_pos(); pos != NULL; |
pos = pos->next_) { |
pos->register_beneficial_ = true; |
- pos->requires_reg_ = true; |
+ // TODO(dcarney): should the else case assert requires_reg_ == false? |
+ // Can't mark phis as needing a register. |
+ if (!code() |
+ ->InstructionAt(pos->pos().InstructionIndex()) |
+ ->IsGapMoves()) { |
+ pos->requires_reg_ = true; |
+ } |
} |
} |
} |