mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-06 09:44:39 +00:00
Do not attempt copy coalescing if the source and dest sub-register indices do not match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103679 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3519f9d7d1
commit
de7dea2e44
@ -846,7 +846,8 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
unsigned SrcCopyReg, DstCopyReg, SrcCopySubReg, DstCopySubReg;
|
||||
unsigned SrcCopyPhysReg = 0U;
|
||||
bool isCopy = TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg,
|
||||
SrcCopySubReg, DstCopySubReg);
|
||||
SrcCopySubReg, DstCopySubReg) &&
|
||||
SrcCopySubReg == DstCopySubReg;
|
||||
if (isCopy && TargetRegisterInfo::isVirtualRegister(SrcCopyReg))
|
||||
SrcCopyPhysReg = getVirt2PhysRegMapSlot(SrcCopyReg);
|
||||
|
||||
@ -1154,7 +1155,8 @@ void RALocal::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
// the register scavenger. See pr4100.)
|
||||
if (TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg,
|
||||
SrcCopySubReg, DstCopySubReg) &&
|
||||
SrcCopyReg == DstCopyReg && DeadDefs.empty())
|
||||
SrcCopyReg == DstCopyReg && SrcCopySubReg == DstCopySubReg &&
|
||||
DeadDefs.empty())
|
||||
MBB.erase(MI);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user