mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
If there is a def of a super-register followed by a use of a sub-register, do *not* add an implicit def of the sub-register. e.g.
EAX = ..., AX<imp-def> ... = AX This creates a double-def. Apparently this used to be necessary but is no longer needed. Thanks to Anton for pointing this out. Anton, I cannot create a test case without your uncommitted ARM patches. Please check in a test case for me. llvm-svn: 72755
This commit is contained in:
parent
9408fc6842
commit
085beccfb5
@ -242,20 +242,6 @@ void LiveVariables::HandlePhysRegUse(unsigned Reg, MachineInstr *MI) {
|
||||
}
|
||||
}
|
||||
|
||||
// There was an earlier def of a super-register. Add implicit def to that MI.
|
||||
//
|
||||
// A: EAX = ...
|
||||
// B: ... = AX
|
||||
//
|
||||
// Add implicit def to A if there isn't a use of AX (or EAX) before B.
|
||||
if (!PhysRegUse[Reg]) {
|
||||
MachineInstr *Def = PhysRegDef[Reg];
|
||||
if (Def && !Def->modifiesRegister(Reg))
|
||||
Def->addOperand(MachineOperand::CreateReg(Reg,
|
||||
true /*IsDef*/,
|
||||
true /*IsImp*/));
|
||||
}
|
||||
|
||||
// Remember this use.
|
||||
PhysRegUse[Reg] = MI;
|
||||
for (const unsigned *SubRegs = TRI->getSubRegisters(Reg);
|
||||
|
Loading…
Reference in New Issue
Block a user