mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
[ARM] ARMLoadStoreOpt::UpdateBaseRegUses should stop on def
When UpdateBaseRegUses sees an instruction that defines the base register it must stop, as the base register value it is updating is no longer live. Ideally we would already have seen the register be killed (which is already checked for), but the kill flags may be inaccurate and we have to account for this. Differential Revision: http://reviews.llvm.org/D10566 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240424 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bd1e605b5c
commit
a99d1c85a8
@ -444,7 +444,7 @@ ARMLoadStoreOpt::UpdateBaseRegUses(MachineBasicBlock &MBB,
|
||||
return;
|
||||
}
|
||||
|
||||
if (MBBI->killsRegister(Base))
|
||||
if (MBBI->killsRegister(Base) || MBBI->definesRegister(Base))
|
||||
// Register got killed. Stop updating.
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user