1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Really really bad local register allocator bug. On X86, it was never using ESI, EDI, and EBP because of a bug in RALocal::isPhysRegAvailable(). For example, when

it checks if ESI is available, it then looks at registers aliases to ESI. SIL is marked -2 (not allocatable) but isPhysRegAvailable() incorrectly assumes it is in use and returns false for ESI.

llvm-svn: 47499
This commit is contained in:
Evan Cheng 2008-02-22 20:30:53 +00:00
parent e24db258fe
commit b8e7eb2b1b

View File

@ -368,7 +368,7 @@ bool RALocal::isPhysRegAvailable(unsigned PhysReg) const {
// not free! // not free!
for (const unsigned *AliasSet = TRI->getAliasSet(PhysReg); for (const unsigned *AliasSet = TRI->getAliasSet(PhysReg);
*AliasSet; ++AliasSet) *AliasSet; ++AliasSet)
if (PhysRegsUsed[*AliasSet] != -1) // Aliased register in use? if (PhysRegsUsed[*AliasSet] >= 0) // Aliased register in use?
return false; // Can't use this reg then. return false; // Can't use this reg then.
return true; return true;
} }