[llvm] [AArch64] Replace AND with LSL#2 for LDR target (#34101) (PR #89531)

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 22:35:34 PDT 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 b5b34dbb27359139ef1eb2ca22e8c5a954e34e50 feebf129a4c8e3296e82f11d758181985b5a59c8 -- llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp b/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
index 1c331c8804..2dacc2a504 100644
--- a/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
+++ b/llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
@@ -724,7 +724,7 @@ bool AArch64MIPeepholeOpt::visitLOAD(MachineInstr &MI) {
       if (immr != RegSize - 1)
         return false;
       Mask = ((uint64_t)1 << (RegSize - imms)) - 4;
-      new_imms = imms+2;
+      new_imms = imms + 2;
       new_immr = immr;
     } else {
       // we only need to handle case lsl #1

``````````

</details>


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


More information about the llvm-commits mailing list