[llvm] DAG: Implement promotion for strict_fpextend (PR #74310)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 02:15:42 PST 2023
================
@@ -2276,6 +2279,26 @@ SDValue DAGTypeLegalizer::PromoteFloatOp_FP_EXTEND(SDNode *N, unsigned OpNo) {
return DAG.getNode(ISD::FP_EXTEND, SDLoc(N), VT, Op);
}
+SDValue DAGTypeLegalizer::PromoteFloatOp_STRICT_FP_EXTEND(SDNode *N,
+ unsigned OpNo) {
+ assert(OpNo == 1);
+
+ SDValue Op = GetPromotedFloat(N->getOperand(1));
+ EVT VT = N->getValueType(0);
+
+ // Desired VT is same as promoted type. Use promoted float directly.
+ if (VT == Op->getValueType(0)) {
+ ReplaceValueWith(SDValue(N, 1), N->getOperand(0));
+ return Op;
+ }
+
+ // Else, extend the promoted float value to the desired VT.
----------------
arsenm wrote:
I don't think it is, it would require promoting past a legal FP type to another which is probably an unusual situation
https://github.com/llvm/llvm-project/pull/74310
More information about the llvm-commits
mailing list