[llvm] d1c51d4 - [AArch64] Use Neoverse N2 sched model as default for:
Cullen Rhodes via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 06:34:33 PDT 2022
Author: Cullen Rhodes
Date: 2022-07-08T13:34:13Z
New Revision: d1c51d45f080c563a687699bf8393755f1f23343
URL: https://github.com/llvm/llvm-project/commit/d1c51d45f080c563a687699bf8393755f1f23343
DIFF: https://github.com/llvm/llvm-project/commit/d1c51d45f080c563a687699bf8393755f1f23343.diff
LOG: [AArch64] Use Neoverse N2 sched model as default for:
- Cortex-A710
- Cortex-X2
- Neoverse-V1
- Neoverse-512tvb
Reviewed By: dmgreen
Differential Revision: https://reviews.llvm.org/D129203
Added:
llvm/test/tools/llvm-mca/AArch64/Cortex/A710-sve-instructions.s
llvm/test/tools/llvm-mca/AArch64/Cortex/X2-sve-instructions.s
llvm/test/tools/llvm-mca/AArch64/Neoverse/512tvb-sve-instructions.s
llvm/test/tools/llvm-mca/AArch64/Neoverse/V1-sve-instructions.s
Modified:
llvm/lib/Target/AArch64/AArch64.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64.td b/llvm/lib/Target/AArch64/AArch64.td
index d6806fadceba6..b332e9dcb1760 100644
--- a/llvm/lib/Target/AArch64/AArch64.td
+++ b/llvm/lib/Target/AArch64/AArch64.td
@@ -1138,7 +1138,7 @@ def : ProcessorModel<"cortex-a78", CortexA57Model, ProcessorFeatures.A78,
[TuneA78]>;
def : ProcessorModel<"cortex-a78c", CortexA57Model, ProcessorFeatures.A78C,
[TuneA78C]>;
-def : ProcessorModel<"cortex-a710", CortexA57Model, ProcessorFeatures.A710,
+def : ProcessorModel<"cortex-a710", NeoverseN2Model, ProcessorFeatures.A710,
[TuneA710]>;
def : ProcessorModel<"cortex-r82", CortexA55Model, ProcessorFeatures.R82,
[TuneR82]>;
@@ -1146,7 +1146,7 @@ def : ProcessorModel<"cortex-x1", CortexA57Model, ProcessorFeatures.X1,
[TuneX1]>;
def : ProcessorModel<"cortex-x1c", CortexA57Model, ProcessorFeatures.X1C,
[TuneX1]>;
-def : ProcessorModel<"cortex-x2", CortexA57Model, ProcessorFeatures.X2,
+def : ProcessorModel<"cortex-x2", NeoverseN2Model, ProcessorFeatures.X2,
[TuneX2]>;
def : ProcessorModel<"neoverse-e1", CortexA53Model,
ProcessorFeatures.NeoverseE1, [TuneNeoverseE1]>;
@@ -1154,9 +1154,9 @@ def : ProcessorModel<"neoverse-n1", CortexA57Model,
ProcessorFeatures.NeoverseN1, [TuneNeoverseN1]>;
def : ProcessorModel<"neoverse-n2", NeoverseN2Model,
ProcessorFeatures.NeoverseN2, [TuneNeoverseN2]>;
-def : ProcessorModel<"neoverse-512tvb", CortexA57Model,
+def : ProcessorModel<"neoverse-512tvb", NeoverseN2Model,
ProcessorFeatures.Neoverse512TVB, [TuneNeoverse512TVB]>;
-def : ProcessorModel<"neoverse-v1", CortexA57Model,
+def : ProcessorModel<"neoverse-v1", NeoverseN2Model,
ProcessorFeatures.NeoverseV1, [TuneNeoverseV1]>;
def : ProcessorModel<"exynos-m3", ExynosM3Model, ProcessorFeatures.ExynosM3,
[TuneExynosM3]>;
diff --git a/llvm/test/tools/llvm-mca/AArch64/Cortex/A710-sve-instructions.s b/llvm/test/tools/llvm-mca/AArch64/Cortex/A710-sve-instructions.s
new file mode 100644
index 0000000000000..dea7b7f969ed8
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/AArch64/Cortex/A710-sve-instructions.s
@@ -0,0 +1,40 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=aarch64 -mcpu=cortex-a710 -instruction-tables < %s | FileCheck %s
+
+# Check the Neoverse N2 model is used.
+
+bext z0.b, z1.b, z31.b
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 2 6 2.00 bext z0.b, z1.b, z31.b
+
+# CHECK: Resources:
+# CHECK-NEXT: [0.0] - N2UnitB
+# CHECK-NEXT: [0.1] - N2UnitB
+# CHECK-NEXT: [1.0] - N2UnitD
+# CHECK-NEXT: [1.1] - N2UnitD
+# CHECK-NEXT: [2] - N2UnitL2
+# CHECK-NEXT: [3.0] - N2UnitL01
+# CHECK-NEXT: [3.1] - N2UnitL01
+# CHECK-NEXT: [4] - N2UnitM0
+# CHECK-NEXT: [5] - N2UnitM1
+# CHECK-NEXT: [6.0] - N2UnitS
+# CHECK-NEXT: [6.1] - N2UnitS
+# CHECK-NEXT: [7] - N2UnitV0
+# CHECK-NEXT: [8] - N2UnitV1
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8]
+# CHECK-NEXT: - - - - - - - - - - - - 2.00
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8] Instructions:
+# CHECK-NEXT: - - - - - - - - - - - - 2.00 bext z0.b, z1.b, z31.b
diff --git a/llvm/test/tools/llvm-mca/AArch64/Cortex/X2-sve-instructions.s b/llvm/test/tools/llvm-mca/AArch64/Cortex/X2-sve-instructions.s
new file mode 100644
index 0000000000000..2912ea35f1ee8
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/AArch64/Cortex/X2-sve-instructions.s
@@ -0,0 +1,40 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=aarch64 -mcpu=cortex-x2 -instruction-tables < %s | FileCheck %s
+
+# Check the Neoverse N2 model is used.
+
+addhnb z0.b, z1.h, z31.h
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 2 0.50 addhnb z0.b, z1.h, z31.h
+
+# CHECK: Resources:
+# CHECK-NEXT: [0.0] - N2UnitB
+# CHECK-NEXT: [0.1] - N2UnitB
+# CHECK-NEXT: [1.0] - N2UnitD
+# CHECK-NEXT: [1.1] - N2UnitD
+# CHECK-NEXT: [2] - N2UnitL2
+# CHECK-NEXT: [3.0] - N2UnitL01
+# CHECK-NEXT: [3.1] - N2UnitL01
+# CHECK-NEXT: [4] - N2UnitM0
+# CHECK-NEXT: [5] - N2UnitM1
+# CHECK-NEXT: [6.0] - N2UnitS
+# CHECK-NEXT: [6.1] - N2UnitS
+# CHECK-NEXT: [7] - N2UnitV0
+# CHECK-NEXT: [8] - N2UnitV1
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8]
+# CHECK-NEXT: - - - - - - - - - - - 0.50 0.50
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8] Instructions:
+# CHECK-NEXT: - - - - - - - - - - - 0.50 0.50 addhnb z0.b, z1.h, z31.h
diff --git a/llvm/test/tools/llvm-mca/AArch64/Neoverse/512tvb-sve-instructions.s b/llvm/test/tools/llvm-mca/AArch64/Neoverse/512tvb-sve-instructions.s
new file mode 100644
index 0000000000000..18eb44bb2b6c7
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/AArch64/Neoverse/512tvb-sve-instructions.s
@@ -0,0 +1,40 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=aarch64 -mcpu=neoverse-512tvb -instruction-tables < %s | FileCheck %s
+
+# Check the Neoverse N2 model is used.
+
+abs z0.b, p0/m, z0.b
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 2 0.50 abs z0.b, p0/m, z0.b
+
+# CHECK: Resources:
+# CHECK-NEXT: [0.0] - N2UnitB
+# CHECK-NEXT: [0.1] - N2UnitB
+# CHECK-NEXT: [1.0] - N2UnitD
+# CHECK-NEXT: [1.1] - N2UnitD
+# CHECK-NEXT: [2] - N2UnitL2
+# CHECK-NEXT: [3.0] - N2UnitL01
+# CHECK-NEXT: [3.1] - N2UnitL01
+# CHECK-NEXT: [4] - N2UnitM0
+# CHECK-NEXT: [5] - N2UnitM1
+# CHECK-NEXT: [6.0] - N2UnitS
+# CHECK-NEXT: [6.1] - N2UnitS
+# CHECK-NEXT: [7] - N2UnitV0
+# CHECK-NEXT: [8] - N2UnitV1
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8]
+# CHECK-NEXT: - - - - - - - - - - - 0.50 0.50
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8] Instructions:
+# CHECK-NEXT: - - - - - - - - - - - 0.50 0.50 abs z0.b, p0/m, z0.b
diff --git a/llvm/test/tools/llvm-mca/AArch64/Neoverse/V1-sve-instructions.s b/llvm/test/tools/llvm-mca/AArch64/Neoverse/V1-sve-instructions.s
new file mode 100644
index 0000000000000..584a63975a5d4
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/AArch64/Neoverse/V1-sve-instructions.s
@@ -0,0 +1,40 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=aarch64 -mcpu=neoverse-v1 -instruction-tables < %s | FileCheck %s
+
+# Check the Neoverse N2 model is used.
+
+abs z0.b, p0/m, z0.b
+
+# CHECK: Instruction Info:
+# CHECK-NEXT: [1]: #uOps
+# CHECK-NEXT: [2]: Latency
+# CHECK-NEXT: [3]: RThroughput
+# CHECK-NEXT: [4]: MayLoad
+# CHECK-NEXT: [5]: MayStore
+# CHECK-NEXT: [6]: HasSideEffects (U)
+
+# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 1 2 0.50 abs z0.b, p0/m, z0.b
+
+# CHECK: Resources:
+# CHECK-NEXT: [0.0] - N2UnitB
+# CHECK-NEXT: [0.1] - N2UnitB
+# CHECK-NEXT: [1.0] - N2UnitD
+# CHECK-NEXT: [1.1] - N2UnitD
+# CHECK-NEXT: [2] - N2UnitL2
+# CHECK-NEXT: [3.0] - N2UnitL01
+# CHECK-NEXT: [3.1] - N2UnitL01
+# CHECK-NEXT: [4] - N2UnitM0
+# CHECK-NEXT: [5] - N2UnitM1
+# CHECK-NEXT: [6.0] - N2UnitS
+# CHECK-NEXT: [6.1] - N2UnitS
+# CHECK-NEXT: [7] - N2UnitV0
+# CHECK-NEXT: [8] - N2UnitV1
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8]
+# CHECK-NEXT: - - - - - - - - - - - 0.50 0.50
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0.0] [0.1] [1.0] [1.1] [2] [3.0] [3.1] [4] [5] [6.0] [6.1] [7] [8] Instructions:
+# CHECK-NEXT: - - - - - - - - - - - 0.50 0.50 abs z0.b, p0/m, z0.b
More information about the llvm-commits
mailing list