diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-22 20:30:53 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-22 20:30:53 +0000 |
commit | bcfa1ca9768a0ff0e4c2935832287d7bb9921cec (patch) | |
tree | a7d33b8072fcc2d2144e6c5c6acb41d24ee6beae /lib/CodeGen/RegAllocLocal.cpp | |
parent | 9af7090392efa7bf1b7eae274b9231518af8303b (diff) | |
download | external_llvm-bcfa1ca9768a0ff0e4c2935832287d7bb9921cec.zip external_llvm-bcfa1ca9768a0ff0e4c2935832287d7bb9921cec.tar.gz external_llvm-bcfa1ca9768a0ff0e4c2935832287d7bb9921cec.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLocal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 8f1cce6..99fc6c9 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/lib/CodeGen/RegAllocLocal.cpp @@ -368,7 +368,7 @@ bool RALocal::isPhysRegAvailable(unsigned PhysReg) const { // not free! for (const unsigned *AliasSet = TRI->getAliasSet(PhysReg); *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 true; } |