AMDGPU: Fix incorrectly deleting copies after spilling SGPR tuples
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 28 Aug 2020 18:58:33 +0000 (14:58 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 28 Aug 2020 21:50:37 +0000 (17:50 -0400)
commit9145d75226a071c530d14e051008e4c32e87cf5e
tree870aa0a5800e084e115f4dff5ceb90ae6b4f130f
parent7128e647063dd858901aa7a5d90be8744c673866
AMDGPU: Fix incorrectly deleting copies after spilling SGPR tuples

The implicit def of the super register would appear to kill any live
uses of components before the spill, and would be deleted by
MachineCopyPropagation. We need to add implicit uses of the super
register, similarly to what copyPhysReg does. VGPR tuples appear to be
correctly handled already. I need to double check the SGPR->memory
path.
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/test/CodeGen/AMDGPU/spill-reg-tuple-super-reg-use.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/spill192.mir