Page MenuHomePhabricator

[RegisterCoalescer] Do not eliminateUndefCopy for a partial copy
Needs ReviewPublic

Authored by tpr on Aug 25 2018, 8:45 AM.

Details

Summary

eliminateUndefCopy was incorrectly eliminating a copy that was only a
partial write of the target. In the test case, the resulting incorrect
live range caused a subrange join unreachable later.

The test case does not fail for me until I have D49097.

Change-Id: Ibb767d8a016934431660764b0194634e2113fea2

Diff Detail

Event Timeline

tpr created this revision.Aug 25 2018, 8:45 AM
tpr added a subscriber: dstuttard.
arsenm added a subscriber: arsenm.Nov 5 2018, 4:26 PM
arsenm added inline comments.
test/CodeGen/AMDGPU/coalescing-subreg-removed-undef-copy.mir
45–48

You should be able to reduce this to a handful of instructions

arsenm added inline comments.Nov 5 2018, 4:31 PM
lib/CodeGen/RegisterCoalescer.cpp
1500–1502

I would also expect this to be OK if DstSubIdx == SrcSubIdx?