[llvm-commits] [llvm] r113847 - /llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp

Jim Grosbach grosbach at apple.com
Tue Sep 14 13:41:27 PDT 2010


Author: grosbach
Date: Tue Sep 14 15:41:27 2010
New Revision: 113847

URL: http://llvm.org/viewvc/llvm-project?rev=113847&view=rev
Log:
Don't ignore the CPSR implicit def when lowering a MachineInstruction to an MCInst.

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

Modified: llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp?rev=113847&r1=113846&r2=113847&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMMCInstLower.cpp Tue Sep 14 15:41:27 2010
@@ -12,6 +12,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "ARM.h"
 #include "ARMMCInstLower.h"
 //#include "llvm/CodeGen/MachineModuleInfoImpls.h"
 #include "llvm/CodeGen/AsmPrinter.h"
@@ -126,8 +127,8 @@
       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;





More information about the llvm-commits mailing list