mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-13 08:35:46 +00:00
Dead live-in detection bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6214693a4
commit
7b466d0481
@ -938,11 +938,11 @@ bool LiveIntervals::JoinCopy(MachineInstr *CopyMI,
|
|||||||
if (JoinIntervals(DestInt, SrcInt)) {
|
if (JoinIntervals(DestInt, SrcInt)) {
|
||||||
if (isDead) {
|
if (isDead) {
|
||||||
// Result of the copy is dead. Propagate this property.
|
// Result of the copy is dead. Propagate this property.
|
||||||
if (SrcStart == 0 && MRegisterInfo::isPhysicalRegister(SrcReg)) {
|
if (SrcStart == 0 && MRegisterInfo::isPhysicalRegister(repSrcReg)) {
|
||||||
// Live-in to the function but dead. Remove it from MBB live-in set.
|
// Live-in to the function but dead. Remove it from MBB live-in set.
|
||||||
// JoinIntervals may end up swapping the two intervals.
|
// JoinIntervals may end up swapping the two intervals.
|
||||||
MachineBasicBlock *MBB = CopyMI->getParent();
|
MachineBasicBlock *MBB = CopyMI->getParent();
|
||||||
MBB->removeLiveIn(SrcReg);
|
MBB->removeLiveIn(repSrcReg);
|
||||||
} else {
|
} else {
|
||||||
MachineInstr *SrcMI = getInstructionFromIndex(SrcStart);
|
MachineInstr *SrcMI = getInstructionFromIndex(SrcStart);
|
||||||
if (SrcMI) {
|
if (SrcMI) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user