mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-27 02:31:09 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14195 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
59108d3d40
commit
aebcce8404
@ -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…
x
Reference in New Issue
Block a user