[llvm-branch-commits] [llvm] [LoongArch] Add support for vector FP_ROUND from vxf64 to vxf32 (PR #164059)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Oct 18 00:15:44 PDT 2025


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 h,cpp -- 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/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
index e6f3018a2..b18db5644 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
@@ -662,7 +662,8 @@ static SDValue combineFP_ROUND(SDValue N, const SDLoc &DL, SelectionDAG &DAG,
 
   if (N->getOpcode() == LoongArchISD::VPACKEV &&
       Opcode0 == LoongArchISD::VFCVT) {
-    // For VPACKEV, check if the first operation of LoongArchISD::VFCVT is undef.
+    // For VPACKEV, check if the first operation of LoongArchISD::VFCVT is
+    // undef.
     if (!Op0.getOperand(0).isUndef() || !Op1.getOperand(0).isUndef())
       return SDValue();
 
@@ -4826,7 +4827,8 @@ void LoongArchTargetLowering::ReplaceNodeResults(
     if (VT == MVT::v2f32) {
       SDValue Src = N->getOperand(0);
       SDValue Undef = DAG.getUNDEF(Src.getValueType());
-      SDValue Dst = DAG.getNode(LoongArchISD::VFCVT, DL, MVT::v4f32, Undef, Src);
+      SDValue Dst =
+          DAG.getNode(LoongArchISD::VFCVT, DL, MVT::v4f32, Undef, Src);
       Results.push_back(Dst);
     }
     break;

``````````

</details>


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


More information about the llvm-branch-commits mailing list