SDValue Chain = IsStrict ? N->getOperand(0) : SDValue();
+ if (getTypeAction(Op.getValueType()) == TargetLowering::TypePromoteFloat) {
+ Op = GetPromotedFloat(Op);
+ // If the promotion did the FP_EXTEND to the destination type for us,
+ // there's nothing left to do here.
+ if (Op.getValueType() == N->getValueType(0))
+ return BitConvertToInteger(Op);
+ }
+
// There's only a libcall for f16 -> f32, so proceed in two stages. Also, it's
// entirely possible for both f16 and f32 to be legal, so use the fully
// hard-float FP_EXTEND rather than FP16_TO_FP.
}
}
- if (getTypeAction(Op.getValueType()) == TargetLowering::TypePromoteFloat) {
- Op = GetPromotedFloat(Op);
- // If the promotion did the FP_EXTEND to the destination type for us,
- // there's nothing left to do here.
- if (Op.getValueType() == N->getValueType(0)) {
- return BitConvertToInteger(Op);
- }
- }
-
RTLIB::Libcall LC = RTLIB::getFPEXT(Op.getValueType(), N->getValueType(0));
assert(LC != RTLIB::UNKNOWN_LIBCALL && "Unsupported FP_EXTEND!");
TargetLowering::MakeLibCallOptions CallOptions;