[llvm] [NFC][AArch64] ConditionOptimizer: refine cmp/cond instruction update code (PR #186724)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 15 19:13:13 PDT 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/AArch64/AArch64ConditionOptimizer.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/AArch64/AArch64ConditionOptimizer.cpp b/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
index 2172dd092..54c7b6c7a 100644
--- a/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp
@@ -125,7 +125,7 @@ public:
   void updateCmpInstr(MachineInstr *CmpMI, int NewImm, unsigned NewOpc);
   void updateCondInstr(MachineInstr *CondMI, AArch64CC::CondCode NewCC);
   void applyCmpAdjustment(MachineInstr *CmpMI, MachineInstr *CondMI,
-                       const CmpInfo &Info);
+                          const CmpInfo &Info);
   bool adjustTo(MachineInstr *CmpMI, AArch64CC::CondCode Cmp, MachineInstr *To,
                 int ToImm);
   bool optimizeIntraBlock(MachineBasicBlock &MBB);
@@ -385,8 +385,8 @@ void AArch64ConditionOptimizer::updateCondInstr(MachineInstr *CondMI,
 
 // Applies a comparison adjustment to a cmp/cond instruction pair.
 void AArch64ConditionOptimizer::applyCmpAdjustment(MachineInstr *CmpMI,
-                                                MachineInstr *CondMI,
-                                                const CmpInfo &Info) {
+                                                   MachineInstr *CondMI,
+                                                   const CmpInfo &Info) {
   updateCmpInstr(CmpMI, Info.Imm, Info.Opc);
   updateCondInstr(CondMI, Info.CC);
 }

``````````

</details>


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


More information about the llvm-commits mailing list