[llvm] [AArch64] Add ZCM/ZCZ lowering statistics (PR #172863)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 18 06:50:45 PST 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 -- llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/lib/Target/AArch64/AArch64InstrInfo.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/AArch64AsmPrinter.cpp b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
index 7b3e2ee23..a10d400ca 100644
--- a/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+++ b/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
@@ -78,7 +78,9 @@ using namespace llvm;
// Doesn't count FPR128 ZCZ instructions which are handled
// by TableGen pattern matching
-STATISTIC(NumZCZeroingInstrsFPR, "Number of zero-cycle FPR zeroing instructions expanded from canonical pseudo instructions");
+STATISTIC(NumZCZeroingInstrsFPR,
+ "Number of zero-cycle FPR zeroing instructions expanded from "
+ "canonical pseudo instructions");
enum PtrauthCheckMode { Default, Unchecked, Poison, Trap };
static cl::opt<PtrauthCheckMode> PtrauthAuthChecks(
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
index 4d5ee04c5..7182d457f 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
@@ -69,9 +69,12 @@ using namespace llvm;
#define DEBUG_TYPE "AArch64InstrInfo"
STATISTIC(NumCopyInstrs, "Number of COPY instructions expanded");
-STATISTIC(NumZCRegMoveInstrsGPR, "Number of zero-cycle GPR register move instructions expanded from canonical COPY");
-STATISTIC(NumZCRegMoveInstrsFPR, "Number of zero-cycle FPR register move instructions expanded from canonical COPY");
-STATISTIC(NumZCZeroingInstrsGPR, "Number of zero-cycle GPR zeroing instructions expanded from canonical COPY");
+STATISTIC(NumZCRegMoveInstrsGPR, "Number of zero-cycle GPR register move "
+ "instructions expanded from canonical COPY");
+STATISTIC(NumZCRegMoveInstrsFPR, "Number of zero-cycle FPR register move "
+ "instructions expanded from canonical COPY");
+STATISTIC(NumZCZeroingInstrsGPR, "Number of zero-cycle GPR zeroing "
+ "instructions expanded from canonical COPY");
// NumZCZeroingInstrsFPR is counted at AArch64AsmPrinter
static cl::opt<unsigned>
@@ -5458,7 +5461,7 @@ void AArch64InstrInfo::copyPhysReg(MachineBasicBlock &MBB,
.addReg(AArch64::WZR)
.addReg(SrcReg, getKillRegState(KillSrc));
if (Subtarget.hasZeroCycleRegMoveGPR32())
- ++NumZCRegMoveInstrsGPR;
+ ++NumZCRegMoveInstrsGPR;
}
return;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/172863
More information about the llvm-commits
mailing list