aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2011-10-08 08:38:45 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2011-10-08 08:38:45 +0000
commit2d4b60f3a40d4a1d60d43f5bb94c3c3dd19a6fc5 (patch)
tree32b037981c9cbb5a293dbb83e94939ba3161fdcb /lib/Target/ARM/ARMISelDAGToDAG.cpp
parent4391bb75ecce0fe06dc6af8ad05b737da6a088e0 (diff)
Disable ABS optimization for Thumb1 target, we don't have necessary instructions there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMISelDAGToDAG.cpp')
-rw-r--r--lib/Target/ARM/ARMISelDAGToDAG.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp
index 8b34fa11f4..5ee009c04c 100644
--- a/lib/Target/ARM/ARMISelDAGToDAG.cpp
+++ b/lib/Target/ARM/ARMISelDAGToDAG.cpp
@@ -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;