mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
- Change TargetInstrInfo::reMaterialize to pass in TargetRegisterInfo.
- If destination is a physical register and it has a subreg index, use the sub-register instead. This fixes PR5423. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88745 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1033,7 +1033,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
isProfitableToReMat(regB, rc, mi, DefMI, mbbi, Dist)){
|
||||
DEBUG(errs() << "2addr: REMATTING : " << *DefMI << "\n");
|
||||
unsigned regASubIdx = mi->getOperand(DstIdx).getSubReg();
|
||||
TII->reMaterialize(*mbbi, mi, regA, regASubIdx, DefMI);
|
||||
TII->reMaterialize(*mbbi, mi, regA, regASubIdx, DefMI, TRI);
|
||||
ReMatRegs.set(regB);
|
||||
++NumReMats;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user