mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +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:
@@ -991,12 +991,13 @@ static bool isSafeToClobberEFLAGS(MachineBasicBlock &MBB,
|
||||
void X86InstrInfo::reMaterialize(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned DestReg, unsigned SubIdx,
|
||||
const MachineInstr *Orig) const {
|
||||
const MachineInstr *Orig,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
DebugLoc DL = DebugLoc::getUnknownLoc();
|
||||
if (I != MBB.end()) DL = I->getDebugLoc();
|
||||
|
||||
if (SubIdx && TargetRegisterInfo::isPhysicalRegister(DestReg)) {
|
||||
DestReg = RI.getSubReg(DestReg, SubIdx);
|
||||
DestReg = TRI->getSubReg(DestReg, SubIdx);
|
||||
SubIdx = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user