[clang-tools-extra] [llvm] [clang] DAG: Implement promotion for strict_fp_round (PR #74332)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 19:47:10 PST 2024


================
@@ -2621,6 +2642,29 @@ SDValue DAGTypeLegalizer::PromoteFloatRes_FP_ROUND(SDNode *N) {
   return DAG.getNode(GetPromotionOpcode(VT, NVT), DL, NVT, Round);
 }
 
+// Explicit operation to reduce precision.  Reduce the value to half precision
+// and promote it back to the legal type.
+SDValue DAGTypeLegalizer::PromoteFloatRes_STRICT_FP_ROUND(SDNode *N) {
----------------
phoebewang wrote:

Why we need this given we have a handler here https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp#L2996-L3003

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


More information about the cfe-commits mailing list