mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
[AArch64] Fix clobber computation in A57LoadBalancing pass.
Extremely difficult to reproduce, so no test case included. PR21637 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a6b6744c0
commit
6b3c567613
@ -481,10 +481,16 @@ int AArch64A57FPLoadBalancing::scavengeRegister(Chain *G, Color C,
|
||||
RS.forward(I);
|
||||
AvailableRegs &= RS.getRegsAvailable(TRI->getRegClass(RegClassID));
|
||||
|
||||
// Remove any registers clobbered by a regmask.
|
||||
// Remove any registers clobbered by a regmask or any def register that is
|
||||
// immediately dead.
|
||||
for (auto J : I->operands()) {
|
||||
if (J.isRegMask())
|
||||
AvailableRegs.clearBitsNotInMask(J.getRegMask());
|
||||
|
||||
if (J.isReg() && J.isDef() && AvailableRegs[J.getReg()]) {
|
||||
assert(J.isDead() && "Non-dead def should have been removed by now!");
|
||||
AvailableRegs.reset(J.getReg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user