Disable ABS optimization for Thumb1 target, we don't have necessary instructions...
authorAnton Korobeynikov <asl@math.spbu.ru>
Sat, 8 Oct 2011 08:38:45 +0000 (08:38 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sat, 8 Oct 2011 08:38:45 +0000 (08:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141481 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelDAGToDAG.cpp

index 8b34fa11f473d7e85a7e3c37c97298c88c3d7b72..5ee009c04c5b4aba72bdb962954cf5dbe6640014 100644 (file)
@@ -2322,6 +2322,9 @@ SDNode *ARMDAGToDAGISel::SelectABSOp(SDNode *N){
   if (DisableARMIntABS)
     return NULL;
 
+  if (Subtarget->isThumb1Only())
+    return NULL;
+
   if (XORSrc0.getOpcode() != ISD::ADD ||
     XORSrc1.getOpcode() != ISD::SRA)
     return NULL;