The t2MOVi16 and t2MOVTi16 instructions do not set CPSR. Trying to add
authorBob Wilson <bob.wilson@apple.com>
Tue, 29 Jun 2010 16:25:11 +0000 (16:25 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 29 Jun 2010 16:25:11 +0000 (16:25 +0000)
a CPSR operand to them causes an assertion failure, so apparently these
instructions haven't been getting a lot of use.

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

lib/Target/ARM/Thumb2InstrInfo.cpp

index 89e9eacf64cbd98d27c14ebb2d41c6c334665c83..7e2814f7cd5359de3bd7cf8fa7f0fc6984acb6a4 100644 (file)
@@ -224,14 +224,14 @@ void llvm::emitT2RegPlusImmediate(MachineBasicBlock &MBB,
       // Use a movw to materialize the 16-bit constant.
       BuildMI(MBB, MBBI, dl, TII.get(ARM::t2MOVi16), DestReg)
         .addImm(NumBytes)
-        .addImm((unsigned)Pred).addReg(PredReg).addReg(0);
+        .addImm((unsigned)Pred).addReg(PredReg);
       Fits = true;
     } else if ((NumBytes & 0xffff) == 0) {
       // Use a movt to materialize the 32-bit constant.
       BuildMI(MBB, MBBI, dl, TII.get(ARM::t2MOVTi16), DestReg)
         .addReg(DestReg)
         .addImm(NumBytes >> 16)
-        .addImm((unsigned)Pred).addReg(PredReg).addReg(0);
+        .addImm((unsigned)Pred).addReg(PredReg);
       Fits = true;
     }