forked from OSchip/llvm-project
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
3b9474ecd7
commit
6f4a596234
|
@ -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