summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index be6d11a962a..36df387cd1b 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -10391,9 +10391,12 @@ static SDValue PerformABSCombine(SDNode *N,
SelectionDAG &DAG = DCI.DAG;
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
- if (!TLI.expandABS(N, res, DAG))
+ if (TLI.isOperationLegal(N->getOpcode(), N->getValueType(0)))
return SDValue();
+ if (!TLI.expandABS(N, res, DAG))
+ return SDValue();
+
return res;
}
OpenPOWER on IntegriCloud