[clang] Clang: Support minimumnum and maximumnum intrinsics (PR #96281)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 11 03:19:49 PDT 2024


================
@@ -15314,6 +15314,32 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) {
       Result = RHS;
     return true;
   }
+
+  case Builtin::BI__builtin_fmaximum_num:
+  case Builtin::BI__builtin_fmaximum_numf:
+  case Builtin::BI__builtin_fmaximum_numl:
+  case Builtin::BI__builtin_fmaximum_numf16:
+  case Builtin::BI__builtin_fmaximum_numf128: {
+    APFloat RHS(0.);
+    if (!EvaluateFloat(E->getArg(0), Result, Info) ||
----------------
arsenm wrote:

Missing constexpr evaluation tests

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


More information about the cfe-commits mailing list