mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
It's not safe eliminate copies where src and dst have different sub-register indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -583,7 +583,8 @@ void RAFast::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
unsigned SrcCopyPhysReg = 0U;
|
||||
bool isCopy = TII->isMoveInstr(*MI, SrcCopyReg, DstCopyReg,
|
||||
SrcCopySubReg, DstCopySubReg);
|
||||
if (isCopy && TargetRegisterInfo::isVirtualRegister(SrcCopyReg))
|
||||
if (isCopy && SrcCopySubReg == 0 && DstCopySubReg == 0 &&
|
||||
TargetRegisterInfo::isVirtualRegister(SrcCopyReg))
|
||||
SrcCopyPhysReg = getVirt2PhysRegMapSlot(SrcCopyReg);
|
||||
|
||||
// Loop over the implicit uses, making sure they don't get reallocated.
|
||||
|
Reference in New Issue
Block a user