[PATCH] D135171: FreeBSD: enable __float128 on x86 and powerpc64le

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 02:22:01 PDT 2023


nemanjai accepted this revision.
nemanjai added a comment.

My comments are minor nits that don't require another review, so LGTM.



================
Comment at: clang/lib/Basic/Targets/OSTargets.h:245-250
     switch (Triple.getArch()) {
-    default:
+    case llvm::Triple::ppc64le:
     case llvm::Triple::x86:
     case llvm::Triple::x86_64:
+      this->HasFloat128 = true;
+    }
----------------
Seems a bit odd to have a separate switch on the same value for `__float128` rather than using fallthrough.


================
Comment at: clang/test/CodeGenCXX/float128-declarations.cpp:5-6
 // RUN:   -target-feature +float128 -std=c++11 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-freebsd -std=c++11 \
+// RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
 // RUN: %clang_cc1 -emit-llvm -triple i386-unknown-linux-gnu -std=c++11 \
----------------
Now that you added `ppc64le`, did you mean to also add a line with that triple without the explicit `-target-feature`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135171/new/

https://reviews.llvm.org/D135171



More information about the cfe-commits mailing list