From: Anton Korobeynikov Date: Sat, 8 Oct 2011 08:38:45 +0000 (+0000) Subject: Disable ABS optimization for Thumb1 target, we don't have necessary instructions... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2d4b60f3a40d4a1d60d43f5bb94c3c3dd19a6fc5;p=oota-llvm.git 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 --- diff --git a/lib/Target/ARM/ARMISelDAGToDAG.cpp b/lib/Target/ARM/ARMISelDAGToDAG.cpp index 8b34fa11f47..5ee009c04c5 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;