summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-08-03 17:35:21 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-08-03 17:35:21 +0000
commit9503900c606d3af65dda6cad7c53760e1cc79298 (patch)
tree5f0386460348664338fc73ca1515e25bba9b40ac /llvm/lib
parentc0deed3263bbf0816eb87c1627ad169845d3f8f8 (diff)
downloadbcm5719-llvm-9503900c606d3af65dda6cad7c53760e1cc79298.tar.gz
bcm5719-llvm-9503900c606d3af65dda6cad7c53760e1cc79298.zip
Allow targets to custom handle softening of results or operands before trying the standard stuff.
llvm-svn: 77974
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index 5957e3a503b..a4f3b1eb965 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
@@ -47,6 +47,10 @@ void DAGTypeLegalizer::SoftenFloatResult(SDNode *N, unsigned ResNo) {
errs() << "\n");
SDValue R = SDValue();
+ // See if the target wants to custom handle softening this result.
+ if (CustomLowerNode(N, N->getValueType(ResNo), true))
+ return;
+
switch (N->getOpcode()) {
default:
#ifndef NDEBUG
@@ -535,6 +539,10 @@ bool DAGTypeLegalizer::SoftenFloatOperand(SDNode *N, unsigned OpNo) {
errs() << "\n");
SDValue Res = SDValue();
+ // See if target wants to custom handle softening this operand.
+ if (CustomLowerNode(N, N->getOperand(OpNo).getValueType(), false))
+ return false;
+
switch (N->getOpcode()) {
default:
#ifndef NDEBUG
OpenPOWER on IntegriCloud