mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Fix a recent regression in Applications/sgefa that Alkis pointed out to me.
The vector may actually be empty if the register that we are marking as recently used is not actually allocatable. This happens for physical registers that are not allocatable, like the ST(x) registers on X86. llvm-svn: 14195
This commit is contained in:
parent
19d2a396da
commit
1b8f37597d
@ -93,8 +93,8 @@ namespace {
|
||||
}
|
||||
|
||||
void MarkPhysRegRecentlyUsed(unsigned Reg) {
|
||||
assert(!PhysRegsUseOrder.empty() && "No registers used!");
|
||||
if (PhysRegsUseOrder.back() == Reg) return; // Already most recently used
|
||||
if(PhysRegsUseOrder.empty() ||
|
||||
PhysRegsUseOrder.back() == Reg) return; // Already most recently used
|
||||
|
||||
for (unsigned i = PhysRegsUseOrder.size(); i != 0; --i)
|
||||
if (areRegsEqual(Reg, PhysRegsUseOrder[i-1])) {
|
||||
|
Loading…
Reference in New Issue
Block a user