[llvm] CodeGen: Add ISD::AssertNoFPClass (PR #138839)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 14 23:51:36 PDT 2025


================
@@ -2640,6 +2642,14 @@ SDValue DAGTypeLegalizer::PromoteFloatOp_UnaryOp(SDNode *N, unsigned OpNo) {
   return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0), Op);
 }
 
+// Convert the promoted float value to the desired integer type
+SDValue DAGTypeLegalizer::PromoteFloatOp_AssertNoFPClass(SDNode *N,
+                                                         unsigned OpNo) {
+  SDValue Op = GetPromotedFloat(N->getOperand(0));
+  return DAG.getNode(N->getOpcode(), SDLoc(N), N->getValueType(0), Op,
+                     N->getOperand(1));
----------------
arsenm wrote:

It's also not safe here. But this code is probably dead, PromoteFloatRes_ will fire first and the first operand is the same type 

https://github.com/llvm/llvm-project/pull/138839


More information about the llvm-commits mailing list