[llvm-commits] [llvm] r118333 - /llvm/trunk/lib/Target/ARM/ARMFastISel.cpp

Eric Christopher echristo at apple.com
Sat Nov 6 00:53:11 PDT 2010


Author: echristo
Date: Sat Nov  6 02:53:11 2010
New Revision: 118333

URL: http://llvm.org/viewvc/llvm-project?rev=118333&view=rev
Log:
Make sure we have movw on the target before using it.

Fixes 8559.

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

Modified: llvm/trunk/lib/Target/ARM/ARMFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMFastISel.cpp?rev=118333&r1=118332&r2=118333&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Sat Nov  6 02:53:11 2010
@@ -439,7 +439,7 @@
   // If we can do this in a single instruction without a constant pool entry
   // do so now.
   const ConstantInt *CI = cast<ConstantInt>(C);
-  if (isUInt<16>(CI->getSExtValue())) {
+  if (Subtarget->hasV6T2Ops() && isUInt<16>(CI->getSExtValue())) {
     unsigned Opc = isThumb ? ARM::t2MOVi16 : ARM::MOVi16;
     AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
 			    TII.get(Opc), DestReg)





More information about the llvm-commits mailing list