Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions llvm/lib/Target/X86/X86FrameLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3062,10 +3062,7 @@ bool X86FrameLowering::spillCalleeSavedRegisters(
const TargetRegisterClass *RC = TRI->getMinimalPhysRegClass(Reg, VT);

TII.storeRegToStackSlot(MBB, MI, Reg, true, I.getFrameIdx(), RC, TRI,
Register());
--MI;
MI->setFlag(MachineInstr::FrameSetup);
++MI;
Register(), MachineInstr::FrameSetup);
}

return true;
Expand Down
7 changes: 4 additions & 3 deletions llvm/lib/Target/X86/X86InstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4801,7 +4801,8 @@ void X86InstrInfo::storeRegToStackSlot(
loadStoreTileReg(MBB, MI, Opc, SrcReg, FrameIdx, isKill);
else
addFrameReference(BuildMI(MBB, MI, DebugLoc(), get(Opc)), FrameIdx)
.addReg(SrcReg, getKillRegState(isKill));
.addReg(SrcReg, getKillRegState(isKill))
.setMIFlag(Flags);
}

void X86InstrInfo::loadRegFromStackSlot(
Expand All @@ -4821,8 +4822,8 @@ void X86InstrInfo::loadRegFromStackSlot(
if (isAMXOpcode(Opc))
loadStoreTileReg(MBB, MI, Opc, DestReg, FrameIdx);
else
addFrameReference(BuildMI(MBB, MI, DebugLoc(), get(Opc), DestReg),
FrameIdx);
addFrameReference(BuildMI(MBB, MI, DebugLoc(), get(Opc), DestReg), FrameIdx)
.setMIFlag(Flags);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see we don't set FrameDestroy in restoreCalleeSavedRegisters. Is it a bug or intended?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure.

}

bool X86InstrInfo::analyzeCompare(const MachineInstr &MI, Register &SrcReg,
Expand Down
Loading