mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-05 13:16:32 +00:00
Fix a -join-globalcopies bug; handle undef operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2072,6 +2072,9 @@ static bool isLocalCopy(MachineInstr *Copy, const LiveIntervals *LIS) {
|
|||||||
if (!Copy->isCopy())
|
if (!Copy->isCopy())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (Copy->getOperand(1).isUndef())
|
||||||
|
return false;
|
||||||
|
|
||||||
unsigned SrcReg = Copy->getOperand(1).getReg();
|
unsigned SrcReg = Copy->getOperand(1).getReg();
|
||||||
unsigned DstReg = Copy->getOperand(0).getReg();
|
unsigned DstReg = Copy->getOperand(0).getReg();
|
||||||
if (TargetRegisterInfo::isPhysicalRegister(SrcReg)
|
if (TargetRegisterInfo::isPhysicalRegister(SrcReg)
|
||||||
|
|||||||
Reference in New Issue
Block a user