[clang] [Clang] Add constexpr eval for cmath builtins (PR #194327)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 09:51:51 PDT 2026
================
@@ -6,17 +6,18 @@
// RUN: %clang_cc1 -triple powerpc-ibm-aix -mlong-double-64 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK %s
// RUN: %clang_cc1 -triple powerpc64-ibm-aix -mlong-double-64 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK %s
+long double arg = 1.0L;
int main()
{
int DummyInt;
long double DummyLongDouble;
long double returnValue;
- returnValue = __builtin_modfl(1.0L, &DummyLongDouble);
- returnValue = __builtin_frexpl(0.0L, &DummyInt);
- returnValue = __builtin_ldexpl(1.0L, 1);
+ returnValue = __builtin_modfl(arg, &DummyLongDouble);
+ returnValue = __builtin_frexpl(arg, &DummyInt);
+ returnValue = __builtin_ldexpl(arg, 1);
}
----------------
zahiraam wrote:
Good point!
https://github.com/llvm/llvm-project/pull/194327
More information about the cfe-commits
mailing list