projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e3e56f
)
[PowerPC][NFC] Convert an if/else to a conditional.
author
Sean Fertile
<sd.fertile@gmail.com>
Mon, 11 May 2020 17:03:45 +0000
(13:03 -0400)
committer
Sean Fertile
<sd.fertile@gmail.com>
Mon, 11 May 2020 17:05:19 +0000
(13:05 -0400)
Change an if else to use a conditional which is shorter. Also name the
conditonal value to make the code clearer.
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
b/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
index
ad1f16b
..
7fbdf97
100644
(file)
--- a/
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
+++ b/
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
@@
-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