[llvm] [RISCV] Transform build_vector((binop X_i, C_i)..) to binop (build_ve… (PR #67358)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 11:53:49 PDT 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 f1ea831dbc40052ff0cdfcb10f89a6c2fae81ec8 57bbd485e77809cd1a52a3b567d0d553be2695ae -- 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 c40e940f1..aaf2cfb17 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -13343,8 +13343,8 @@ static SDValue performSELECTCombine(SDNode *N, SelectionDAG &DAG,
 /// We assume that materializing a constant build vector will be no more
 /// expensive that performing O(n) binops.
 static SDValue performBUILD_VECTORCombine(SDNode *N, SelectionDAG &DAG,
-                                            const RISCVSubtarget &Subtarget,
-                                            const RISCVTargetLowering &TLI) {
+                                          const RISCVSubtarget &Subtarget,
+                                          const RISCVTargetLowering &TLI) {
   SDLoc DL(N);
   EVT VT = N->getValueType(0);
 
@@ -13357,8 +13357,7 @@ static SDValue performBUILD_VECTORCombine(SDNode *N, SelectionDAG &DAG,
   if (!TLI.isBinOp(Opcode))
     return SDValue();
 
-  if (!TLI.isOperationLegalOrCustom(Opcode, VT) ||
-      !TLI.isTypeLegal(VT))
+  if (!TLI.isOperationLegalOrCustom(Opcode, VT) || !TLI.isTypeLegal(VT))
     return SDValue();
 
   SmallVector<SDValue> LHSOps;
@@ -13383,8 +13382,7 @@ static SDValue performBUILD_VECTORCombine(SDNode *N, SelectionDAG &DAG,
     RHSOps.push_back(Op.getOperand(1));
   }
 
-  return DAG.getNode(Opcode, DL, VT,
-                     DAG.getBuildVector(VT, DL, LHSOps),
+  return DAG.getNode(Opcode, DL, VT, DAG.getBuildVector(VT, DL, LHSOps),
                      DAG.getBuildVector(VT, DL, RHSOps));
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list