[clang] [clang][PowerPC] Enable IEEE-128 long double on FreeBSD/powerpc64le (PR #201298)
Piotr Kubaj via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 3 05:07:49 PDT 2026
https://github.com/pkubaj updated https://github.com/llvm/llvm-project/pull/201298
>From d4d6ed35414a901f6114e0f5c124604f4a44111e Mon Sep 17 00:00:00 2001
From: Piotr Kubaj <pkubaj at FreeBSD.org>
Date: Wed, 3 Jun 2026 13:40:00 +0000
Subject: [PATCH 1/2] Enable IEEE-128 long double on FreeBSD/powerpc64le
Starting with FreeBSD 16, powerpc64le switches long double from 64-bit double
to IEEE 754 binary128. For the FreeBSD powerpc64le triple with OS major
version >= 16, PPC64TargetInfo selects IEEEquad and the driver
(defaultToIEEELongDouble) defaults to IEEE-128 long double.
FreeBSD has a single IEEE-128 long double format and uses the unsuffixed libm
names (fmodl, powl, ...), not the *f128 / __*ieee128 forms used by glibc and
the generic IEEE-128 libm. Skip the IEEE-128 libcall redirection on FreeBSD in
BOTH places clang performs it: getBuiltinLibFunction() (the libcall-name
rename) and EmitBuiltinExpr() (mutateLongDoubleBuiltin, which rewrites the
long-double math builtin to its f128 builtin). Excluding FreeBSD specifically
keeps the existing behavior for other PPC64 IEEE-128 targets.
---
clang/lib/Basic/Targets/PPC.h | 7 ++++++-
clang/lib/CodeGen/CGBuiltin.cpp | 6 +++++-
clang/lib/Driver/ToolChain.cpp | 4 ++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h
index a9f49aa3aebe1..211590eae32c7 100644
--- a/clang/lib/Basic/Targets/PPC.h
+++ b/clang/lib/Basic/Targets/PPC.h
@@ -457,7 +457,12 @@ class LLVM_LIBRARY_VISIBILITY PPC64TargetInfo : public PPCTargetInfo {
ABI = "elfv1";
}
- if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
+ if (Triple.isOSFreeBSD() && Triple.getArch() == llvm::Triple::ppc64le &&
+ Triple.getOSMajorVersion() >= 16) {
+ LongDoubleWidth = LongDoubleAlign = 128;
+ LongDoubleFormat = &llvm::APFloat::IEEEquad();
+ } else if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() ||
+ Triple.isMusl()) {
LongDoubleWidth = LongDoubleAlign = 64;
LongDoubleFormat = &llvm::APFloat::IEEEdouble();
}
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 3f0322e5878c7..77523df5b331a 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -232,7 +232,10 @@ llvm::Constant *CodeGenModule::getBuiltinLibFunction(const FunctionDecl *FD,
else {
// TODO: This mutation should also be applied to other targets other than
// PPC, after backend supports IEEE 128-bit style libcalls.
- if (getTriple().isPPC64() &&
+ // FreeBSD's powerpc64le has a single IEEE-128 long double format and uses
+ // the unsuffixed libm names, so skip the IEEE-128 libcall redirection
+ // there; other PPC64 IEEE-128 targets keep it.
+ if (getTriple().isPPC64() && !getTriple().isOSFreeBSD() &&
&getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEquad() &&
F128Builtins.contains(BuiltinID))
Name = F128Builtins.lookup(BuiltinID);
@@ -3005,6 +3008,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
// TODO: This mutation should also be applied to other targets other than PPC,
// after backend supports IEEE 128-bit style libcalls.
if (getTarget().getTriple().isPPC64() &&
+ !getTarget().getTriple().isOSFreeBSD() &&
&getTarget().getLongDoubleFormat() == &llvm::APFloat::IEEEquad())
BuiltinID = mutateLongDoubleBuiltin(BuiltinID);
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 511eb3757456b..32faf3dbe3769 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -263,6 +263,10 @@ bool ToolChain::useRelaxRelocations() const {
}
bool ToolChain::defaultToIEEELongDouble() const {
+ if (getTriple().isOSFreeBSD() &&
+ getTriple().getArch() == llvm::Triple::ppc64le &&
+ getTriple().getOSMajorVersion() >= 16)
+ return true;
return PPC_LINUX_DEFAULT_IEEELONGDOUBLE && getTriple().isOSLinux();
}
>From 1fdc4adc2347e65d11b65851b92607f67363d206 Mon Sep 17 00:00:00 2001
From: Piotr Kubaj <pkubaj at FreeBSD.org>
Date: Wed, 3 Jun 2026 13:10:00 +0000
Subject: [PATCH 2/2] Check FreeBSD/powerpc64le IEEE-128 long double libcalls
Add a RUN line for powerpc64le-unknown-freebsd16 with -mabi=ieeelongdouble.
On FreeBSD the F128Builtins redirection is skipped, so with IEEE-128 long
double the math builtins lower to the unsuffixed libm names (fmodl, powl,
ldexpl, modfl, nanl, ...) instead of the *f128 forms used on other PPC64
IEEE-128 targets. The new PPCFBSD check-prefix locks that in.
-mabi=ieeelongdouble is required: %clang_cc1 does not run the driver, so it
never gets the implicit flag that ToolChain::defaultToIEEELongDouble() adds,
and without it PPCTargetInfo::adjust() leaves long double as IBM double-double.
---
clang/test/CodeGen/math-builtins-long.c | 62 +++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/clang/test/CodeGen/math-builtins-long.c b/clang/test/CodeGen/math-builtins-long.c
index 13b5a180ea12d..532950ab9534d 100644
--- a/clang/test/CodeGen/math-builtins-long.c
+++ b/clang/test/CodeGen/math-builtins-long.c
@@ -6,6 +6,8 @@
// RUN: -o - -emit-llvm %s -fmath-errno | FileCheck %s -check-prefix=X86F128
// RUN: %clang_cc1 -triple ppc64le-unknown-unknown -mabi=ieeelongdouble -w \
// RUN: -o - -emit-llvm %s -fmath-errno | FileCheck %s -check-prefix=PPCF128
+// RUN: %clang_cc1 -triple powerpc64le-unknown-freebsd16 -mabi=ieeelongdouble -w \
+// RUN: -o - -emit-llvm %s -fmath-errno | FileCheck %s -check-prefix=PPCFBSD
void bar(long double);
@@ -14,359 +16,419 @@ void foo(long double f, long double *l, int *i, const char *c) {
// PPC: call ppc_fp128 @fmodl(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @fmodl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @fmodf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @fmodl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_fmodl(f,f);
// F80: call x86_fp80 @atan2l(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @atan2l(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @atan2l(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @atan2f128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @atan2l(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_atan2l(f,f);
// F80: call x86_fp80 @llvm.copysign.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.copysign.ppcf128(ppc_fp128 %{{.+}}, ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.copysign.f128(fp128 %{{.+}}, fp128 %{{.+}})
// PPCF128: call fp128 @llvm.copysign.f128(fp128 %{{.+}}, fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.copysign.f128(fp128 %{{.+}}, fp128 %{{.+}})
__builtin_copysignl(f,f);
// F80: call x86_fp80 @llvm.fabs.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.fabs.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.fabs.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.fabs.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.fabs.f128(fp128 %{{.+}})
__builtin_fabsl(f);
// F80: call { x86_fp80, i32 } @llvm.frexp.f80.i32(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @frexpl(ppc_fp128 noundef %{{.+}}, ptr noundef %{{.+}})
// X86F128: call { fp128, i32 } @llvm.frexp.f128.i32(fp128 %{{.+}})
// PPCF128: call { fp128, i32 } @llvm.frexp.f128.i32(fp128 %{{.+}})
+ // PPCFBSD: call { fp128, i32 } @llvm.frexp.f128.i32(fp128 %{{.+}})
__builtin_frexpl(f,i);
// F80: store x86_fp80 +inf, ptr
// PPC: store ppc_fp128 +inf, ptr
// X86F128: store fp128 +inf, ptr
// PPCF128: store fp128 +inf, ptr
+ // PPCFBSD: store fp128 +inf, ptr
*l = __builtin_huge_vall();
// F80: store x86_fp80 +inf, ptr
// PPC: store ppc_fp128 +inf, ptr
// X86F128: store fp128 +inf, ptr
// PPCF128: store fp128 +inf, ptr
+ // PPCFBSD: store fp128 +inf, ptr
*l = __builtin_infl();
// F80: call x86_fp80 @ldexpl(x86_fp80 noundef %{{.+}}, i32 noundef %{{.+}})
// PPC: call ppc_fp128 @ldexpl(ppc_fp128 noundef %{{.+}}, {{(signext)?.+}})
// X86F128: call fp128 @ldexpl(fp128 noundef %{{.+}}, {{(signext)?.+}})
// PPCF128: call fp128 @ldexpf128(fp128 noundef %{{.+}}, {{(signext)?.+}})
+ // PPCFBSD: call fp128 @ldexpl(fp128 noundef %{{.+}}, {{(signext)?.+}})
__builtin_ldexpl(f,f);
// F80: call { x86_fp80, x86_fp80 } @llvm.modf.f80(x86_fp80 %{{.+}})
// PPC: call { ppc_fp128, ppc_fp128 } @llvm.modf.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call { fp128, fp128 } @llvm.modf.f128(fp128 %{{.+}})
// PPCF128: call fp128 @modff128(fp128 noundef %{{.+}}, ptr noundef %{{.+}})
+ // PPCFBSD: call fp128 @modfl(fp128 noundef %{{.+}}, ptr noundef %{{.+}})
__builtin_modfl(f,l);
// F80: call x86_fp80 @nanl(ptr noundef %{{.+}})
// PPC: call ppc_fp128 @nanl(ptr noundef %{{.+}})
// X86F128: call fp128 @nanl(ptr noundef %{{.+}})
// PPCF128: call fp128 @nanf128(ptr noundef %{{.+}})
+ // PPCFBSD: call fp128 @nanl(ptr noundef %{{.+}})
__builtin_nanl(c);
// F80: call x86_fp80 @nansl(ptr noundef %{{.+}})
// PPC: call ppc_fp128 @nansl(ptr noundef %{{.+}})
// X86F128: call fp128 @nansl(ptr noundef %{{.+}})
// PPCF128: call fp128 @nansf128(ptr noundef %{{.+}})
+ // PPCFBSD: call fp128 @nansl(ptr noundef %{{.+}})
__builtin_nansl(c);
// F80: call x86_fp80 @powl(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @powl(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @powl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @powf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @powl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_powl(f,f);
// F80: call x86_fp80 @acosl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @acosl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @acosl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @acosf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @acosl(fp128 noundef %{{.+}})
__builtin_acosl(f);
// F80: call x86_fp80 @acoshl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @acoshl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @acoshl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @acoshf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @acoshl(fp128 noundef %{{.+}})
__builtin_acoshl(f);
// F80: call x86_fp80 @asinl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @asinl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @asinl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @asinf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @asinl(fp128 noundef %{{.+}})
__builtin_asinl(f);
// F80: call x86_fp80 @asinhl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @asinhl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @asinhl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @asinhf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @asinhl(fp128 noundef %{{.+}})
__builtin_asinhl(f);
// F80: call x86_fp80 @atanl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @atanl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @atanl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @atanf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @atanl(fp128 noundef %{{.+}})
__builtin_atanl(f);
// F80: call x86_fp80 @atanhl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @atanhl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @atanhl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @atanhf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @atanhl(fp128 noundef %{{.+}})
__builtin_atanhl(f);
// F80: call x86_fp80 @cbrtl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @cbrtl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @cbrtl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @cbrtf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @cbrtl(fp128 noundef %{{.+}})
__builtin_cbrtl(f);
// F80: call x86_fp80 @llvm.ceil.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.ceil.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.ceil.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.ceil.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.ceil.f128(fp128 %{{.+}})
__builtin_ceill(f);
// F80: call x86_fp80 @cosl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @cosl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @cosl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @cosf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @cosl(fp128 noundef %{{.+}})
__builtin_cosl(f);
// F80: call x86_fp80 @coshl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @coshl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @coshl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @coshf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @coshl(fp128 noundef %{{.+}})
__builtin_coshl(f);
// F80: call x86_fp80 @llvm.floor.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.floor.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.floor.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.floor.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.floor.f128(fp128 %{{.+}})
__builtin_floorl(f);
// F80: call nsz x86_fp80 @llvm.maxnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// PPC: call nsz ppc_fp128 @llvm.maxnum.ppcf128(ppc_fp128 %{{.+}}, ppc_fp128 %{{.+}})
// X86F128: call nsz fp128 @llvm.maxnum.f128(fp128 %{{.+}}, fp128 %{{.+}})
// PPCF128: call nsz fp128 @llvm.maxnum.f128(fp128 %{{.+}}, fp128 %{{.+}})
+ // PPCFBSD: call nsz fp128 @llvm.maxnum.f128(fp128 %{{.+}}, fp128 %{{.+}})
__builtin_fmaxl(f,f);
// F80: call nsz x86_fp80 @llvm.minnum.f80(x86_fp80 %{{.+}}, x86_fp80 %{{.+}})
// PPC: call nsz ppc_fp128 @llvm.minnum.ppcf128(ppc_fp128 %{{.+}}, ppc_fp128 %{{.+}})
// X86F128: call nsz fp128 @llvm.minnum.f128(fp128 %{{.+}}, fp128 %{{.+}})
// PPCF128: call nsz fp128 @llvm.minnum.f128(fp128 %{{.+}}, fp128 %{{.+}})
+ // PPCFBSD: call nsz fp128 @llvm.minnum.f128(fp128 %{{.+}}, fp128 %{{.+}})
__builtin_fminl(f,f);
// F80: call x86_fp80 @llvm.nearbyint.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.nearbyint.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.nearbyint.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.nearbyint.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.nearbyint.f128(fp128 %{{.+}})
__builtin_nearbyintl(f);
// F80: call x86_fp80 @llvm.trunc.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.trunc.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.trunc.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.trunc.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.trunc.f128(fp128 %{{.+}})
__builtin_truncl(f);
// F80: call x86_fp80 @llvm.rint.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.rint.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.rint.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.rint.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.rint.f128(fp128 %{{.+}})
__builtin_rintl(f);
// F80: call x86_fp80 @llvm.round.f80(x86_fp80 %{{.+}})
// PPC: call ppc_fp128 @llvm.round.ppcf128(ppc_fp128 %{{.+}})
// X86F128: call fp128 @llvm.round.f128(fp128 %{{.+}})
// PPCF128: call fp128 @llvm.round.f128(fp128 %{{.+}})
+ // PPCFBSD: call fp128 @llvm.round.f128(fp128 %{{.+}})
__builtin_roundl(f);
// F80: call x86_fp80 @erfl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @erfl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @erfl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @erff128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @erfl(fp128 noundef %{{.+}})
__builtin_erfl(f);
// F80: call x86_fp80 @erfcl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @erfcl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @erfcl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @erfcf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @erfcl(fp128 noundef %{{.+}})
__builtin_erfcl(f);
// F80: call x86_fp80 @expl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @expl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @expl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @expf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @expl(fp128 noundef %{{.+}})
__builtin_expl(f);
// F80: call x86_fp80 @exp2l(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @exp2l(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @exp2l(fp128 noundef %{{.+}})
// PPCF128: call fp128 @exp2f128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @exp2l(fp128 noundef %{{.+}})
__builtin_exp2l(f);
// F80: call x86_fp80 @expm1l(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @expm1l(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @expm1l(fp128 noundef %{{.+}})
// PPCF128: call fp128 @expm1f128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @expm1l(fp128 noundef %{{.+}})
__builtin_expm1l(f);
// F80: call x86_fp80 @fdiml(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @fdiml(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @fdiml(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @fdimf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @fdiml(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_fdiml(f,f);
// F80: call x86_fp80 @fmal(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @fmal(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @fmal(fp128 noundef %{{.+}}, fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @fmaf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @fmal(fp128 noundef %{{.+}}, fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_fmal(f,f,f);
// F80: call x86_fp80 @hypotl(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @hypotl(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @hypotl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @hypotf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @hypotl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_hypotl(f,f);
// F80: call i32 @ilogbl(x86_fp80 noundef %{{.+}})
// PPC: call {{(i32)|(signext i32)}} @ilogbl(ppc_fp128 noundef %{{.+}})
// X86F128: call {{(i32)|(signext i32)}} @ilogbl(fp128 noundef %{{.+}})
// PPCF128: call {{(i32)|(signext i32)}} @ilogbf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call {{(i32)|(signext i32)}} @ilogbl(fp128 noundef %{{.+}})
__builtin_ilogbl(f);
// F80: call x86_fp80 @lgammal(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @lgammal(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @lgammal(fp128 noundef %{{.+}})
// PPCF128: call fp128 @lgammaf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @lgammal(fp128 noundef %{{.+}})
__builtin_lgammal(f);
// F80: call i64 @llrintl(x86_fp80 noundef %{{.+}})
// PPC: call i64 @llrintl(ppc_fp128 noundef %{{.+}})
// X86F128: call i64 @llrintl(fp128 noundef %{{.+}})
// PPCF128: call i64 @llrintf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call i64 @llrintl(fp128 noundef %{{.+}})
__builtin_llrintl(f);
// F80: call i64 @llroundl(x86_fp80 noundef %{{.+}})
// PPC: call i64 @llroundl(ppc_fp128 noundef %{{.+}})
// X86F128: call i64 @llroundl(fp128 noundef %{{.+}})
// PPCF128: call i64 @llroundf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call i64 @llroundl(fp128 noundef %{{.+}})
__builtin_llroundl(f);
// F80: call x86_fp80 @logl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @logl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @logl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @logf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @logl(fp128 noundef %{{.+}})
__builtin_logl(f);
// F80: call x86_fp80 @log10l(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @log10l(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @log10l(fp128 noundef %{{.+}})
// PPCF128: call fp128 @log10f128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @log10l(fp128 noundef %{{.+}})
__builtin_log10l(f);
// F80: call x86_fp80 @log1pl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @log1pl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @log1pl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @log1pf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @log1pl(fp128 noundef %{{.+}})
__builtin_log1pl(f);
// F80: call x86_fp80 @log2l(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @log2l(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @log2l(fp128 noundef %{{.+}})
// PPCF128: call fp128 @log2f128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @log2l(fp128 noundef %{{.+}})
__builtin_log2l(f);
// F80: call x86_fp80 @logbl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @logbl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @logbl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @logbf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @logbl(fp128 noundef %{{.+}})
__builtin_logbl(f);
// F80: call i64 @lrintl(x86_fp80 noundef %{{.+}})
// PPC: call i64 @lrintl(ppc_fp128 noundef %{{.+}})
// X86F128: call i64 @lrintl(fp128 noundef %{{.+}})
// PPCF128: call i64 @lrintf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call i64 @lrintl(fp128 noundef %{{.+}})
__builtin_lrintl(f);
// F80: call i64 @lroundl(x86_fp80 noundef %{{.+}})
// PPC: call i64 @lroundl(ppc_fp128 noundef %{{.+}})
// X86F128: call i64 @lroundl(fp128 noundef %{{.+}})
// PPCF128: call i64 @lroundf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call i64 @lroundl(fp128 noundef %{{.+}})
__builtin_lroundl(f);
// F80: call x86_fp80 @nextafterl(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @nextafterl(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @nextafterl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @nextafterf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @nextafterl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_nextafterl(f,f);
// F80: call x86_fp80 @nexttowardl(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @nexttowardl(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @nexttowardl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @__nexttowardieee128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @__nexttowardieee128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_nexttowardl(f,f);
// F80: call x86_fp80 @remainderl(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @remainderl(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @remainderl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
// PPCF128: call fp128 @remainderf128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @remainderl(fp128 noundef %{{.+}}, fp128 noundef %{{.+}})
__builtin_remainderl(f,f);
// F80: call x86_fp80 @remquol(x86_fp80 noundef %{{.+}}, x86_fp80 noundef %{{.+}}, ptr noundef %{{.+}})
// PPC: call ppc_fp128 @remquol(ppc_fp128 noundef %{{.+}}, ppc_fp128 noundef %{{.+}}, ptr noundef %{{.+}})
// X86F128: call fp128 @remquol(fp128 noundef %{{.+}}, fp128 noundef %{{.+}}, ptr noundef %{{.+}})
// PPCF128: call fp128 @remquof128(fp128 noundef %{{.+}}, fp128 noundef %{{.+}}, ptr noundef %{{.+}})
+ // PPCFBSD: call fp128 @remquol(fp128 noundef %{{.+}}, fp128 noundef %{{.+}}, ptr noundef %{{.+}})
__builtin_remquol(f,f,i);
// F80: call x86_fp80 @scalblnl(x86_fp80 noundef %{{.+}}, i64 noundef %{{.+}})
// PPC: call ppc_fp128 @scalblnl(ppc_fp128 noundef %{{.+}}, i64 noundef %{{.+}})
// X86F128: call fp128 @scalblnl(fp128 noundef %{{.+}}, i64 noundef %{{.+}})
// PPCF128: call fp128 @scalblnf128(fp128 noundef %{{.+}}, i64 noundef %{{.+}})
+ // PPCFBSD: call fp128 @scalblnl(fp128 noundef %{{.+}}, i64 noundef %{{.+}})
__builtin_scalblnl(f,f);
// F80: call x86_fp80 @scalbnl(x86_fp80 noundef %{{.+}}, i32 noundef %{{.+}})
// PPC: call ppc_fp128 @scalbnl(ppc_fp128 noundef %{{.+}}, {{(signext)?.+}})
// X86F128: call fp128 @scalbnl(fp128 noundef %{{.+}}, {{(signext)?.+}})
// PPCF128: call fp128 @scalbnf128(fp128 noundef %{{.+}}, {{(signext)?.+}})
+ // PPCFBSD: call fp128 @scalbnl(fp128 noundef %{{.+}}, {{(signext)?.+}})
__builtin_scalbnl(f,f);
// F80: call x86_fp80 @sinl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @sinl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @sinl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @sinf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @sinl(fp128 noundef %{{.+}})
__builtin_sinl(f);
// F80: call x86_fp80 @sinhl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @sinhl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @sinhl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @sinhf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @sinhl(fp128 noundef %{{.+}})
__builtin_sinhl(f);
// F80: call x86_fp80 @sqrtl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @sqrtl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @sqrtl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @sqrtf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @sqrtl(fp128 noundef %{{.+}})
__builtin_sqrtl(f);
// F80: call x86_fp80 @tanl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @tanl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @tanl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @tanf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @tanl(fp128 noundef %{{.+}})
__builtin_tanl(f);
// F80: call x86_fp80 @tanhl(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @tanhl(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @tanhl(fp128 noundef %{{.+}})
// PPCF128: call fp128 @tanhf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @tanhl(fp128 noundef %{{.+}})
__builtin_tanhl(f);
// F80: call x86_fp80 @tgammal(x86_fp80 noundef %{{.+}})
// PPC: call ppc_fp128 @tgammal(ppc_fp128 noundef %{{.+}})
// X86F128: call fp128 @tgammal(fp128 noundef %{{.+}})
// PPCF128: call fp128 @tgammaf128(fp128 noundef %{{.+}})
+ // PPCFBSD: call fp128 @tgammal(fp128 noundef %{{.+}})
__builtin_tgammal(f);
}
More information about the cfe-commits
mailing list