mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Let callers decide the sub-register index on the def operand of rematerialized instructions.
Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -130,9 +130,12 @@ bool TargetInstrInfoImpl::PredicateInstruction(MachineInstr *MI,
|
||||
void TargetInstrInfoImpl::reMaterialize(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned DestReg,
|
||||
unsigned SubIdx,
|
||||
const MachineInstr *Orig) const {
|
||||
MachineInstr *MI = MBB.getParent()->CloneMachineInstr(Orig);
|
||||
MI->getOperand(0).setReg(DestReg);
|
||||
MachineOperand &MO = MI->getOperand(0);
|
||||
MO.setReg(DestReg);
|
||||
MO.setSubReg(SubIdx);
|
||||
MBB.insert(I, MI);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user