OSDN Git Service

Fix bug in RegScavenger::scavengeRegister().
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 15 Jul 2009 22:32:11 +0000 (22:32 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 15 Jul 2009 22:32:11 +0000 (22:32 +0000)
commit72fbc3d9d260e061bdee07059fcd63772c714091
tree89e3b4c2f3bdd4539693d636b5318ff926153f5c
parent0d7c695c74ae6d5f68cc07378c17491915e607d3
Fix bug in RegScavenger::scavengeRegister().

Reserved registers are not candidates for scavenging, and they were removed
from the candidate list like this:

CreateRegClassMask(RC, Candidates);
Candidates ^= ReservedRegs;

However, when there are reserved registers outside RC, this causes invalid
bits to be set in Candidates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75847 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegisterScavenging.cpp