From b0534f0113d275fc3a53bc2f5caa8e39eebe8af0 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. llvm-svn: 141481 --- 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;