From 2d4b60f3a40d4a1d60d43f5bb94c3c3dd19a6fc5 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sat, 8 Oct 2011 08:38:45 +0000 Subject: [PATCH] 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 --- lib/Target/ARM/ARMISelDAGToDAG.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.34.1