OSDN Git Service

Make sure we have movw on the target before using it.
authorEric Christopher <echristo@apple.com>
Sat, 6 Nov 2010 07:53:11 +0000 (07:53 +0000)
committerEric Christopher <echristo@apple.com>
Sat, 6 Nov 2010 07:53:11 +0000 (07:53 +0000)
Fixes 8559.

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

lib/Target/ARM/ARMFastISel.cpp

index 5f7ad8c..a2cce9d 100644 (file)
@@ -439,7 +439,7 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, EVT VT) {
   // 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)