Skip to content

Commit 08f819e

Browse files
committed
[AArch64] Add FeatureFuseCCSelect to a number of CPU configurations.
This marks CMP+CSel as fusable according to the SWOGs of cortex-a78 cortex-a710 cortex-a715 cortex-a720 cortex-a725 cortex-x4 cortex-x925 neoverse-n2 neoverse-n3 neoverse-v1 neoverse-v2 neoverse-v3
1 parent 5d099c2 commit 08f819e

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

llvm/lib/Target/AArch64/AArch64Processors.td

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def TuneA78 : SubtargetFeature<"a78", "ARMProcFamily", "CortexA78",
134134
FeatureCmpBccFusion,
135135
FeatureFuseAES,
136136
FeatureFuseAdrpAdd,
137+
FeatureFuseCCSelect,
137138
FeatureAddrLSLSlow14,
138139
FeatureALULSLFast,
139140
FeaturePostRAScheduler,
@@ -146,6 +147,7 @@ def TuneA78AE : SubtargetFeature<"a78ae", "ARMProcFamily",
146147
FeatureCmpBccFusion,
147148
FeatureFuseAES,
148149
FeatureFuseAdrpAdd,
150+
FeatureFuseCCSelect,
149151
FeatureAddrLSLSlow14,
150152
FeatureALULSLFast,
151153
FeaturePostRAScheduler,
@@ -158,6 +160,7 @@ def TuneA78C : SubtargetFeature<"a78c", "ARMProcFamily",
158160
FeatureCmpBccFusion,
159161
FeatureFuseAES,
160162
FeatureFuseAdrpAdd,
163+
FeatureFuseCCSelect,
161164
FeatureAddrLSLSlow14,
162165
FeatureALULSLFast,
163166
FeaturePostRAScheduler,
@@ -169,6 +172,7 @@ def TuneA710 : SubtargetFeature<"a710", "ARMProcFamily", "CortexA710",
169172
FeatureCmpBccFusion,
170173
FeatureFuseAES,
171174
FeatureFuseAdrpAdd,
175+
FeatureFuseCCSelect,
172176
FeatureALULSLFast,
173177
FeaturePostRAScheduler,
174178
FeatureEnableSelectOptimize,
@@ -181,6 +185,7 @@ def TuneA715 : SubtargetFeature<"a715", "ARMProcFamily", "CortexA715",
181185
FeatureCmpBccFusion,
182186
FeatureALULSLFast,
183187
FeatureFuseAdrpAdd,
188+
FeatureFuseCCSelect,
184189
FeatureEnableSelectOptimize,
185190
FeaturePredictableSelectIsExpensive]>;
186191

@@ -191,6 +196,7 @@ def TuneA720 : SubtargetFeature<"a720", "ARMProcFamily", "CortexA720",
191196
FeatureCmpBccFusion,
192197
FeatureALULSLFast,
193198
FeatureFuseAdrpAdd,
199+
FeatureFuseCCSelect,
194200
FeatureEnableSelectOptimize,
195201
FeaturePredictableSelectIsExpensive]>;
196202

@@ -201,6 +207,7 @@ def TuneA720AE : SubtargetFeature<"a720ae", "ARMProcFamily", "CortexA720",
201207
FeatureCmpBccFusion,
202208
FeatureALULSLFast,
203209
FeatureFuseAdrpAdd,
210+
FeatureFuseCCSelect,
204211
FeatureEnableSelectOptimize,
205212
FeaturePredictableSelectIsExpensive]>;
206213

@@ -212,6 +219,7 @@ def TuneA725 : SubtargetFeature<"cortex-a725", "ARMProcFamily",
212219
FeatureCmpBccFusion,
213220
FeatureALULSLFast,
214221
FeatureFuseAdrpAdd,
222+
FeatureFuseCCSelect,
215223
FeatureEnableSelectOptimize,
216224
FeaturePredictableSelectIsExpensive]>;
217225

@@ -262,6 +270,7 @@ def TuneX4 : SubtargetFeature<"cortex-x4", "ARMProcFamily", "CortexX4",
262270
"Cortex-X4 ARM processors", [
263271
FeatureALULSLFast,
264272
FeatureFuseAdrpAdd,
273+
FeatureFuseCCSelect,
265274
FeatureFuseAES,
266275
FeaturePostRAScheduler,
267276
FeatureEnableSelectOptimize,
@@ -273,6 +282,7 @@ def TuneX925 : SubtargetFeature<"cortex-x925", "ARMProcFamily",
273282
"CortexX925", "Cortex-X925 ARM processors",[
274283
FeatureALULSLFast,
275284
FeatureFuseAdrpAdd,
285+
FeatureFuseCCSelect,
276286
FeatureFuseAES,
277287
FeaturePostRAScheduler,
278288
FeatureEnableSelectOptimize,
@@ -536,6 +546,7 @@ def TuneNeoverseN2 : SubtargetFeature<"neoversen2", "ARMProcFamily", "NeoverseN2
536546
"Neoverse N2 ARM processors", [
537547
FeatureFuseAES,
538548
FeatureFuseAdrpAdd,
549+
FeatureFuseCCSelect,
539550
FeatureALULSLFast,
540551
FeaturePostRAScheduler,
541552
FeatureEnableSelectOptimize,
@@ -547,6 +558,7 @@ def TuneNeoverseN3 : SubtargetFeature<"neoversen3", "ARMProcFamily", "NeoverseN3
547558
FeaturePostRAScheduler,
548559
FeatureALULSLFast,
549560
FeatureFuseAdrpAdd,
561+
FeatureFuseCCSelect,
550562
FeatureEnableSelectOptimize,
551563
FeaturePredictableSelectIsExpensive]>;
552564

@@ -563,6 +575,7 @@ def TuneNeoverseV1 : SubtargetFeature<"neoversev1", "ARMProcFamily", "NeoverseV1
563575
"Neoverse V1 ARM processors", [
564576
FeatureFuseAES,
565577
FeatureFuseAdrpAdd,
578+
FeatureFuseCCSelect,
566579
FeatureAddrLSLSlow14,
567580
FeatureALULSLFast,
568581
FeaturePostRAScheduler,
@@ -575,6 +588,7 @@ def TuneNeoverseV2 : SubtargetFeature<"neoversev2", "ARMProcFamily", "NeoverseV2
575588
FeatureFuseAES,
576589
FeatureCmpBccFusion,
577590
FeatureFuseAdrpAdd,
591+
FeatureFuseCCSelect,
578592
FeatureALULSLFast,
579593
FeaturePostRAScheduler,
580594
FeatureEnableSelectOptimize,
@@ -588,6 +602,7 @@ def TuneNeoverseV3 : SubtargetFeature<"neoversev3", "ARMProcFamily", "NeoverseV3
588602
FeatureFuseAES,
589603
FeatureALULSLFast,
590604
FeatureFuseAdrpAdd,
605+
FeatureFuseCCSelect,
591606
FeaturePostRAScheduler,
592607
FeatureEnableSelectOptimize,
593608
FeatureAvoidLDAPUR,
@@ -598,6 +613,7 @@ def TuneNeoverseV3AE : SubtargetFeature<"neoversev3AE", "ARMProcFamily", "Neover
598613
FeatureFuseAES,
599614
FeatureALULSLFast,
600615
FeatureFuseAdrpAdd,
616+
FeatureFuseCCSelect,
601617
FeaturePostRAScheduler,
602618
FeatureEnableSelectOptimize,
603619
FeatureAvoidLDAPUR,

llvm/test/CodeGen/AArch64/misched-fusion-csel.ll

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m3 | FileCheck %s
33
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m4 | FileCheck %s
44
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=exynos-m5 | FileCheck %s
5+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a78 | FileCheck %s
6+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a710 | FileCheck %s
7+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a715 | FileCheck %s
8+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a720 | FileCheck %s
9+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-a725 | FileCheck %s
10+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-x4 | FileCheck %s
11+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=cortex-x925 | FileCheck %s
12+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=neoverse-n2 | FileCheck %s
13+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=neoverse-n3 | FileCheck %s
14+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=neoverse-v1 | FileCheck %s
15+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=neoverse-v2 | FileCheck %s
16+
; RUN: llc %s -o - -mtriple=aarch64-unknown -mcpu=neoverse-v3 | FileCheck %s
517

618
target triple = "aarch64-unknown"
719

0 commit comments

Comments
 (0)