mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-26 18:20:39 +00:00
Fix an obvious bug, noticed by inspection. No current targets trigger this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -103,9 +103,9 @@ bool PNE::EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB) {
|
|||||||
/// use of the specified register.
|
/// use of the specified register.
|
||||||
static bool InstructionUsesRegister(MachineInstr *MI, unsigned SrcReg) {
|
static bool InstructionUsesRegister(MachineInstr *MI, unsigned SrcReg) {
|
||||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i)
|
||||||
if (MI->getOperand(0).isRegister() &&
|
if (MI->getOperand(i).isRegister() &&
|
||||||
MI->getOperand(0).getReg() == SrcReg &&
|
MI->getOperand(i).getReg() == SrcReg &&
|
||||||
MI->getOperand(0).isUse())
|
MI->getOperand(i).isUse())
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user