Skip to content

Commit

Permalink
R600/SI: Return the correct index for VGPRs in getHWRegIndex()
Browse files Browse the repository at this point in the history
The register index is stored in the low 8-bits of the encoding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205186 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
tstellarAMD committed Mar 31, 2014
1 parent 077aa54 commit 1eaaa94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Target/R600/SIRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const TargetRegisterClass * SIRegisterInfo::getCFGStructurizerRegClass(
}

unsigned SIRegisterInfo::getHWRegIndex(unsigned Reg) const {
return getEncodingValue(Reg);
return getEncodingValue(Reg) & 0xff;
}

const TargetRegisterClass *SIRegisterInfo::getPhysRegClass(unsigned Reg) const {
Expand Down

0 comments on commit 1eaaa94

Please sign in to comment.