mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-07 11:33:44 +00:00
When opcodes like ADD were split into reg. and immed. versions (ADDi and ADDr),
this code wasn't fixed correctly so it missed copy operations that used ADDi. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
472c3046fe
commit
d248652b8b
@ -63,7 +63,8 @@ static bool IsUselessCopy(const TargetMachine &target, const MachineInstr* MI) {
|
||||
return (/* both operands are allocated to the same register */
|
||||
MI->getOperand(0).getAllocatedRegNum() ==
|
||||
MI->getOperand(1).getAllocatedRegNum());
|
||||
} else if (MI->getOpCode() == V9::ADDr || MI->getOpCode() == V9::ORr) {
|
||||
} else if (MI->getOpCode() == V9::ADDr || MI->getOpCode() == V9::ORr ||
|
||||
MI->getOpCode() == V9::ADDi || MI->getOpCode() == V9::ORi) {
|
||||
unsigned srcWithDestReg;
|
||||
|
||||
for (srcWithDestReg = 0; srcWithDestReg < 2; ++srcWithDestReg)
|
||||
|
Loading…
Reference in New Issue
Block a user