mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Don't hoist instructions that define a physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb34cd7b5e
commit
fb018d0433
@ -273,7 +273,14 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
|
||||
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = I.getOperand(i);
|
||||
|
||||
if (!MO.isRegister() || !MO.isUse())
|
||||
if (!MO.isRegister())
|
||||
continue;
|
||||
|
||||
if (MO.isDef() && TargetRegisterInfo::isPhysicalRegister(MO.getReg()))
|
||||
// Don't hoist an instruction that defines a physical register.
|
||||
return false;
|
||||
|
||||
if (!MO.isUse())
|
||||
continue;
|
||||
|
||||
unsigned Reg = MO.getReg();
|
||||
|
Loading…
x
Reference in New Issue
Block a user