[SU]XT[BH] are only available on ARMv6 and up.
authorJim Grosbach <grosbach@apple.com>
Tue, 23 Aug 2011 20:53:08 +0000 (20:53 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 23 Aug 2011 20:53:08 +0000 (20:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138373 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMFastISel.cpp

index 35d64064de01defcc5a1d6db0530f327e0c9842e..8f7447558cb804600b22d69c2c4147c9957a009e 100644 (file)
@@ -2002,12 +2002,14 @@ bool ARMFastISel::SelectIntCast(const Instruction *I) {
   switch (SrcVT.getSimpleVT().SimpleTy) {
   default: return false;
   case MVT::i16:
+    if (!Subtarget->hasV6Ops()) return false;
     if (isZext)
       Opc = isThumb ? ARM::t2UXTH : ARM::UXTH;
     else
       Opc = isThumb ? ARM::t2SXTH : ARM::SXTH;
     break;
   case MVT::i8:
+    if (!Subtarget->hasV6Ops()) return false;
     if (isZext)
       Opc = isThumb ? ARM::t2UXTB : ARM::UXTB;
     else