[llvm] [RISCV] Handle recurrences in RISCVVLOptimizer (PR #151285)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 5 00:02:56 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 origin/main HEAD --extensions cpp -- llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 49497ec77..6c5954f1b 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -843,7 +843,7 @@ static std::optional<unsigned> getOperandLog2EEW(const MachineOperand &MO) {
 static std::optional<OperandInfo> getOperandInfo(const MachineOperand &MO) {
   const MachineInstr &MI = *MO.getParent();
   const RISCVVPseudosTable::PseudoInfo *RVV =
-    RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
+      RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
   MI.dump();
   assert(RVV && "Could not find MI in PseudoTable");
 
@@ -1486,8 +1486,7 @@ static bool isSegmentedStoreInstr(const MachineInstr &MI) {
   }
 }
 
-bool
-RISCVVLOptimizer::checkUsers(const MachineInstr &MI) const {
+bool RISCVVLOptimizer::checkUsers(const MachineInstr &MI) const {
   if (MI.isPHI() || MI.isFullCopy() || isTupleInsertInstr(MI))
     return true;
 

``````````

</details>


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


More information about the llvm-commits mailing list