[RegisterCoalescer] Fix for assert in removePartialRedundancy
authorTim Renouf <tpr.llvm@botech.co.uk>
Thu, 23 Aug 2018 17:28:33 +0000 (17:28 +0000)
committerTim Renouf <tpr.llvm@botech.co.uk>
Thu, 23 Aug 2018 17:28:33 +0000 (17:28 +0000)
commit4be70ba94ab6d1b15441ff7c75f5844157557f3a
tree28519f3db9cf5cac18c63e7ad2d4d92699a45539
parent748310b193a9dac6bde656e43c94d12fab3ac501
[RegisterCoalescer] Fix for assert in removePartialRedundancy

Summary:
I got "Use not jointly dominated by defs" when removePartialRedundancy
attempted to prune then re-extend a subrange whose only liveness was a
dead def at the copy being removed.

V2: Removed junk from test. Improved comment.
V3: Addressed minor review comments.

Subscribers: MatzeB, qcolombet, nhaehnle, llvm-commits

Differential Revision: https://reviews.llvm.org/D50914

Change-Id: I6f894e9f517f71e921e0c6d81d28c5f344db8dad
llvm-svn: 340549
llvm/lib/CodeGen/RegisterCoalescer.cpp
llvm/test/CodeGen/AMDGPU/regcoalescing-remove-partial-redundancy-assert.mir [new file with mode: 0644]