[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 25 17:10:56 PDT 2024
================
@@ -14547,6 +14547,17 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) {
default:
return false;
+ case Builtin::BI__builtin_frexpf:
+ case Builtin::BI__builtin_frexp: {
+ LValue Pointer;
+ if (!EvaluateFloat(E->getArg(0), Result, Info) ||
+ !EvaluatePointer(E->getArg(1), Pointer, Info))
+ return false;
+ llvm::RoundingMode RM = getActiveRoundingMode(Info, E);
+ int FrexpExp;
+ Result = llvm::frexp(Result, FrexpExp, RM);
----------------
hubert-reinterpretcast wrote:
The value in `FrexpExp` is just ignored?
https://github.com/llvm/llvm-project/pull/88978
More information about the cfe-commits
mailing list