LiveRangeEdit: Fix liveranges not shrinking on subrange kill.
authorMatthias Braun <matze@braunis.de>
Mon, 1 Jun 2015 21:26:26 +0000 (21:26 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 1 Jun 2015 21:26:26 +0000 (21:26 +0000)
commitfa2b7e5cb4043082b4f5c0d5268803e8af39d007
treeefd9de7294ad63d3ac053271b75a057baa5570d7
parenta3698105ebfd1e1d4b580a51419729c8e96ec934
LiveRangeEdit: Fix liveranges not shrinking on subrange kill.

If a dead instruction we may not only have a last-use in the main live
range but also in a subregister range if subregisters are tracked. We
need to partially rebuild live ranges in both cases.

The testcase only broke when subregister liveness was enabled. I
commited it in the current form because there is currently no flag to
enable/disable subregister liveness.

This fixes PR23720.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238785 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/LiveRangeEdit.h
lib/CodeGen/LiveRangeEdit.cpp
test/CodeGen/R600/subreg-eliminate-dead.ll [new file with mode: 0644]