@@ -1774,8 +1774,7 @@ void DAGTypeLegalizer::ExpandFloatRes_FP_EXTEND(SDNode *N, SDValue &Lo,
1774
1774
Hi = DAG.getNode (ISD::FP_EXTEND, dl, NVT, N->getOperand (0 ));
1775
1775
}
1776
1776
1777
- Lo = DAG.getConstantFP (
1778
- APFloat (NVT.getFltSemantics (), APInt (NVT.getSizeInBits (), 0 )), dl, NVT);
1777
+ Lo = DAG.getConstantFP (APFloat::getZero (NVT.getFltSemantics ()), dl, NVT);
1779
1778
1780
1779
if (IsStrict)
1781
1780
ReplaceValueWith (SDValue (N, 1 ), Chain);
@@ -1931,8 +1930,7 @@ void DAGTypeLegalizer::ExpandFloatRes_LOAD(SDNode *N, SDValue &Lo,
1931
1930
Chain = Hi.getValue (1 );
1932
1931
1933
1932
// The low part is zero.
1934
- Lo = DAG.getConstantFP (
1935
- APFloat (NVT.getFltSemantics (), APInt (NVT.getSizeInBits (), 0 )), dl, NVT);
1933
+ Lo = DAG.getConstantFP (APFloat::getZero (NVT.getFltSemantics ()), dl, NVT);
1936
1934
1937
1935
// Modified the chain - switch anything that used the old chain to use the
1938
1936
// new one.
@@ -1961,8 +1959,7 @@ void DAGTypeLegalizer::ExpandFloatRes_XINT_TO_FP(SDNode *N, SDValue &Lo,
1961
1959
// though.
1962
1960
if (SrcVT.bitsLE (MVT::i32 )) {
1963
1961
// The integer can be represented exactly in an f64.
1964
- Lo = DAG.getConstantFP (
1965
- APFloat (NVT.getFltSemantics (), APInt (NVT.getSizeInBits (), 0 )), dl, NVT);
1962
+ Lo = DAG.getConstantFP (APFloat::getZero (NVT.getFltSemantics ()), dl, NVT);
1966
1963
if (Strict) {
1967
1964
Hi = DAG.getNode (N->getOpcode (), dl, DAG.getVTList (NVT, MVT::Other),
1968
1965
{Chain, Src}, Flags);
0 commit comments