When expanding the MOVsr[la]_flag pseudos, the CPSR implicit def becomes
authorJim Grosbach <grosbach@apple.com>
Fri, 15 Oct 2010 17:35:17 +0000 (17:35 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 15 Oct 2010 17:35:17 +0000 (17:35 +0000)
an explicit def. Make sure to capture that properly. rdar://8556556

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116591 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMExpandPseudoInsts.cpp

index 5dceeb1967f88064c8ed0935a029d9ac0369c52f..836f69d6137485d8097e936f08165401e34bb0ea 100644 (file)
@@ -586,8 +586,7 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
         .addReg(0)
         .addImm(ARM_AM::getSORegOpc((Opcode == ARM::MOVsrl_flag ? ARM_AM::lsr
                                      : ARM_AM::asr), 1)))
-        .addReg(ARM::CPSR);
-      TransferImpOps(MI, MIB, MIB);
+        .addReg(ARM::CPSR, getDefRegState(true));
       MI.eraseFromParent();
       break;
     }