[llvm] [clang] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 29 17:41:54 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 3e75dece919511e4a2edada82d783304cc14a9cd f6b6ca7f26e764b2c5088230a28e49b6d5ecdbb2 -- clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/TargetInfo.cpp clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Targets/ARC.h clang/lib/Basic/Targets/AVR.h clang/lib/Basic/Targets/CSKY.h clang/lib/Basic/Targets/LoongArch.h clang/lib/Basic/Targets/MSP430.h clang/lib/Basic/Targets/Mips.h clang/lib/Basic/Targets/PPC.h clang/lib/Basic/Targets/RISCV.h clang/lib/Basic/Targets/Sparc.h clang/lib/Basic/Targets/SystemZ.h clang/lib/Basic/Targets/TCE.h clang/lib/Basic/Targets/VE.h clang/lib/Basic/Targets/WebAssembly.h clang/lib/Basic/Targets/X86.h clang/lib/Basic/Targets/XCore.h llvm/include/llvm/TargetParser/Triple.h llvm/lib/CodeGen/TargetLoweringBase.cpp llvm/lib/TargetParser/Triple.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h
index 58c4de3bd7..f559b2a198 100644
--- a/clang/lib/Basic/Targets/X86.h
+++ b/clang/lib/Basic/Targets/X86.h
@@ -859,7 +859,7 @@ class LLVM_LIBRARY_VISIBILITY MicrosoftX86_64TargetInfo
 public:
   MicrosoftX86_64TargetInfo(const llvm::Triple &Triple,
                             const TargetOptions &Opts)
-      : WindowsX86_64TargetInfo(Triple, Opts) { }
+      : WindowsX86_64TargetInfo(Triple, Opts) {}
 
   void getTargetDefines(const LangOptions &Opts,
                         MacroBuilder &Builder) const override {
@@ -879,7 +879,7 @@ class LLVM_LIBRARY_VISIBILITY MinGWX86_64TargetInfo
     : public WindowsX86_64TargetInfo {
 public:
   MinGWX86_64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
-      : WindowsX86_64TargetInfo(Triple, Opts) { }
+      : WindowsX86_64TargetInfo(Triple, Opts) {}
 };
 
 // x86-64 Cygwin target
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 06fa61d5dd..33900dab08 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -1999,7 +1999,7 @@ Triple::CLayouts Triple::getCLayouts() const {
       Layouts.LongDoubleWidth = 128;
       Layouts.LongDoubleAlign = 128;
     }
-    
+
     if (isOSDarwin()) {
       Layouts.LongDoubleWidth = 128;
       Layouts.LongDoubleAlign = 128;
@@ -2016,8 +2016,8 @@ Triple::CLayouts Triple::getCLayouts() const {
         Layouts.LongDoubleWidth = 64;
         Layouts.LongDoubleAlign = 64;
       } else if (isWindowsGNUEnvironment()) {
-        // Mingw64 rounds long double size and alignment up to 16 bytes, but sticks
-        // with x86 FP ops. Weird.
+        // Mingw64 rounds long double size and alignment up to 16 bytes, but
+        // sticks with x86 FP ops. Weird.
         Layouts.LongDoubleWidth = 128;
         Layouts.LongDoubleAlign = 128;
         Layouts.LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
@@ -2025,7 +2025,7 @@ Triple::CLayouts Triple::getCLayouts() const {
         Layouts.LongDoubleWidth = 64;
         Layouts.LongDoubleAlign = 64;
         Layouts.LongDoubleFormat = &llvm::APFloat::IEEEdouble();
-      }      
+      }
     } else if (isOSIAMCU()) {
       Layouts.LongDoubleWidth = 64;
       Layouts.LongDoubleFormat = &llvm::APFloat::IEEEdouble();

``````````

</details>


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


More information about the cfe-commits mailing list