diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-09-14 20:41:27 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-09-14 20:41:27 +0000 |
commit | cf98cbaef1556a27bd2668c260791c5ee0282d71 (patch) | |
tree | 6b6b425afcd772c32cc9acaec1e174fb36367a28 /llvm/lib/Target/ARM/ARMMCInstLower.cpp | |
parent | bc7eeaf233f4f3ee0e48245a0e5f031e0856be95 (diff) | |
download | bcm5719-llvm-cf98cbaef1556a27bd2668c260791c5ee0282d71.tar.gz bcm5719-llvm-cf98cbaef1556a27bd2668c260791c5ee0282d71.zip |
Don't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.
llvm-svn: 113847
Diffstat (limited to 'llvm/lib/Target/ARM/ARMMCInstLower.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMMCInstLower.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMMCInstLower.cpp b/llvm/lib/Target/ARM/ARMMCInstLower.cpp index 5d840be46b3..41af0889d78 100644 --- a/llvm/lib/Target/ARM/ARMMCInstLower.cpp +++ b/llvm/lib/Target/ARM/ARMMCInstLower.cpp @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +#include "ARM.h" #include "ARMMCInstLower.h" //#include "llvm/CodeGen/MachineModuleInfoImpls.h" #include "llvm/CodeGen/AsmPrinter.h" @@ -126,8 +127,8 @@ void ARMMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const { MI->dump(); assert(0 && "unknown operand type"); case MachineOperand::MO_Register: - // Ignore all implicit register operands. - if (MO.isImplicit()) continue; + // Ignore all non-CPSR implicit register operands. + if (MO.isImplicit() && MO.getReg() != ARM::CPSR) continue; assert(!MO.getSubReg() && "Subregs should be eliminated!"); MCOp = MCOperand::CreateReg(MO.getReg()); break; |