[llvm-commits] [llvm] r65239 - in /llvm/trunk/lib/CodeGen/SelectionDAG: LegalizeFloatTypes.cpp LegalizeTypes.h
Bill Wendling
isanbard at gmail.com
Sat Feb 21 14:39:24 PST 2009
Testcase? :-)
-bw
On Feb 21, 2009, at 11:11 AM, Richard Pennington wrote:
> Author: rich
> Date: Sat Feb 21 13:11:18 2009
> New Revision: 65239
>
> URL: http://llvm.org/viewvc/llvm-project?rev=65239&view=rev
> Log:
> bug 3610: Floating point vaarg not softened.
>
> Modified:
> llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
> llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp?rev=65239&r1=65238&r2=65239&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp Sat
> Feb 21 13:11:18 2009
> @@ -88,6 +88,7 @@
> 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::VAARG: R = SoftenFloatRes_VAARG(N); break;
> }
>
> // If R is null, the sub-method took care of registering the result.
> @@ -454,6 +455,22 @@
> N->getOperand(1), LHS, RHS, N->getOperand(4));
> }
>
> +SDValue DAGTypeLegalizer::SoftenFloatRes_VAARG(SDNode *N) {
> + SDValue Chain = N->getOperand(0); // Get the chain.
> + SDValue Ptr = N->getOperand(1); // Get the pointer.
> + MVT VT = N->getValueType(0);
> + MVT NVT = TLI.getTypeToTransformTo(VT);
> + DebugLoc dl = N->getDebugLoc();
> +
> + SDValue NewVAARG;
> + NewVAARG = DAG.getVAArg(NVT, dl, Chain, Ptr, N->getOperand(2));
> +
> + // Legalized the chain result - switch anything that used the old
> chain to
> + // use the new one.
> + ReplaceValueWith(SDValue(N, 1), NewVAARG.getValue(1));
> + return NewVAARG;
> +}
> +
> SDValue DAGTypeLegalizer::SoftenFloatRes_XINT_TO_FP(SDNode *N) {
> bool Signed = N->getOpcode() == ISD::SINT_TO_FP;
> MVT SVT = N->getOperand(0).getValueType();
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h?rev=65239&r1=65238&r2=65239&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h Sat Feb 21
> 13:11:18 2009
> @@ -417,6 +417,7 @@
> SDValue SoftenFloatRes_LOAD(SDNode *N);
> SDValue SoftenFloatRes_SELECT(SDNode *N);
> SDValue SoftenFloatRes_SELECT_CC(SDNode *N);
> + SDValue SoftenFloatRes_VAARG(SDNode *N);
> SDValue SoftenFloatRes_XINT_TO_FP(SDNode *N);
>
> // Operand Float to Integer Conversion.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list