mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Fix PR12821.
RAFast must add an <imp-def> operand when it is rewriting a sub-register def that isn't a read-modify-write. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -674,6 +674,12 @@ bool RAFast::setPhysReg(MachineInstr *MI, unsigned OpNum, unsigned PhysReg) {
|
||||
MI->addRegisterKilled(PhysReg, TRI, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// A <def,read-undef> of a sub-register requires an implicit def of the full
|
||||
// register.
|
||||
if (MO.isDef() && MO.isUndef())
|
||||
MI->addRegisterDefined(PhysReg, TRI);
|
||||
|
||||
return MO.isDead();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user