[ARM] Remove always-true checks from Thumb1 frame lowering (NFC) (#110283)
For Thumb1, we always split the callee-saved register pushes at R7, so
we don't need to check for this.
diff --git a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
index 4fbf378..e7d0a14 100644
--- a/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
+++ b/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
@@ -160,8 +160,8 @@
assert(NumBytes >= ArgRegsSaveSize &&
"ArgRegsSaveSize is included in NumBytes");
const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
- ARMSubtarget::PushPopSplitVariation PushPopSplit =
- STI.getPushPopSplitVariation(MF);
+ assert(STI.getPushPopSplitVariation(MF) == ARMSubtarget::SplitR7 &&
+ "Must use R7 spilt for Thumb1");
// Debug location must be unknown since the first debug location is used
// to determine the end of the prologue.
@@ -223,11 +223,8 @@
case ARM::R8:
case ARM::R9:
case ARM::R10:
- if (PushPopSplit == ARMSubtarget::SplitR7) {
- GPRCS2Size += 4;
- break;
- }
- [[fallthrough]];
+ GPRCS2Size += 4;
+ break;
case ARM::LR:
if (HasFrameRecordArea) {
FRSize += 4;
@@ -367,9 +364,7 @@
case ARM::R10:
case ARM::R11:
case ARM::R12:
- if (PushPopSplit == ARMSubtarget::SplitR7)
- break;
- [[fallthrough]];
+ break;
case ARM::R0:
case ARM::R1:
case ARM::R2: