[llvm] [RISCV] Fold shxadd into Xqcisls scaled load/store in RISCVMergeBaseOffset (PR #182221)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 18:02:56 PST 2026
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/RISCVMergeBaseOffset.cpp --diff_from_common_commit
``````````
: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/RISCVMergeBaseOffset.cpp b/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
index 95b16d75e..0ac757994 100644
--- a/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
+++ b/llvm/lib/Target/RISCV/RISCVMergeBaseOffset.cpp
@@ -612,7 +612,8 @@ bool RISCVMergeBaseOffsetOpt::foldShxaddIntoScaledMemory(MachineInstr &Hi,
MachineInstr &TailMem = *MRI->use_instr_begin(ScaledReg);
unsigned Opc = TailMem.getOpcode();
- if (!TailMem.getOperand(1).isReg() || TailMem.getOperand(1).getReg() != ScaledReg)
+ if (!TailMem.getOperand(1).isReg() ||
+ TailMem.getOperand(1).getReg() != ScaledReg)
return false;
if (!TailMem.getOperand(2).isImm())
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/182221
More information about the llvm-commits
mailing list