diff options
author | Duncan Sands <baldrick@free.fr> | 2009-04-08 13:33:37 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-04-08 13:33:37 +0000 |
commit | 7beb1ec2988d6d223714c6bcc239fb2a89db7f67 (patch) | |
tree | f6977bdc77b3cd32f607d1923c8f8b177f09a036 /lib/CodeGen/SelectionDAG | |
parent | 8ef2b89131d5be0cee83f4d3007e437cb37f4335 (diff) | |
download | external_llvm-7beb1ec2988d6d223714c6bcc239fb2a89db7f67.zip external_llvm-7beb1ec2988d6d223714c6bcc239fb2a89db7f67.tar.gz external_llvm-7beb1ec2988d6d223714c6bcc239fb2a89db7f67.tar.bz2 |
Soft float support for undef. Reported by Xerxes RĂ„nby.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeTypes.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp index 8aa3e94..5aa71ec 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp @@ -90,6 +90,7 @@ void DAGTypeLegalizer::SoftenFloatResult(SDNode *N, unsigned ResNo) { case ISD::SELECT_CC: R = SoftenFloatRes_SELECT_CC(N); break; case ISD::SINT_TO_FP: case ISD::UINT_TO_FP: R = SoftenFloatRes_XINT_TO_FP(N); break; + case ISD::UNDEF: R = SoftenFloatRes_UNDEF(N); break; case ISD::VAARG: R = SoftenFloatRes_VAARG(N); break; } @@ -464,6 +465,10 @@ SDValue DAGTypeLegalizer::SoftenFloatRes_SELECT_CC(SDNode *N) { N->getOperand(1), LHS, RHS, N->getOperand(4)); } +SDValue DAGTypeLegalizer::SoftenFloatRes_UNDEF(SDNode *N) { + return DAG.getUNDEF(TLI.getTypeToTransformTo(N->getValueType(0))); +} + SDValue DAGTypeLegalizer::SoftenFloatRes_VAARG(SDNode *N) { SDValue Chain = N->getOperand(0); // Get the chain. SDValue Ptr = N->getOperand(1); // Get the pointer. diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/lib/CodeGen/SelectionDAG/LegalizeTypes.h index 803e20f..add978b 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypes.h +++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.h @@ -422,6 +422,7 @@ private: SDValue SoftenFloatRes_LOAD(SDNode *N); SDValue SoftenFloatRes_SELECT(SDNode *N); SDValue SoftenFloatRes_SELECT_CC(SDNode *N); + SDValue SoftenFloatRes_UNDEF(SDNode *N); SDValue SoftenFloatRes_VAARG(SDNode *N); SDValue SoftenFloatRes_XINT_TO_FP(SDNode *N); |