[llvm] [RISCV] Recurse on first operand of two operand shuffles (PR #79180)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 09:56:06 PST 2024


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 a0f69be26293dfb3b6c65ca65bd68f735f60c5a3 0fcfbc8cf057748524452d3f018c2aa10a507944 -- 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 1a54c95b75..6afd91ff8a 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -4955,8 +4955,8 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
   if (V2.isUndef()) {
     V1 = convertToScalableVector(ContainerVT, V1, DAG, Subtarget);
     SDValue LHSIndices = DAG.getBuildVector(IndexVT, DL, GatherIndicesLHS);
-    LHSIndices = convertToScalableVector(IndexContainerVT, LHSIndices, DAG,
-                                         Subtarget);
+    LHSIndices =
+        convertToScalableVector(IndexContainerVT, LHSIndices, DAG, Subtarget);
     SDValue Gather = DAG.getNode(GatherVVOpc, DL, ContainerVT, V1, LHSIndices,
                                  DAG.getUNDEF(ContainerVT), TrueMask, VL);
     return convertFromScalableVector(VT, Gather, DAG, Subtarget);
@@ -4979,7 +4979,7 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
   // Recursively invoke lowering for the LHS as if there were no RHS.
   // This allows us to leverage all of our single source permute tricks.
   SDValue Gather =
-    DAG.getVectorShuffle(VT, DL, V1, DAG.getUNDEF(VT), ShuffleMaskLHS);
+      DAG.getVectorShuffle(VT, DL, V1, DAG.getUNDEF(VT), ShuffleMaskLHS);
   Gather = convertToScalableVector(ContainerVT, Gather, DAG, Subtarget);
 
   // Blend in second vector source with an additional vrgather.
@@ -4987,7 +4987,7 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
 
   MVT MaskContainerVT = ContainerVT.changeVectorElementType(MVT::i1);
   SelectMask =
-    convertToScalableVector(MaskContainerVT, SelectMask, DAG, Subtarget);
+      convertToScalableVector(MaskContainerVT, SelectMask, DAG, Subtarget);
 
   // If only one index is used, we can use a "splat" vrgather.
   // TODO: We can splat the most-common index and fix-up any stragglers, if
@@ -5000,7 +5000,7 @@ static SDValue lowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG,
   } else {
     SDValue RHSIndices = DAG.getBuildVector(IndexVT, DL, GatherIndicesRHS);
     RHSIndices =
-      convertToScalableVector(IndexContainerVT, RHSIndices, DAG, Subtarget);
+        convertToScalableVector(IndexContainerVT, RHSIndices, DAG, Subtarget);
     Gather = DAG.getNode(GatherVVOpc, DL, ContainerVT, V2, RHSIndices, Gather,
                          SelectMask, VL);
   }

``````````

</details>


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


More information about the llvm-commits mailing list