[PATCH] D49097: [RegisterCoalescer] Another fix for subrange join unreachable

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 25 08:54:22 PDT 2018


tpr updated this revision to Diff 162551.
tpr added a comment.
Herald added a subscriber: jvesely.

With this version, I have gone back to the fix recommended by Krzysztof,
and updated the commit message:

[RegisterCoalescer] Extend subranges to uses after join

Summary:
The test shows a case where a full use is not in a subrange because the
subreg is undefined at the use point, but, after a coalesce, the
subrange incorrectly still does not include the use even though the
subreg is now defined at that point. The incorrect live range causes a
"subrange join unreachable" assert on a later coalesce.

This commit ensures that a subrange is extended to all uses that can be
reached from a definition.

V2: Completely different fix, instead of working round the problem in
the later coalesce that actually asserted.
V5: Fixed to not extend liveness to an undef use. Spun second test out
into its own https://reviews.llvm.org/D51257 as it is a completely different problem with the
same "subrange join unreachable" symptom.


Repository:
  rL LLVM

https://reviews.llvm.org/D49097

Files:
  lib/CodeGen/RegisterCoalescer.cpp
  test/CodeGen/AMDGPU/coalescing-subreg-was-undef-but-became-def.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49097.162551.patch
Type: text/x-patch
Size: 6036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180825/22e8061a/attachment.bin>


More information about the llvm-commits mailing list