[libc-commits] [libc] [llvm] [LoongArch] Support ISD::SET_ROUNDING (llvm.set.rounding) (PR #205051)

via libc-commits libc-commits at lists.llvm.org
Mon Jun 22 03:48:07 PDT 2026


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 origin/main HEAD --extensions cpp,h -- libc/shared/fp_bits.h llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp llvm/lib/Target/LoongArch/LoongArchISelLowering.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/libc/shared/fp_bits.h b/libc/shared/fp_bits.h
index 1a7544be7..940b50d88 100644
--- a/libc/shared/fp_bits.h
+++ b/libc/shared/fp_bits.h
@@ -1,4 +1,5 @@
-comm//===-- Floating point number utils -----------------------------*- C++ -*-===//
+comm //===-- Floating point number utils -----------------------------*- C++
+     //-*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -12,7 +13,7 @@ comm//===-- Floating point number utils -----------------------------*- C++ -*-=
 #include "libc_common.h"
 #include "src/__support/FPUtil/FPBits.h"
 
-namespace LIBC_NAMESPACE_DECL {
+    namespace LIBC_NAMESPACE_DECL {
 namespace shared {
 
 using fputil::FPBits;
diff --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
index 9438608fa..c4d65d451 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
@@ -4039,7 +4039,7 @@ SDValue LoongArchTargetLowering::lowerSET_ROUNDING(SDValue Op,
   // WRFCSR takes (uimm2:$fcsr, GPR:$src).
   SDValue FCSRNo = DAG.getTargetConstant(0, DL, GRLenVT); // FCSR0
   MachineSDNode *RN = DAG.getMachineNode(LoongArch::WRFCSR, DL, MVT::Other,
-                                          FCSRNo, RMValue, Chain);
+                                         FCSRNo, RMValue, Chain);
   return SDValue(RN, 0);
 }
 

``````````

</details>


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


More information about the libc-commits mailing list