aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
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
commit2caf1b212e2db36c52f3a7c3e391ea2800802c60 (patch)
tree0182607968189c8c138145782d17ce6ca015a8a1 /lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
parent4e02eb0f67356762eeb12a75f8d4d6f47de955a4 (diff)
downloadexternal_llvm-2caf1b212e2db36c52f3a7c3e391ea2800802c60.zip
external_llvm-2caf1b212e2db36c52f3a7c3e391ea2800802c60.tar.gz
external_llvm-2caf1b212e2db36c52f3a7c3e391ea2800802c60.tar.bz2
Allow targets to custom handle softening of results or operands before trying the standard stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
index 5957e3a..a4f3b1e 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
+++ b/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