summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/Thumb1FrameLowering.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-01-07 02:55:54 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-01-07 02:55:54 +0000
commitccec74738d0fc34f4bc2ac6909324e62705f1c38 (patch)
tree0cb3578c4c40603a5a46377ce2e9537ff5a13b2b /lib/Target/ARM/Thumb1FrameLowering.cpp
parent45ca7c6336f174fae3a9521d5161a498ca27fd13 (diff)
downloadllvm-ccec74738d0fc34f4bc2ac6909324e62705f1c38.tar.gz
llvm-ccec74738d0fc34f4bc2ac6909324e62705f1c38.tar.bz2
llvm-ccec74738d0fc34f4bc2ac6909324e62705f1c38.tar.xz
Copy implicit defs (e.g. r0) when changing tBX_RET to tPOP_RET. This bug is
exposed with an upcoming change will would delete the copy to return register because there is no use! It's amazing anything works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147715 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/Thumb1FrameLowering.cpp')
-rw-r--r--lib/Target/ARM/Thumb1FrameLowering.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/ARM/Thumb1FrameLowering.cpp b/lib/Target/ARM/Thumb1FrameLowering.cpp
index e171b274de..16c7cbc4a0 100644
--- a/lib/Target/ARM/Thumb1FrameLowering.cpp
+++ b/lib/Target/ARM/Thumb1FrameLowering.cpp
@@ -350,6 +350,7 @@ restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
continue;
Reg = ARM::PC;
(*MIB).setDesc(TII.get(ARM::tPOP_RET));
+ MIB->copyImplicitOps(&*MI);
MI = MBB.erase(MI);
}
MIB.addReg(Reg, getDefRegState(true));