summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMFrameLowering.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-31 01:21:30 +0000
committerMatthias Braun <matze@braunis.de>2017-05-31 01:21:30 +0000
commit0dba4e3509373e1f6b922e99daa252047b3dfc07 (patch)
treecd78d1e7ae446a3687d55b93d8edecd6b0f80397 /llvm/lib/Target/ARM/ARMFrameLowering.cpp
parent4e9736b1c93b61334fe3d4c7a5b32a827c51424a (diff)
downloadbcm5719-llvm-0dba4e3509373e1f6b922e99daa252047b3dfc07.tar.gz
bcm5719-llvm-0dba4e3509373e1f6b922e99daa252047b3dfc07.zip
ARM: Do not add reserved registers to block livein lists; NFC
llvm-svn: 304266
Diffstat (limited to 'llvm/lib/Target/ARM/ARMFrameLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMFrameLowering.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMFrameLowering.cpp b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
index 4f7a0ab4e22..c2b2502843c 100644
--- a/llvm/lib/Target/ARM/ARMFrameLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMFrameLowering.cpp
@@ -968,8 +968,9 @@ void ARMFrameLowering::emitPushInst(MachineBasicBlock &MBB,
if (Reg >= ARM::D8 && Reg < ARM::D8 + NumAlignedDPRCS2Regs)
continue;
- bool isLiveIn = MF.getRegInfo().isLiveIn(Reg);
- if (!isLiveIn)
+ const MachineRegisterInfo &MRI = MF.getRegInfo();
+ bool isLiveIn = MRI.isLiveIn(Reg);
+ if (!isLiveIn && !MRI.isReserved(Reg))
MBB.addLiveIn(Reg);
// If NoGap is true, push consecutive registers and then leave the rest
// for other instructions. e.g.
OpenPOWER on IntegriCloud