}
// If R is null, the sub-method took care of registering the result.
- if (R.Val)
+ if (R.getNode())
SetSoftenedFloat(SDValue(N, ResNo), R);
}
}
SDValue DAGTypeLegalizer::SoftenFloatRes_ConstantFP(ConstantFPSDNode *N) {
- return DAG.getConstant(N->getValueAPF().convertToAPInt(),
+ return DAG.getConstant(N->getValueAPF().bitcastToAPInt(),
TLI.getTypeToTransformTo(N->getValueType(0)));
}
}
// If the result is null, the sub-method took care of registering results etc.
- if (!Res.Val) return false;
+ if (!Res.getNode()) return false;
// If the result is N, the sub-method updated N in place. Check to see if any
// operands are new, and if so, mark them.
- if (Res.Val == N) {
+ if (Res.getNode() == N) {
// Mark N as new and remark N and its operands. This allows us to correctly
// revisit N if it needs another step of promotion and allows us to visit
// any new operands to N.
// If SoftenSetCCOperands returned a scalar, we need to compare the result
// against zero to select between true and false values.
- if (NewRHS.Val == 0) {
+ if (NewRHS.getNode() == 0) {
NewRHS = DAG.getConstant(0, NewLHS.getValueType());
CCCode = ISD::SETNE;
}
// If SoftenSetCCOperands returned a scalar, we need to compare the result
// against zero to select between true and false values.
- if (NewRHS.Val == 0) {
+ if (NewRHS.getNode() == 0) {
NewRHS = DAG.getConstant(0, NewLHS.getValueType());
CCCode = ISD::SETNE;
}
SoftenSetCCOperands(NewLHS, NewRHS, CCCode);
// If SoftenSetCCOperands returned a scalar, use it.
- if (NewRHS.Val == 0) {
+ if (NewRHS.getNode() == 0) {
assert(NewLHS.getValueType() == N->getValueType(0) &&
"Unexpected setcc expansion!");
return NewLHS;
}
// If Lo/Hi is null, the sub-method took care of registering results etc.
- if (Lo.Val)
+ if (Lo.getNode())
SetExpandedFloat(SDValue(N, ResNo), Lo, Hi);
}
MVT NVT = TLI.getTypeToTransformTo(N->getValueType(0));
assert(NVT.getSizeInBits() == integerPartWidth &&
"Do not know how to expand this float constant!");
- APInt C = cast<ConstantFPSDNode>(N)->getValueAPF().convertToAPInt();
+ APInt C = cast<ConstantFPSDNode>(N)->getValueAPF().bitcastToAPInt();
Lo = DAG.getConstantFP(APFloat(APInt(integerPartWidth, 1,
&C.getRawData()[1])), NVT);
Hi = DAG.getConstantFP(APFloat(APInt(integerPartWidth, 1,
RTLIB::ADD_PPCF128),
N->getValueType(0), Ops, 2,
false);
- assert(Call.Val->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
+ assert(Call.getNode()->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
Lo = Call.getOperand(0); Hi = Call.getOperand(1);
}
RTLIB::DIV_PPCF128),
N->getValueType(0), Ops, 2,
false);
- assert(Call.Val->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
+ assert(Call.getNode()->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
Lo = Call.getOperand(0); Hi = Call.getOperand(1);
}
RTLIB::MUL_PPCF128),
N->getValueType(0), Ops, 2,
false);
- assert(Call.Val->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
+ assert(Call.getNode()->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
Lo = Call.getOperand(0); Hi = Call.getOperand(1);
}
RTLIB::SUB_PPCF128),
N->getValueType(0), Ops, 2,
false);
- assert(Call.Val->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
+ assert(Call.getNode()->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
Lo = Call.getOperand(0); Hi = Call.getOperand(1);
}
assert(LC != RTLIB::UNKNOWN_LIBCALL && "Unsupported XINT_TO_FP!");
Hi = MakeLibCall(LC, VT, &Src, 1, true);
- assert(Hi.Val->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
+ assert(Hi.getNode()->getOpcode() == ISD::BUILD_PAIR && "Call lowered wrongly!");
Lo = Hi.getOperand(0); Hi = Hi.getOperand(1);
}
MVT::ppcf128));
Lo = DAG.getNode(ISD::SELECT_CC, VT, Src, DAG.getConstant(0, SrcVT), Lo, Hi,
DAG.getCondCode(ISD::SETLT));
- Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo,
- DAG.getConstant(1, TLI.getPointerTy()));
- Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo,
- DAG.getConstant(0, TLI.getPointerTy()));
+ Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo, DAG.getIntPtrConstant(1));
+ Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, NVT, Lo, DAG.getIntPtrConstant(0));
}
== TargetLowering::Custom)
Res = TLI.LowerOperation(SDValue(N, OpNo), DAG);
- if (Res.Val == 0) {
+ if (Res.getNode() == 0) {
switch (N->getOpcode()) {
default:
#ifndef NDEBUG
}
// If the result is null, the sub-method took care of registering results etc.
- if (!Res.Val) return false;
+ if (!Res.getNode()) return false;
// If the result is N, the sub-method updated N in place. Check to see if any
// operands are new, and if so, mark them.
- if (Res.Val == N) {
+ if (Res.getNode() == N) {
// Mark N as new and remark N and its operands. This allows us to correctly
// revisit N if it needs another step of expansion and allows us to visit
// any new operands to N.
// If ExpandSetCCOperands returned a scalar, we need to compare the result
// against zero to select between true and false values.
- if (NewRHS.Val == 0) {
+ if (NewRHS.getNode() == 0) {
NewRHS = DAG.getConstant(0, NewLHS.getValueType());
CCCode = ISD::SETNE;
}
// If ExpandSetCCOperands returned a scalar, we need to compare the result
// against zero to select between true and false values.
- if (NewRHS.Val == 0) {
+ if (NewRHS.getNode() == 0) {
NewRHS = DAG.getConstant(0, NewLHS.getValueType());
CCCode = ISD::SETNE;
}
FloatExpandSetCCOperands(NewLHS, NewRHS, CCCode);
// If ExpandSetCCOperands returned a scalar, use it.
- if (NewRHS.Val == 0) {
+ if (NewRHS.getNode() == 0) {
assert(NewLHS.getValueType() == N->getValueType(0) &&
"Unexpected setcc expansion!");
return NewLHS;