[llvm] [ARM][AArch64] Fix extremely probable documentation error in A57 (PR #87354)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 08:13:28 PDT 2024


https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/87354

>From 66af3c19e18ed2955f10436f8963083951deb32f Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Mon, 1 Apr 2024 21:04:22 -0400
Subject: [PATCH] [ARM][AArch64] Fix extremely probable documentation error in
 A57

It makes no sense that shift operation uses the I0/I1 anyway
as opposed to M, especially when the more complex instruction
uses the simpler pipeline. We should assume both use M pipeline,
and a note should be made that this is a deviation from the doc
because of its high likelihood of being an error.
---
 llvm/lib/Target/ARM/ARMScheduleA57.td | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Target/ARM/ARMScheduleA57.td b/llvm/lib/Target/ARM/ARMScheduleA57.td
index 3baac6b233c458..4eb92e2b4e49cd 100644
--- a/llvm/lib/Target/ARM/ARMScheduleA57.td
+++ b/llvm/lib/Target/ARM/ARMScheduleA57.td
@@ -181,13 +181,17 @@ class A57BranchForm<SchedWriteRes non_br> :
 // shift by register, conditional or unconditional
 // TODO: according to the doc, conditional uses I0/I1, unconditional uses M
 // Why more complex instruction uses more simple pipeline?
-// May be an error in doc.
+
+// It makes no sense that a shift operation uses the I0/I1 anyway as opposed to M,
+// and this is the only operation to do so, so it makes logical sense that both
+// actually use the M pipeline.
+
 def A57WriteALUsr : SchedWriteVariant<[
-  SchedVar<IsPredicatedPred, [CheckBranchForm<0, A57BranchForm<A57Write_2cyc_1I>>]>,
+  SchedVar<IsPredicatedPred, [CheckBranchForm<0, A57BranchForm<A57Write_2cyc_1M>>]>,
   SchedVar<NoSchedPred,      [CheckBranchForm<0, A57BranchForm<A57Write_2cyc_1M>>]>
 ]>;
 def A57WriteALUSsr : SchedWriteVariant<[
-  SchedVar<IsPredicatedPred, [CheckBranchForm<0, A57BranchForm<A57Write_2cyc_1I>>]>,
+  SchedVar<IsPredicatedPred, [CheckBranchForm<0, A57BranchForm<A57Write_2cyc_1M>>]>,
   SchedVar<NoSchedPred,      [CheckBranchForm<0, A57BranchForm<A57Write_2cyc_1M>>]>
 ]>;
 def A57ReadALUsr : SchedReadVariant<[



More information about the llvm-commits mailing list