These instructions are thumb2 only.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 19 Nov 2010 06:28:11 +0000 (06:28 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 19 Nov 2010 06:28:11 +0000 (06:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119793 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp

index 7e3f98acd9b72db9e0f95f5e5d7f9c13f75c557e..1c7a1935af9fb8924de4fc8ad6df1bab2b646a5d 100644 (file)
@@ -520,7 +520,7 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
     setOperationAction(ISD::BSWAP, MVT::i32, Expand);
 
   // These are expanded into libcalls.
-  if (!Subtarget->hasDivide()) {
+  if (!Subtarget->hasDivide() || !Subtarget->isThumb2()) {
     // v7M has a hardware divider
     setOperationAction(ISD::SDIV,  MVT::i32, Expand);
     setOperationAction(ISD::UDIV,  MVT::i32, Expand);