[llvm] [RISCV] Update matchSplatAsGather to use the index of extract_elt if in-bounds (PR #118873)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 14:00:07 PST 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 b3ce6dc7232c566c21b84ac5d5795341a355ff79 3c0b414a4134a5e415b7b045d3c82419d7cdbd54 --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 72be770449..cfe201ecf0 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -3525,8 +3525,8 @@ static SDValue matchSplatAsGather(SDValue SplatVal, MVT VT, const SDLoc &DL,
if (Idx.getValueType() != Subtarget.getXLenVT())
return SDValue();
- // If the search vector is smaller than the vector of elements we are searching for,
- // try to extract the subvector from it
+ // If the search vector is smaller than the vector of elements we are
+ // searching for, try to extract the subvector from it
if (VT.getVectorMinNumElements() < VecVT.getVectorMinNumElements()) {
if (!(VT.isFixedLengthVector() || VecVT.isScalableVector()))
return SDValue();
``````````
</details>
https://github.com/llvm/llvm-project/pull/118873
More information about the llvm-commits
mailing list