[llvm] r205186 - R600/SI: Return the correct index for VGPRs in getHWRegIndex()

Tom Stellard thomas.stellard at amd.com
Mon Mar 31 07:01:52 PDT 2014


Author: tstellar
Date: Mon Mar 31 09:01:52 2014
New Revision: 205186

URL: http://llvm.org/viewvc/llvm-project?rev=205186&view=rev
Log:
R600/SI: Return the correct index for VGPRs in getHWRegIndex()

The register index is stored in the low 8-bits of the encoding.

Modified:
    llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp

Modified: llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp?rev=205186&r1=205185&r2=205186&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIRegisterInfo.cpp Mon Mar 31 09:01:52 2014
@@ -56,7 +56,7 @@ const TargetRegisterClass * SIRegisterIn
 }
 
 unsigned SIRegisterInfo::getHWRegIndex(unsigned Reg) const {
-  return getEncodingValue(Reg);
+  return getEncodingValue(Reg) & 0xff;
 }
 
 const TargetRegisterClass *SIRegisterInfo::getPhysRegClass(unsigned Reg) const {





More information about the llvm-commits mailing list