R600/SI: Mark EXEC_LO and EXEC_HI as reserved
authorTom Stellard <thomas.stellard@amd.com>
Wed, 24 Sep 2014 01:33:23 +0000 (01:33 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Wed, 24 Sep 2014 01:33:23 +0000 (01:33 +0000)
These registers can be allocated and used like other 32-bit registers,
but it seems like a likely source for bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218350 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIRegisterInfo.cpp

index e443deb7ea95f3cd8a5be5084a64a11b918484e8..f5307f880385637be963e4432bd12bb8f1dac2e0 100644 (file)
@@ -32,6 +32,12 @@ SIRegisterInfo::SIRegisterInfo(const AMDGPUSubtarget &st)
 BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
   BitVector Reserved(getNumRegs());
   Reserved.set(AMDGPU::EXEC);
+
+  // EXEC_LO and EXEC_HI could be allocated and used as regular register,
+  // but this seems likely to result in bugs, so I'm marking them as reserved.
+  Reserved.set(AMDGPU::EXEC_LO);
+  Reserved.set(AMDGPU::EXEC_HI);
+
   Reserved.set(AMDGPU::INDIRECT_BASE_ADDR);
   Reserved.set(AMDGPU::FLAT_SCR);