From 5e262bc94342b4ce277206cb739b98b80b8b0d2b Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sat, 6 Nov 2010 07:53:11 +0000 Subject: [PATCH] Make sure we have movw on the target before using it. Fixes 8559. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118333 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMFastISel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 5f7ad8ce611..a2cce9d28df 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -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(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) -- 2.34.1