This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Make sure all super regs of reserved regs are marked reserved.
ClosedPublic

Authored by gberry on Jan 23 2018, 3:12 PM.

Details

Summary

Move reserveRegisterTuples into AMDGPURegisterInfo and use it in
R600RegisterInfo::getReservedRegs and
R600InstrInfo::reserveIndirectRegisters to ensure that all super
registers of reserved registers are also marked as reserved.

Before this change, under certain circumstances, the registers %t1_x and
%t1_xyzw would be marked as reserved, but %t1_xy and %t1_xyz would not
be, leading to the register allocator sometimes assigning a register to
%t1_xy, which is invalid since %t1_x is reserved.

Diff Detail

Repository
rL LLVM

Event Timeline

gberry created this revision.Jan 23 2018, 3:12 PM
arsenm accepted this revision.Jan 23 2018, 3:20 PM

LGTM

lib/Target/AMDGPU/R600RegisterInfo.cpp
34–47 ↗(On Diff #131157)

I don't think any of these have super registers but it doesn't really matter

This revision is now accepted and ready to land.Jan 23 2018, 3:20 PM
This revision was automatically updated to reflect the committed changes.