[llvm] CodeGen: Add ISD::AssertNoFPClass (PR #138839)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 23:27:39 PDT 2025
================
@@ -2996,10 +3009,18 @@ SDValue DAGTypeLegalizer::PromoteFloatRes_UnaryOp(SDNode *N) {
EVT VT = N->getValueType(0);
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
SDValue Op = GetPromotedFloat(N->getOperand(0));
-
return DAG.getNode(N->getOpcode(), SDLoc(N), NVT, Op);
}
+// Unary operation with a more non-float operand where the result and the
+// operand have PromoteFloat type action. Construct a new SDNode with the
+// promoted float value of the old operand.
+SDValue DAGTypeLegalizer::PromoteFloatRes_AssertNoFPClass(SDNode *N) {
+ EVT VT = N->getValueType(0);
+ EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), VT);
+ SDValue Op = GetPromotedFloat(N->getOperand(0));
+ return DAG.getNode(N->getOpcode(), SDLoc(N), NVT, Op, N->getOperand(1));
+}
----------------
arsenm wrote:
```suggestion
}
```
https://github.com/llvm/llvm-project/pull/138839
More information about the llvm-commits
mailing list