Skip to content

Commit b0b575b

Browse files
committed
Remove user-facing option -mcpa-codegen and use backend option instead
1 parent 3e6ccee commit b0b575b

File tree

6 files changed

+5
-18
lines changed

6 files changed

+5
-18
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5187,11 +5187,6 @@ def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">, Group<m_aarch64_Fe
51875187
Visibility<[ClangOption, FlangOption]>,
51885188
HelpText<"Specify the size in bits of an SVE vector register. Defaults to the"
51895189
" vector length agnostic value of \"scalable\". (AArch64 only)">;
5190-
5191-
def mcpa_codegen : Flag<["-"], "mcpa-codegen">,
5192-
Visibility<[ClangOption]>,
5193-
Group<m_aarch64_Features_Group>,
5194-
HelpText<"Generate scalar FEAT_CPA instructions (AArch64 only)">;
51955190
} // let Flags = [TargetSpecific]
51965191

51975192
def mvscale_min_EQ : Joined<["-"], "mvscale-min=">,

clang/lib/Driver/ToolChains/Arch/AArch64.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ void aarch64::getAArch64TargetFeatures(const Driver &D,
249249
Extensions.disable(llvm::AArch64::AEK_FP);
250250
}
251251

252-
// -mcpa-codegen enables generation of scalar FEAT_CPA instructions
253-
if (Args.getLastArg(options::OPT_mcpa_codegen)) {
254-
Features.push_back("+cpa-codegen");
255-
}
256-
257252
// En/disable crc
258253
if (Arg *A = Args.getLastArg(options::OPT_mcrc, options::OPT_mnocrc)) {
259254
if (A->getOption().matches(options::OPT_mcrc))

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30427,5 +30427,5 @@ bool AArch64TargetLowering::isTypeDesirableForOp(unsigned Opc, EVT VT) const {
3042730427

3042830428
bool AArch64TargetLowering::shouldPreservePtrArith(const Function &F,
3042930429
EVT VT) const {
30430-
return Subtarget->hasCPA() && Subtarget->hasCPACodegen();
30430+
return Subtarget->hasCPA() && UseFEATCPACodegen;
3043130431
}

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,6 @@ def HasGCS : Predicate<"Subtarget->hasGCS()">,
373373
AssemblerPredicateWithAll<(all_of FeatureGCS), "gcs">;
374374
def HasCPA : Predicate<"Subtarget->hasCPA()">,
375375
AssemblerPredicateWithAll<(all_of FeatureCPA), "cpa">;
376-
def HasCPACodegen : Predicate<"Subtarget->hasCPACodegen()">,
377-
AssemblerPredicateWithAll<(all_of FeatureCPACodegen),
378-
"cpa-codegen">;
379376
def IsLE : Predicate<"Subtarget->isLittleEndian()">;
380377
def IsBE : Predicate<"!Subtarget->isLittleEndian()">;
381378
def IsWindows : Predicate<"Subtarget->isTargetWindows()">;

llvm/test/CodeGen/AArch64/cpa-globalisel.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa,cpa-codegen -O0 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O0
3-
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa,cpa-codegen -O3 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O3
2+
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O0 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O0
3+
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O3 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O3
44
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=-cpa -O0 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-NOCPA-O0
55
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=-cpa -O3 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-NOCPA-O3
66

llvm/test/CodeGen/AArch64/cpa-selectiondag.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa,cpa-codegen -O0 -global-isel=0 -fast-isel=0 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O0
3-
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa,cpa-codegen -O3 -global-isel=0 -fast-isel=0 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O3
2+
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O0 -global-isel=0 -fast-isel=0 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O0
3+
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O3 -global-isel=0 -fast-isel=0 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-CPA-O3
44
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=-cpa -O0 -global-isel=0 -fast-isel=0 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-NOCPA-O0
55
; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=-cpa -O3 -global-isel=0 -fast-isel=0 %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-NOCPA-O3
66

0 commit comments

Comments
 (0)