mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01: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 llvm-svn: 292372
This commit is contained in:
parent
e534f0a508
commit
0d055ba470
@ -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…
x
Reference in New Issue
Block a user