[llvm-commits] [llvm] r147715 - /llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.cpp

Evan Cheng evan.cheng at apple.com
Fri Jan 6 18:55:54 PST 2012


Author: evancheng
Date: Fri Jan  6 20:55:54 2012
New Revision: 147715

URL: http://llvm.org/viewvc/llvm-project?rev=147715&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.cpp?rev=147715&r1=147714&r2=147715&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Thumb1FrameLowering.cpp Fri Jan  6 20:55:54 2012
@@ -350,6 +350,7 @@
         continue;
       Reg = ARM::PC;
       (*MIB).setDesc(TII.get(ARM::tPOP_RET));
+      MIB->copyImplicitOps(&*MI);
       MI = MBB.erase(MI);
     }
     MIB.addReg(Reg, getDefRegState(true));





More information about the llvm-commits mailing list