Skip to content

Commit

Permalink
[PowerPC][NFC] Convert an if/else to a conditional.
Browse files Browse the repository at this point in the history
Change an if else to use a conditional which is shorter. Also name the
conditonal value to make the code clearer.
  • Loading branch information
mandlebug committed May 11, 2020
1 parent 8e3e56f commit 1ea8d58
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
Expand Up @@ -1983,11 +1983,8 @@ void PPCFrameLowering::processFunctionBeforeFrameFinalized(MachineFunction &MF,
std::min<unsigned>(TRI->getEncodingValue(MinGPR),
TRI->getEncodingValue(MinG8R));

if (Subtarget.isPPC64()) {
LowerBound -= (31 - MinReg + 1) * 8;
} else {
LowerBound -= (31 - MinReg + 1) * 4;
}
const unsigned GPRegSize = Subtarget.isPPC64() ? 8 : 4;
LowerBound -= (31 - MinReg + 1) * GPRegSize;
}

// For 32-bit only, the CR save area is below the general register
Expand Down

0 comments on commit 1ea8d58

Please sign in to comment.