summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
diff options
context:
space:
mode:
authorMomchil Velikov <momchil.velikov@arm.com>2018-01-08 14:47:19 +0000
committerMomchil Velikov <momchil.velikov@arm.com>2018-01-08 14:47:19 +0000
commitac7c5c1d92f9c965e23b95c6e930fc85cdfbbfaa (patch)
tree5e029fe9723c7b67832458a071ab03da0e096cfc /llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
parent31db71361549c0428b683462a83beb94dbaae4ac (diff)
downloadbcm5719-llvm-ac7c5c1d92f9c965e23b95c6e930fc85cdfbbfaa.tar.gz
bcm5719-llvm-ac7c5c1d92f9c965e23b95c6e930fc85cdfbbfaa.zip
[ARM] Fix PR35379 - incorrect unwind information when compiling with -Oz
The patch makes the unwind information not mention registers, which were pushed solely for the purpose of saving stack adjustment instructions. Differential revision: https://reviews.llvm.org/D41300 Fixes https://bugs.llvm.org/show_bug.cgi?id=35379 llvm-svn: 321996
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 8c1727724a9..7bf47ab6060 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -2277,9 +2277,9 @@ bool llvm::tryFoldSPUpdateIntoPushPop(const ARMSubtarget &Subtarget,
--CurRegEnc) {
unsigned CurReg = RegClass->getRegister(CurRegEnc);
if (!IsPop) {
- // Pushing any register is completely harmless, mark the
- // register involved as undef since we don't care about it in
- // the slightest.
+ // 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
+ // during stack unwinding.
RegList.push_back(MachineOperand::CreateReg(CurReg, false, false,
false, false, true));
--RegsNeeded;
OpenPOWER on IntegriCloud