diff options
| author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-08-03 17:35:21 +0000 |
|---|---|---|
| committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-08-03 17:35:21 +0000 |
| commit | a76e198fbda9797ec9dc173a4b8abc9e6b5dc5fb (patch) | |
| tree | 0182607968189c8c138145782d17ce6ca015a8a1 | |
| parent | ce88a0a8a41c94da892a22de81b3b8ea321887cd (diff) | |
| download | external_llvm-a76e198fbda9797ec9dc173a4b8abc9e6b5dc5fb.zip external_llvm-a76e198fbda9797ec9dc173a4b8abc9e6b5dc5fb.tar.gz external_llvm-a76e198fbda9797ec9dc173a4b8abc9e6b5dc5fb.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
| -rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | 8 |
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 |
