mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 17:31:50 +00:00
[thumb,framelowering] Reset NoVRegs in Thumb1FrameLowering::emitPrologue.
Summary: In this function, virtual registers can be introduced (for example through calls to emitThumbRegPlusImmInReg). doScavengeFrameVirtualRegs will replace those virtual registers with concrete registers later on in PrologEpilogInserter, which sets NoVRegs again. This patch fixes the Codegen/Thumb/segmented-stacks.ll test case which failed with expensive checks. https://llvm.org/bugs/show_bug.cgi?id=27484 Reviewers: rnk, bkramer, olista01 Reviewed By: olista01 Subscribers: llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D28829 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292372 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2e261218f
commit
4a5b076253
@ -1237,4 +1237,6 @@ doScavengeFrameVirtualRegs(MachineFunction &MF, RegScavenger *RS) {
|
||||
++I;
|
||||
}
|
||||
}
|
||||
|
||||
MF.getProperties().set(MachineFunctionProperties::Property::NoVRegs);
|
||||
}
|
||||
|
@ -347,6 +347,10 @@ void Thumb1FrameLowering::emitPrologue(MachineFunction &MF,
|
||||
// checks for hasVarSizedObjects.
|
||||
if (MFI.hasVarSizedObjects())
|
||||
AFI->setShouldRestoreSPFromFP(true);
|
||||
|
||||
// In some cases, virtual registers have been introduced, e.g. by uses of
|
||||
// emitThumbRegPlusImmInReg.
|
||||
MF.getProperties().reset(MachineFunctionProperties::Property::NoVRegs);
|
||||
}
|
||||
|
||||
static bool isCSRestore(MachineInstr &MI, const MCPhysReg *CSRegs) {
|
||||
|
Loading…
Reference in New Issue
Block a user