Commit 6b8e0b33 authored by Leszek Swirski's avatar Leszek Swirski Committed by V8 LUCI CQ

[maglev] Fix unbalanced parallel move push

The parallel move optimizer tries to use the scratch register to store
cycle breaks, but needs to spill the value if the scratch register is
needed for stack->stack moves. Whether this spill happened is supposed
to be tracked with the scratch_has_cycle_start_ field, but the update of
this field was missing.

Bug: v8:7700
Change-Id: I2dc8d9186c9ec8ca03104fd3ae972a38924670ed
Fixed: chromium:1364783
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3899086
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarJakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83297}
parent b3e655d0
......@@ -286,6 +286,7 @@ class ParallelMoveResolver {
if (has_cycle) {
if (!scratch_has_cycle_start_) {
Pop(kScratchRegT);
scratch_has_cycle_start_ = true;
}
EmitMovesFromSource(kScratchRegT, targets);
scratch_has_cycle_start_ = false;
......@@ -366,6 +367,7 @@ class ParallelMoveResolver {
}
if (scratch_has_cycle_start_ && !targets.stack_slots.empty()) {
Push(kScratchRegT);
scratch_has_cycle_start_ = false;
}
for (uint32_t target_slot : targets.stack_slots) {
DCHECK_EQ(moves_from_stack_slot_.find(target_slot),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment