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

Jim Grosbach grosbach at apple.com
Tue Aug 23 13:53:08 PDT 2011


Author: grosbach
Date: Tue Aug 23 15:53:08 2011
New Revision: 138373

URL: http://llvm.org/viewvc/llvm-project?rev=138373&view=rev
Log:
[SU]XT[BH] are only available on ARMv6 and up.

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=138373&r1=138372&r2=138373&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMFastISel.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMFastISel.cpp Tue Aug 23 15:53:08 2011
@@ -2002,12 +2002,14 @@
   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





More information about the llvm-commits mailing list