This is an archive of the discontinued LLVM Phabricator instance.

[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?

foad added a subscriber: foad.May 20 2020, 6:44 AM

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

Now that I've abandoned D49097 what should we do with this one? Shall I commit the verbose test case as-is and abandon this one too?

Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2020, 6:44 AM
Herald added a subscriber: kerbowa. · View Herald Transcript