[llvm] [AArch64] Optimize CBZ wzr and friends. (PR #161508)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 04:49:32 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 h,cpp -- llvm/include/llvm/CodeGen/TargetInstrInfo.h llvm/lib/CodeGen/MachineCopyPropagation.cpp llvm/lib/CodeGen/ShrinkWrap.cpp llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/AArch64InstrInfo.h llvm/lib/Target/RISCV/RISCVInstrInfo.cpp llvm/lib/Target/RISCV/RISCVInstrInfo.h
``````````
: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/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 99a182012..4cdd370e2 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -704,7 +704,7 @@ bool AArch64InstrInfo::simplifyInstruction(MachineInstr &MI,
for (auto *S : Succs)
if (S != Target)
MBB->removeSuccessor(S);
- SmallVector<MachineInstr*> DeadInstrs;
+ SmallVector<MachineInstr *> DeadInstrs;
for (auto It = MI.getIterator(); It != MBB->end(); ++It)
DeadInstrs.push_back(&*It);
BuildMI(MBB, MI.getDebugLoc(), get(AArch64::B)).addMBB(Target);
``````````
</details>
https://github.com/llvm/llvm-project/pull/161508
More information about the llvm-commits
mailing list