[llvm] CodeGen: Add ISD::AssertNoFPClass (PR #138839)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 8 02:28:42 PDT 2025
================
@@ -3607,6 +3630,21 @@ SDValue DAGTypeLegalizer::SoftPromoteHalfRes_UnaryOp(SDNode *N) {
return DAG.getNode(GetPromotionOpcode(NVT, OVT), dl, MVT::i16, Res);
}
+SDValue DAGTypeLegalizer::SoftPromoteHalfRes_UnaryOpExt1(SDNode *N) {
+ EVT OVT = N->getValueType(0);
+ EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), OVT);
+ SDValue Op = GetSoftPromotedHalf(N->getOperand(0));
+ SDLoc dl(N);
+
+ // Promote to the larger FP type.
+ Op = DAG.getNode(GetPromotionOpcode(OVT, NVT), dl, NVT, Op);
+
+ SDValue Res = DAG.getNode(N->getOpcode(), dl, NVT, Op, N->getOperand(1));
----------------
arsenm wrote:
It is incorrect to preserve this for some values, can you just drop the assert instead? e.g. denormal value in f16 promoted to f32 is no longer a denormal
https://github.com/llvm/llvm-project/pull/138839
More information about the llvm-commits
mailing list