[llvm] [RISCV] Improve performCONCAT_VECTORCombine stride matching (PR #68726)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 10:02:52 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 e2f493bed3ecbc8748cfb61512c3e3cd8bb2b613 3df4f10830e89a26277187ff1e03d9c08424442c -- 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 955674bd1..62719e494 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -13822,7 +13822,7 @@ static SDValue performCONCAT_VECTORSCombine(SDNode *N, SelectionDAG &DAG,
Align = std::min(Align, Ld->getAlign());
}
- // If the load ptrs can be decomposed into a common (Base + Index) with a
+ // If the load ptrs can be decomposed into a common (Base + Index) with a
// common constant stride, then return the constant stride. This matcher
// enables some additional optimization since BaseIndexOffset is capable of
// decomposing the load ptrs to (add (add Base, Index), Stride) instead of
@@ -13915,7 +13915,7 @@ static SDValue performCONCAT_VECTORSCombine(SDNode *N, SelectionDAG &DAG,
SDValue Stride = matchForwardStrided(Ptrs);
if (!Stride) {
Stride = matchReverseStrided(Ptrs);
- if (Stride) {
+ if (Stride) {
Reversed = true;
Stride = DAG.getNegative(Stride, DL, Stride->getValueType(0));
} else {
@@ -13923,7 +13923,7 @@ static SDValue performCONCAT_VECTORSCombine(SDNode *N, SelectionDAG &DAG,
if (Stride) {
Reversed = cast<ConstantSDNode>(Stride)->getSExtValue() < 0;
} else {
- return SDValue();
+ return SDValue();
}
}
}
@@ -13946,9 +13946,8 @@ static SDValue performCONCAT_VECTORSCombine(SDNode *N, SelectionDAG &DAG,
return SDValue();
SDVTList VTs = DAG.getVTList({WideVecVT, MVT::Other});
- SDValue IntID =
- DAG.getTargetConstant(Intrinsic::riscv_masked_strided_load, DL,
- Subtarget.getXLenVT());
+ SDValue IntID = DAG.getTargetConstant(Intrinsic::riscv_masked_strided_load,
+ DL, Subtarget.getXLenVT());
SDValue AllOneMask =
DAG.getSplat(WideVecVT.changeVectorElementType(MVT::i1), DL,
DAG.getConstant(1, DL, MVT::i1));
``````````
</details>
https://github.com/llvm/llvm-project/pull/68726
More information about the llvm-commits
mailing list