diff options
| author | Eli Friedman <efriedma@quicinc.com> | 2019-04-01 23:55:57 +0000 |
|---|---|---|
| committer | Eli Friedman <efriedma@quicinc.com> | 2019-04-01 23:55:57 +0000 |
| commit | 73af6ef2e7525a9fc47e1219552955c7635bc660 (patch) | |
| tree | ff7252e5ba41e5d6c1365d9ee7eeabf7a69f931f /llvm/lib/Target/ARM | |
| parent | f608678f1f303e92cacf75c4da3b6e040b328956 (diff) | |
| download | bcm5719-llvm-73af6ef2e7525a9fc47e1219552955c7635bc660.tar.gz bcm5719-llvm-73af6ef2e7525a9fc47e1219552955c7635bc660.zip | |
[ARM] Don't try to create "push {r12, lr}" in Thumb1 at -Oz.
It's a little tricky to make this issue show up because
prologue/epilogue emission normally likes to push at least two
registers... but it doesn't when lr is force-spilled due to function
length. Not sure if that really makes sense, but I decided not to touch
it for now.
Differential Revision: https://reviews.llvm.org/D59385
llvm-svn: 357436
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index bc4547c996f..427bdd9cf51 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -2333,6 +2333,8 @@ bool llvm::tryFoldSPUpdateIntoPushPop(const ARMSubtarget &Subtarget, for (int CurRegEnc = FirstRegEnc - 1; CurRegEnc >= 0 && RegsNeeded; --CurRegEnc) { unsigned CurReg = RegClass->getRegister(CurRegEnc); + if (IsT1PushPop && CurReg > ARM::R7) + continue; if (!IsPop) { // Pushing any register is completely harmless, mark the register involved // as undef since we don't care about its value and must not restore it |

