Skip to content

Commit 95b8a3e

Browse files
committed
[AArch64] FeaturePerfMon Added to CPUs
FeaturePerfMon has been enabled for CPUs in AArch64. Differential Revision: https://reviews.llvm.org/D118705
1 parent d9dba4c commit 95b8a3e

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed

llvm/lib/Target/AArch64/AArch64.td

+10-7
Original file line numberDiff line numberDiff line change
@@ -947,13 +947,14 @@ def ProcessorFeatures {
947947
FeatureFP16FML];
948948
list<SubtargetFeature> A65 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
949949
FeatureNEON, FeatureFullFP16, FeatureDotProd,
950-
FeatureRCPC, FeatureSSBS, FeatureRAS];
950+
FeatureRCPC, FeatureSSBS, FeatureRAS,
951+
FeaturePerfMon];
951952
list<SubtargetFeature> A76 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
952953
FeatureNEON, FeatureFullFP16, FeatureDotProd,
953-
FeatureRCPC, FeatureSSBS];
954+
FeatureRCPC, FeatureSSBS, FeaturePerfMon];
954955
list<SubtargetFeature> A77 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
955956
FeatureNEON, FeatureFullFP16, FeatureDotProd,
956-
FeatureRCPC];
957+
FeatureRCPC, FeaturePerfMon];
957958
list<SubtargetFeature> A78 = [HasV8_2aOps, FeatureCrypto, FeatureFPARMv8,
958959
FeatureNEON, FeatureFullFP16, FeatureDotProd,
959960
FeatureRCPC, FeaturePerfMon, FeatureSPE,
@@ -1012,13 +1013,15 @@ def ProcessorFeatures {
10121013
FeatureRDM];
10131014
list<SubtargetFeature> NeoverseE1 = [HasV8_2aOps, FeatureCrypto, FeatureDotProd,
10141015
FeatureFPARMv8, FeatureFullFP16, FeatureNEON,
1015-
FeatureRCPC, FeatureSSBS];
1016+
FeatureRCPC, FeatureSSBS, FeaturePerfMon];
10161017
list<SubtargetFeature> NeoverseN1 = [HasV8_2aOps, FeatureCrypto, FeatureDotProd,
10171018
FeatureFPARMv8, FeatureFullFP16, FeatureNEON,
1018-
FeatureRCPC, FeatureSPE, FeatureSSBS];
1019+
FeatureRCPC, FeatureSPE, FeatureSSBS,
1020+
FeaturePerfMon];
10191021
list<SubtargetFeature> NeoverseN2 = [HasV8_5aOps, FeatureBF16, FeatureETE,
10201022
FeatureMatMulInt8, FeatureMTE, FeatureSVE2,
1021-
FeatureSVE2BitPerm, FeatureTRBE, FeatureCrypto];
1023+
FeatureSVE2BitPerm, FeatureTRBE, FeatureCrypto,
1024+
FeaturePerfMon];
10221025
list<SubtargetFeature> Neoverse512TVB = [HasV8_4aOps, FeatureBF16, FeatureCacheDeepPersist,
10231026
FeatureCrypto, FeatureFPARMv8, FeatureFP16FML,
10241027
FeatureFullFP16, FeatureMatMulInt8, FeatureNEON,
@@ -1046,7 +1049,7 @@ def ProcessorFeatures {
10461049
// by default for users targeting generic AArch64. The extensions do not
10471050
// affect code generated by the compiler and can be used only by explicitly
10481051
// mentioning the new system register names in assembly.
1049-
list<SubtargetFeature> Generic = [FeatureFPARMv8, FeatureNEON, FeaturePerfMon, FeatureETE];
1052+
list<SubtargetFeature> Generic = [FeatureFPARMv8, FeatureNEON, FeatureETE];
10501053
}
10511054

10521055

llvm/test/CodeGen/AArch64/readcyclecounter.ll

+33-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
1-
; RUN: llc -mtriple=aarch64-unknown-unknown -asm-verbose=false < %s |\
1+
; RUN: llc -mtriple=aarch64-unknown-unknown -mattr=+perfmon -asm-verbose=false < %s |\
22
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
33
; RUN: llc -mtriple=aarch64-unknown-unknown -mattr=-perfmon -asm-verbose=false < %s |\
44
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=NOPERFMON
5+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a53 -asm-verbose=false < %s |\
6+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
7+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a55 -asm-verbose=false < %s |\
8+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
9+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a510 -asm-verbose=false < %s |\
10+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
11+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a65 -asm-verbose=false < %s |\
12+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
13+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a76 -asm-verbose=false < %s |\
14+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
15+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a77 -asm-verbose=false < %s |\
16+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
17+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a78 -asm-verbose=false < %s |\
18+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
19+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a78c -asm-verbose=false < %s |\
20+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
21+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-a710 -asm-verbose=false < %s |\
22+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
23+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-r82 -asm-verbose=false < %s |\
24+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
25+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-x1 -asm-verbose=false < %s |\
26+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
27+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=cortex-x2 -asm-verbose=false < %s |\
28+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
29+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=neoverse-e1 -asm-verbose=false < %s |\
30+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
31+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=neoverse-n1 -asm-verbose=false < %s |\
32+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
33+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=neoverse-n2 -asm-verbose=false < %s |\
34+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
35+
; RUN: llc -mtriple=aarch64-unknown-unknown -mcpu=neoverse-v1 -asm-verbose=false < %s |\
36+
; RUN: FileCheck %s --check-prefix=CHECK --check-prefix=PERFMON
537

638
define i64 @test_readcyclecounter() nounwind {
739
; CHECK-LABEL: test_readcyclecounter:

0 commit comments

Comments
 (0)