[RegisterCoalscer] Manually remove leftover segments when commuting def
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 21 Aug 2018 19:01:26 +0000 (19:01 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Tue, 21 Aug 2018 19:01:26 +0000 (19:01 +0000)
commitb211434a78d43823307e1c9a44af480f246c3f0c
treefe762391bccc6f3234da98b5dd4da792981a2118
parentd66dde5a9843eb33af18f0ee4990a185f3f6ed69
[RegisterCoalscer] Manually remove leftover segments when commuting def

In removeCopyByCommutingDef, segments from the source live range are
copied into (and merged with) the segments of the target live range.
This is performed for all subranges of the source interval. It can
happen that there will be subranges of the target interval that had
no corresponding subranges in the source interval, and in such cases
these subrages will not be updated. Since the copy being coalesced
is about to be removed, these ranges need to be updated by removing
the segments that are started by the copy.

llvm-svn: 340318
llvm/lib/CodeGen/RegisterCoalescer.cpp
llvm/test/CodeGen/SystemZ/subregliveness-07.mir [new file with mode: 0644]