mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-03 08:51:43 +00:00
[mips][msa] A small refactor to reduce patch noise in my next commit
No functional change. An if-statement has been split into two nested if-statements. llvm-svn: 195972
This commit is contained in:
parent
7150312963
commit
f397466fb3
@ -113,21 +113,23 @@ void MipsSERegisterInfo::eliminateFI(MachineBasicBlock::iterator II,
|
||||
|
||||
// If MI is not a debug value, make sure Offset fits in the 16-bit immediate
|
||||
// field.
|
||||
if (!MI.isDebugValue() && !isInt<16>(Offset)) {
|
||||
MachineBasicBlock &MBB = *MI.getParent();
|
||||
DebugLoc DL = II->getDebugLoc();
|
||||
unsigned ADDu = Subtarget.isABI_N64() ? Mips::DADDu : Mips::ADDu;
|
||||
unsigned NewImm;
|
||||
const MipsSEInstrInfo &TII =
|
||||
*static_cast<const MipsSEInstrInfo*>(
|
||||
MBB.getParent()->getTarget().getInstrInfo());
|
||||
unsigned Reg = TII.loadImmediate(Offset, MBB, II, DL, &NewImm);
|
||||
BuildMI(MBB, II, DL, TII.get(ADDu), Reg).addReg(FrameReg)
|
||||
.addReg(Reg, RegState::Kill);
|
||||
if (!MI.isDebugValue()) {
|
||||
if (!isInt<16>(Offset)) {
|
||||
MachineBasicBlock &MBB = *MI.getParent();
|
||||
DebugLoc DL = II->getDebugLoc();
|
||||
unsigned ADDu = Subtarget.isABI_N64() ? Mips::DADDu : Mips::ADDu;
|
||||
unsigned NewImm;
|
||||
const MipsSEInstrInfo &TII =
|
||||
*static_cast<const MipsSEInstrInfo *>(
|
||||
MBB.getParent()->getTarget().getInstrInfo());
|
||||
unsigned Reg = TII.loadImmediate(Offset, MBB, II, DL, &NewImm);
|
||||
BuildMI(MBB, II, DL, TII.get(ADDu), Reg).addReg(FrameReg)
|
||||
.addReg(Reg, RegState::Kill);
|
||||
|
||||
FrameReg = Reg;
|
||||
Offset = SignExtend64<16>(NewImm);
|
||||
IsKill = true;
|
||||
FrameReg = Reg;
|
||||
Offset = SignExtend64<16>(NewImm);
|
||||
IsKill = true;
|
||||
}
|
||||
}
|
||||
|
||||
MI.getOperand(OpNo).ChangeToRegister(FrameReg, false, false, IsKill);
|
||||
|
Loading…
Reference in New Issue
Block a user