[llvm] [RISCV] Prefer vmv.s.x for build_vector a, undef, ..., undef (PR #136164)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 10:03:55 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/RISCV/RISCVISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 52c8bdfd9..de71f00c2 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -4213,12 +4213,12 @@ static SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
// pressure at high LMUL.
if (all_of(Op->ops().drop_front(),
[](const SDUse &U) { return U.get().isUndef(); })) {
- unsigned Opc = VT.isFloatingPoint() ? RISCVISD::VFMV_S_F_VL
- : RISCVISD::VMV_S_X_VL;
+ unsigned Opc =
+ VT.isFloatingPoint() ? RISCVISD::VFMV_S_F_VL : RISCVISD::VMV_S_X_VL;
if (!VT.isFloatingPoint())
Splat = DAG.getNode(ISD::ANY_EXTEND, DL, XLenVT, Splat);
- Splat =
- DAG.getNode(Opc, DL, ContainerVT, DAG.getUNDEF(ContainerVT), Splat, VL);
+ Splat = DAG.getNode(Opc, DL, ContainerVT, DAG.getUNDEF(ContainerVT),
+ Splat, VL);
return convertFromScalableVector(VT, Splat, DAG, Subtarget);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/136164
More information about the llvm-commits
mailing list