[clang] [clang][PowerPC] Enable IEEE-128 long double on FreeBSD/powerpc64le (PR #201298)

Jessica Clarke via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 21 14:35:10 PDT 2026


================
@@ -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 || Triple.getOSVersion().empty())) {
+      LongDoubleWidth = LongDoubleAlign = 128;
+      LongDoubleFormat = &llvm::APFloat::IEEEquad();
----------------
jrtc27 wrote:

Do we actually need to explicitly set them here or can we just leave them as their default value and let defaultToIEEELongDouble do the right thing?

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


More information about the cfe-commits mailing list