Commit bbcb20a1 authored by Thibaud Michaud's avatar Thibaud Michaud Committed by Commit Bot

[regalloc] Fix merging a bundle with itself

When merging a bundle with itself, we should consider the merge a
success even though we do not merge anything. The result is used to
determine whether the backward spilling heuristic might introduce a
stack to stack move. For this purpose, it only matters whether the phi
and its input end up in the same bundle.

R=sigurds@chromium.org

Bug: chromium:1158088
Change-Id: Icdcfe81d58bce5916b87a34a46c9611f5978bf27
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2625876Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72066}
parent 458f7ad0
......@@ -2650,7 +2650,7 @@ bool LiveRangeBundle::TryAddRange(LiveRange* range) {
LiveRangeBundle* LiveRangeBundle::TryMerge(LiveRangeBundle* lhs,
LiveRangeBundle* rhs,
bool trace_alloc) {
if (rhs == lhs) return nullptr;
if (rhs == lhs) return lhs;
auto iter1 = lhs->uses_.begin();
auto iter2 = rhs->uses_.begin();
......
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