[llvm] [AArch64LoadStoreOpt] Allow monotonic atomics to be paired (PR #160580)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 11:31:54 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,h -- llvm/include/llvm/CodeGen/MachineInstr.h llvm/include/llvm/CodeGen/MachineMemOperand.h llvm/lib/CodeGen/MachineInstr.cpp llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.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/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 36485f987..c72f60113 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1591,10 +1591,7 @@ bool MachineInstr::hasOrderedMemoryRef() const {
 /// same address orderings.
 bool MachineInstr::hasDifferentAddressOrderedMemoryRef() const {
   // An instruction known never to access memory won't have a volatile access.
-  if (!mayStore() &&
-      !mayLoad() &&
-      !isCall() &&
-      !hasUnmodeledSideEffects())
+  if (!mayStore() && !mayLoad() && !isCall() && !hasUnmodeledSideEffects())
     return false;
 
   // Otherwise, if the instruction has no memory reference information,

``````````

</details>


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


More information about the llvm-commits mailing list