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)
commitc1e029e93da007649285aea470d7f5b9acc4f753
treee7ccd7416d213b50d97f151c6c6691086e54336d
parentec50fa6f8ce81485d8a34871f6625f0af7ab0c09
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.

llvm-svn: 238785
llvm/include/llvm/CodeGen/LiveRangeEdit.h
llvm/lib/CodeGen/LiveRangeEdit.cpp
llvm/test/CodeGen/R600/subreg-eliminate-dead.ll [new file with mode: 0644]