mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Also add <def,undef> flags when coalescing sub-registers.
RegisterCoalescer can create sub-register defs when it is joining a register with a sub-register. Add <undef> flags to these new sub-register defs where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -967,6 +967,14 @@ RegisterCoalescer::UpdateRegDefsUses(const CoalescerPair &CP) {
|
|||||||
Kills |= MO.isKill();
|
Kills |= MO.isKill();
|
||||||
Deads |= MO.isDead();
|
Deads |= MO.isDead();
|
||||||
|
|
||||||
|
// Make sure we don't create read-modify-write defs accidentally. We
|
||||||
|
// assume here that a SrcReg def cannot be joined into a live DstReg. If
|
||||||
|
// RegisterCoalescer starts tracking partially live registers, we will
|
||||||
|
// need to check the actual LiveInterval to determine if DstReg is live
|
||||||
|
// here.
|
||||||
|
if (SubIdx && !Reads)
|
||||||
|
MO.setIsUndef();
|
||||||
|
|
||||||
if (DstIsPhys)
|
if (DstIsPhys)
|
||||||
MO.substPhysReg(DstReg, *TRI);
|
MO.substPhysReg(DstReg, *TRI);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user