mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-23 12:11:58 +00:00
Refactor duplicated condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
89fca4c1b1
commit
8c57f91d70
@ -260,16 +260,15 @@ BitVector PPCRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
|
||||
if (TFI->needsFP(MF))
|
||||
Reserved.set(PPC::R31);
|
||||
|
||||
bool IsPositionIndependent = TM.getRelocationModel() == Reloc::PIC_;
|
||||
if (hasBasePointer(MF)) {
|
||||
if (Subtarget.isSVR4ABI() && !TM.isPPC64() &&
|
||||
TM.getRelocationModel() == Reloc::PIC_)
|
||||
if (Subtarget.isSVR4ABI() && !TM.isPPC64() && IsPositionIndependent)
|
||||
Reserved.set(PPC::R29);
|
||||
else
|
||||
Reserved.set(PPC::R30);
|
||||
}
|
||||
|
||||
if (Subtarget.isSVR4ABI() && !TM.isPPC64() &&
|
||||
TM.getRelocationModel() == Reloc::PIC_)
|
||||
if (Subtarget.isSVR4ABI() && !TM.isPPC64() && IsPositionIndependent)
|
||||
Reserved.set(PPC::R30);
|
||||
|
||||
// Reserve Altivec registers when Altivec is unavailable.
|
||||
|
Loading…
x
Reference in New Issue
Block a user