Skip to content

Commit a413428

Browse files
committed
[AArch64] Decouple feature dependency expansion.
The dependency expansion step which was introduced by FMV has been erroneously used for non-FMV features, for example when parsing the target attribute. The PR #93695 has rectified most of the tests which were relying on dependency expansion of target features specified on the -cc1 command line. In this patch I am decoupling the dependency expansion of features specified on the target attribute from FMV. To do that first I am expanding FMV dependencies before passing the list of target features to initFeatureMap(). Similarly when parsing the target attribute I am reconstructing an ExtensionSet from the list of target features which was created during the command line option parsing. The attribute parsing may toggle bits of that ExtensionSet and at the end it is converted to a list of target features. Those are passed to initFeatureMap(), which no longer requires an override. A side effect of this refactoring is that features specified on the target_version attribute now supersede the command line options, which is what should be happening in the first place.
1 parent 875e911 commit a413428

File tree

13 files changed

+201
-214
lines changed

13 files changed

+201
-214
lines changed

clang/include/clang/AST/ASTContext.h

-3
Original file line numberDiff line numberDiff line change
@@ -3203,9 +3203,6 @@ class ASTContext : public RefCountedBase<ASTContext> {
32033203
/// valid feature names.
32043204
ParsedTargetAttr filterFunctionTargetAttrs(const TargetAttr *TD) const;
32053205

3206-
std::vector<std::string>
3207-
filterFunctionTargetVersionAttrs(const TargetVersionAttr *TV) const;
3208-
32093206
void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
32103207
const FunctionDecl *) const;
32113208
void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,

clang/lib/AST/ASTContext.cpp

+28-25
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#include "llvm/Support/MD5.h"
8888
#include "llvm/Support/MathExtras.h"
8989
#include "llvm/Support/raw_ostream.h"
90+
#include "llvm/TargetParser/AArch64TargetParser.h"
9091
#include "llvm/TargetParser/Triple.h"
9192
#include <algorithm>
9293
#include <cassert>
@@ -13663,17 +13664,18 @@ QualType ASTContext::getCorrespondingSignedFixedPointType(QualType Ty) const {
1366313664
}
1366413665
}
1366513666

13666-
std::vector<std::string> ASTContext::filterFunctionTargetVersionAttrs(
13667-
const TargetVersionAttr *TV) const {
13668-
assert(TV != nullptr);
13669-
llvm::SmallVector<StringRef, 8> Feats;
13670-
std::vector<std::string> ResFeats;
13671-
TV->getFeatures(Feats);
13672-
for (auto &Feature : Feats)
13673-
if (Target->validateCpuSupports(Feature.str()))
13674-
// Use '?' to mark features that came from TargetVersion.
13675-
ResFeats.push_back("?" + Feature.str());
13676-
return ResFeats;
13667+
// Given a list of FMV features, add each of their backend features to the list.
13668+
static void
13669+
getFMVBackendFeaturesFor(const llvm::SmallVectorImpl<StringRef> &FMVFeatStrings,
13670+
std::vector<std::string> &BackendFeats) {
13671+
for (StringRef F : FMVFeatStrings) {
13672+
if (auto FMVExt = llvm::AArch64::parseArchExtension(F)) {
13673+
SmallVector<StringRef, 8> Feats;
13674+
FMVExt->DependentFeatures.split(Feats, ',', -1, false);
13675+
for (StringRef F : Feats)
13676+
BackendFeats.push_back(F.str());
13677+
}
13678+
}
1367713679
}
1367813680

1367913681
ParsedTargetAttr
@@ -13708,10 +13710,12 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
1370813710

1370913711
// Make a copy of the features as passed on the command line into the
1371013712
// beginning of the additional features from the function to override.
13711-
ParsedAttr.Features.insert(
13712-
ParsedAttr.Features.begin(),
13713-
Target->getTargetOpts().FeaturesAsWritten.begin(),
13714-
Target->getTargetOpts().FeaturesAsWritten.end());
13713+
// AArch64 handles command line option features in parseTargetAttr().
13714+
if (!Target->getTriple().isAArch64())
13715+
ParsedAttr.Features.insert(
13716+
ParsedAttr.Features.begin(),
13717+
Target->getTargetOpts().FeaturesAsWritten.begin(),
13718+
Target->getTargetOpts().FeaturesAsWritten.end());
1371513719

1371613720
if (ParsedAttr.CPU != "" && Target->isValidCPUName(ParsedAttr.CPU))
1371713721
TargetCPU = ParsedAttr.CPU;
@@ -13734,13 +13738,9 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
1373413738
} else if (const auto *TC = FD->getAttr<TargetClonesAttr>()) {
1373513739
std::vector<std::string> Features;
1373613740
if (Target->getTriple().isAArch64()) {
13737-
// TargetClones for AArch64
1373813741
llvm::SmallVector<StringRef, 8> Feats;
1373913742
TC->getFeatures(Feats, GD.getMultiVersionIndex());
13740-
for (StringRef Feat : Feats)
13741-
if (Target->validateCpuSupports(Feat.str()))
13742-
// Use '?' to mark features that came from AArch64 TargetClones.
13743-
Features.push_back("?" + Feat.str());
13743+
getFMVBackendFeaturesFor(Feats, Features);
1374413744
Features.insert(Features.begin(),
1374513745
Target->getTargetOpts().FeaturesAsWritten.begin(),
1374613746
Target->getTargetOpts().FeaturesAsWritten.end());
@@ -13753,11 +13753,14 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
1375313753
}
1375413754
Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Features);
1375513755
} else if (const auto *TV = FD->getAttr<TargetVersionAttr>()) {
13756-
std::vector<std::string> Feats = filterFunctionTargetVersionAttrs(TV);
13757-
Feats.insert(Feats.begin(),
13758-
Target->getTargetOpts().FeaturesAsWritten.begin(),
13759-
Target->getTargetOpts().FeaturesAsWritten.end());
13760-
Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Feats);
13756+
llvm::SmallVector<StringRef, 8> Feats;
13757+
TV->getFeatures(Feats);
13758+
std::vector<std::string> Features;
13759+
getFMVBackendFeaturesFor(Feats, Features);
13760+
Features.insert(Features.begin(),
13761+
Target->getTargetOpts().FeaturesAsWritten.begin(),
13762+
Target->getTargetOpts().FeaturesAsWritten.end());
13763+
Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Features);
1376113764
} else {
1376213765
FeatureMap = Target->getTargetOpts().FeatureMap;
1376313766
}

clang/lib/Basic/Targets/AArch64.cpp

+27-72
Original file line numberDiff line numberDiff line change
@@ -1050,51 +1050,6 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
10501050
return true;
10511051
}
10521052

1053-
bool AArch64TargetInfo::initFeatureMap(
1054-
llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
1055-
const std::vector<std::string> &FeaturesVec) const {
1056-
std::vector<std::string> UpdatedFeaturesVec;
1057-
// Parse the CPU and add any implied features.
1058-
std::optional<llvm::AArch64::CpuInfo> CpuInfo = llvm::AArch64::parseCpu(CPU);
1059-
if (CpuInfo) {
1060-
auto Exts = CpuInfo->getImpliedExtensions();
1061-
std::vector<StringRef> CPUFeats;
1062-
llvm::AArch64::getExtensionFeatures(Exts, CPUFeats);
1063-
for (auto F : CPUFeats) {
1064-
assert((F[0] == '+' || F[0] == '-') && "Expected +/- in target feature!");
1065-
UpdatedFeaturesVec.push_back(F.str());
1066-
}
1067-
}
1068-
1069-
// Process target and dependent features. This is done in two loops collecting
1070-
// them into UpdatedFeaturesVec: first to add dependent '+'features, second to
1071-
// add target '+/-'features that can later disable some of features added on
1072-
// the first loop. Function Multi Versioning features begin with '?'.
1073-
for (const auto &Feature : FeaturesVec)
1074-
if (((Feature[0] == '?' || Feature[0] == '+')) &&
1075-
AArch64TargetInfo::doesFeatureAffectCodeGen(Feature.substr(1))) {
1076-
StringRef DepFeatures =
1077-
AArch64TargetInfo::getFeatureDependencies(Feature.substr(1));
1078-
SmallVector<StringRef, 1> AttrFeatures;
1079-
DepFeatures.split(AttrFeatures, ",");
1080-
for (auto F : AttrFeatures)
1081-
UpdatedFeaturesVec.push_back(F.str());
1082-
}
1083-
for (const auto &Feature : FeaturesVec)
1084-
if (Feature[0] != '?') {
1085-
std::string UpdatedFeature = Feature;
1086-
if (Feature[0] == '+') {
1087-
std::optional<llvm::AArch64::ExtensionInfo> Extension =
1088-
llvm::AArch64::parseArchExtension(Feature.substr(1));
1089-
if (Extension)
1090-
UpdatedFeature = Extension->Feature.str();
1091-
}
1092-
UpdatedFeaturesVec.push_back(UpdatedFeature);
1093-
}
1094-
1095-
return TargetInfo::initFeatureMap(Features, Diags, CPU, UpdatedFeaturesVec);
1096-
}
1097-
10981053
// Parse AArch64 Target attributes, which are a comma separated list of:
10991054
// "arch=<arch>" - parsed to features as per -march=..
11001055
// "cpu=<cpu>" - parsed to features as per -mcpu=.., with CPU set to <cpu>
@@ -1110,23 +1065,26 @@ ParsedTargetAttr AArch64TargetInfo::parseTargetAttr(StringRef Features) const {
11101065
bool FoundArch = false;
11111066

11121067
auto SplitAndAddFeatures = [](StringRef FeatString,
1113-
std::vector<std::string> &Features) {
1068+
std::vector<std::string> &Features,
1069+
llvm::AArch64::ExtensionSet &FeatureBits) {
11141070
SmallVector<StringRef, 8> SplitFeatures;
11151071
FeatString.split(SplitFeatures, StringRef("+"), -1, false);
11161072
for (StringRef Feature : SplitFeatures) {
1117-
StringRef FeatureName = llvm::AArch64::getArchExtFeature(Feature);
1118-
if (!FeatureName.empty())
1119-
Features.push_back(FeatureName.str());
1073+
if (FeatureBits.parseModifier(Feature))
1074+
continue;
1075+
// Pushing the original feature string to give a sema error later on
1076+
// when they get checked.
1077+
if (Feature.starts_with("no"))
1078+
Features.push_back("-" + Feature.drop_front(2).str());
11201079
else
1121-
// Pushing the original feature string to give a sema error later on
1122-
// when they get checked.
1123-
if (Feature.starts_with("no"))
1124-
Features.push_back("-" + Feature.drop_front(2).str());
1125-
else
1126-
Features.push_back("+" + Feature.str());
1080+
Features.push_back("+" + Feature.str());
11271081
}
11281082
};
11291083

1084+
llvm::AArch64::ExtensionSet FeatureBits;
1085+
// Reconstruct the bitset from the command line option features.
1086+
FeatureBits.reconstructFromParsedFeatures(getTargetOpts().FeaturesAsWritten);
1087+
11301088
for (auto &Feature : AttrFeatures) {
11311089
Feature = Feature.trim();
11321090
if (Feature.starts_with("fpmath="))
@@ -1149,9 +1107,9 @@ ParsedTargetAttr AArch64TargetInfo::parseTargetAttr(StringRef Features) const {
11491107
// Ret.Features.
11501108
if (!AI)
11511109
continue;
1152-
Ret.Features.push_back(AI->ArchFeature.str());
1110+
FeatureBits.addArchDefaults(*AI);
11531111
// Add any extra features, after the +
1154-
SplitAndAddFeatures(Split.second, Ret.Features);
1112+
SplitAndAddFeatures(Split.second, Ret.Features, FeatureBits);
11551113
} else if (Feature.starts_with("cpu=")) {
11561114
if (!Ret.CPU.empty())
11571115
Ret.Duplicate = "cpu=";
@@ -1161,33 +1119,30 @@ ParsedTargetAttr AArch64TargetInfo::parseTargetAttr(StringRef Features) const {
11611119
std::pair<StringRef, StringRef> Split =
11621120
Feature.split("=").second.trim().split("+");
11631121
Ret.CPU = Split.first;
1164-
SplitAndAddFeatures(Split.second, Ret.Features);
1122+
if (auto CpuInfo = llvm::AArch64::parseCpu(Ret.CPU)) {
1123+
FeatureBits.addCPUDefaults(*CpuInfo);
1124+
SplitAndAddFeatures(Split.second, Ret.Features, FeatureBits);
1125+
}
11651126
}
11661127
} else if (Feature.starts_with("tune=")) {
11671128
if (!Ret.Tune.empty())
11681129
Ret.Duplicate = "tune=";
11691130
else
11701131
Ret.Tune = Feature.split("=").second.trim();
11711132
} else if (Feature.starts_with("+")) {
1172-
SplitAndAddFeatures(Feature, Ret.Features);
1173-
} else if (Feature.starts_with("no-")) {
1174-
StringRef FeatureName =
1175-
llvm::AArch64::getArchExtFeature(Feature.split("-").second);
1176-
if (!FeatureName.empty())
1177-
Ret.Features.push_back("-" + FeatureName.drop_front(1).str());
1178-
else
1179-
Ret.Features.push_back("-" + Feature.split("-").second.str());
1133+
SplitAndAddFeatures(Feature, Ret.Features, FeatureBits);
11801134
} else {
1181-
// Try parsing the string to the internal target feature name. If it is
1182-
// invalid, add the original string (which could already be an internal
1183-
// name). These should be checked later by isValidFeatureName.
1184-
StringRef FeatureName = llvm::AArch64::getArchExtFeature(Feature);
1185-
if (!FeatureName.empty())
1186-
Ret.Features.push_back(FeatureName.str());
1135+
if (FeatureBits.parseModifier(Feature))
1136+
continue;
1137+
// Pushing the original feature string to give a sema error later on
1138+
// when they get checked.
1139+
if (Feature.starts_with("no-"))
1140+
Ret.Features.push_back("-" + Feature.drop_front(3).str());
11871141
else
11881142
Ret.Features.push_back("+" + Feature.str());
11891143
}
11901144
}
1145+
FeatureBits.toLLVMFeatureList(Ret.Features);
11911146
return Ret;
11921147
}
11931148

clang/lib/Basic/Targets/AArch64.h

-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo {
107107
unsigned multiVersionSortPriority(StringRef Name) const override;
108108
unsigned multiVersionFeatureCost() const override;
109109

110-
bool
111-
initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
112-
StringRef CPU,
113-
const std::vector<std::string> &FeaturesVec) const override;
114110
bool useFP16ConversionIntrinsics() const override {
115111
return false;
116112
}

clang/test/CodeGen/aarch64-cpu-supports-target.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ int test_versions() {
4848
return code();
4949
}
5050
// CHECK: attributes #0 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
51-
// CHECK: attributes #1 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+neon" }
51+
// CHECK: attributes #1 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+fp-armv8,+neon" }
5252
// CHECK: attributes #2 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+fp-armv8,+fullfp16,+neon,+sve" }

clang/test/CodeGen/aarch64-sme-intrinsics/aarch64-sme-attrs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme \
1+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -target-feature +bf16 \
22
// RUN: -disable-O0-optnone -Werror -emit-llvm -o - %s \
33
// RUN: | opt -S -passes=mem2reg \
44
// RUN: | opt -S -passes=inline \

clang/test/CodeGen/aarch64-targetattr.c

+20-21
Original file line numberDiff line numberDiff line change
@@ -58,58 +58,57 @@ void v1msve() {}
5858
// CHECK-LABEL: @plussve() #12
5959
__attribute__((target("+sve")))
6060
void plussve() {}
61-
// CHECK-LABEL: @plussveplussve2() #13
61+
// CHECK-LABEL: @plussveplussve2() #12
6262
__attribute__((target("+sve+nosve2")))
6363
void plussveplussve2() {}
64-
// CHECK-LABEL: @plussveminusnosve2() #13
64+
// CHECK-LABEL: @plussveminusnosve2() #12
6565
__attribute__((target("sve,no-sve2")))
6666
void plussveminusnosve2() {}
67-
// CHECK-LABEL: @plusfp16() #14
67+
// CHECK-LABEL: @plusfp16() #13
6868
__attribute__((target("+fp16")))
6969
void plusfp16() {}
7070

71-
// CHECK-LABEL: @all() #15
71+
// CHECK-LABEL: @all() #14
7272
__attribute__((target("cpu=neoverse-n1,tune=cortex-a710,arch=armv8.6-a+sve2")))
7373
void all() {}
74-
// CHECK-LABEL: @allplusbranchprotection() #16
74+
// CHECK-LABEL: @allplusbranchprotection() #15
7575
__attribute__((target("cpu=neoverse-n1,tune=cortex-a710,arch=armv8.6-a+sve2,branch-protection=standard")))
7676
void allplusbranchprotection() {}
7777

7878
// These tests check that the user facing and internal llvm name are both accepted.
79-
// CHECK-LABEL: @plusnoneon() #17
79+
// CHECK-LABEL: @plusnoneon() #16
8080
__attribute__((target("+noneon")))
8181
void plusnoneon() {}
82-
// CHECK-LABEL: @plusnosimd() #17
82+
// CHECK-LABEL: @plusnosimd() #16
8383
__attribute__((target("+nosimd")))
8484
void plusnosimd() {}
85-
// CHECK-LABEL: @noneon() #17
85+
// CHECK-LABEL: @noneon() #16
8686
__attribute__((target("no-neon")))
8787
void noneon() {}
88-
// CHECK-LABEL: @nosimd() #17
88+
// CHECK-LABEL: @nosimd() #16
8989
__attribute__((target("no-simd")))
9090
void nosimd() {}
9191

9292
// This isn't part of the standard interface, but test that -arch features should not apply anything else.
93-
// CHECK-LABEL: @minusarch() #18
93+
// CHECK-LABEL: @minusarch() #17
9494
__attribute__((target("no-v9.3a")))
9595
void minusarch() {}
9696

9797
// CHECK: attributes #0 = { {{.*}} "target-features"="+crc,+fp-armv8,+lse,+neon,+ras,+rdm,+v8.1a,+v8.2a,+v8a" }
9898
// CHECK: attributes #1 = { {{.*}} "target-features"="+crc,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rdm,+sve,+v8.1a,+v8.2a,+v8a" }
9999
// CHECK: attributes #2 = { {{.*}} "target-features"="+crc,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rdm,+sve,+sve2,+v8.1a,+v8.2a,+v8a" }
100-
// CHECK: attributes #3 = { {{.*}} "target-features"="+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" }
101-
// CHECK: attributes #4 = { {{.*}} "target-cpu"="cortex-a710" "target-features"="+bf16,+complxnum,+crc,+dotprod,+flagm,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+mte,+neon,+pauth,+ras,+rcpc,+rdm,+sb,+sve,+sve2,+sve2-bitperm" }
100+
// CHECK: attributes #3 = { {{.*}} "target-features"="+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" }
101+
// CHECK: attributes #4 = { {{.*}} "target-cpu"="cortex-a710" "target-features"="+bf16,+complxnum,+crc,+dotprod,+flagm,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+mte,+neon,+pauth,+ras,+rcpc,+rdm,+sb,+sve,+sve2,+sve2-bitperm,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8a,+v9a" }
102102
// CHECK: attributes #5 = { {{.*}} "tune-cpu"="cortex-a710" }
103103
// CHECK: attributes #6 = { {{.*}} "target-cpu"="generic" }
104104
// CHECK: attributes #7 = { {{.*}} "tune-cpu"="generic" }
105-
// CHECK: attributes #8 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+crc,+dotprod,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs" "tune-cpu"="cortex-a710" }
105+
// CHECK: attributes #8 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+crc,+dotprod,+fp-armv8,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+v8.1a,+v8.2a,+v8a" "tune-cpu"="cortex-a710" }
106106
// CHECK: attributes #9 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+sve" "tune-cpu"="cortex-a710" }
107-
// CHECK: attributes #10 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,+sve,+sve2" }
108-
// CHECK: attributes #11 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,-sve" }
107+
// CHECK: attributes #10 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8a" }
108+
// CHECK: attributes #11 = { {{.*}} "target-cpu"="neoverse-v1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+rand,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+spe,+ssbs,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8a,-sve" }
109109
// CHECK: attributes #12 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+sve" }
110-
// CHECK: attributes #13 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon,+sve,-sve2" }
111-
// CHECK: attributes #14 = { {{.*}} "target-features"="+fullfp16" }
112-
// CHECK: attributes #15 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
113-
// CHECK: attributes #16 = { {{.*}} "branch-target-enforcement"="true" "guarded-control-stack"="true" {{.*}} "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
114-
// CHECK: attributes #17 = { {{.*}} "target-features"="-neon" }
115-
// CHECK: attributes #18 = { {{.*}} "target-features"="-v9.3a" }
110+
// CHECK: attributes #13 = { {{.*}} "target-features"="+fp-armv8,+fullfp16,+neon" }
111+
// CHECK: attributes #14 = { {{.*}} "target-cpu"="neoverse-n1" "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
112+
// CHECK: attributes #15 = { {{.*}} "branch-target-enforcement"="true" "guarded-control-stack"="true" {{.*}} "target-features"="+aes,+bf16,+complxnum,+crc,+dotprod,+fp-armv8,+fullfp16,+i8mm,+jsconv,+lse,+neon,+pauth,+ras,+rcpc,+rdm,+sha2,+spe,+ssbs,+sve,+sve2,+v8.1a,+v8.2a,+v8.3a,+v8.4a,+v8.5a,+v8.6a,+v8a" "tune-cpu"="cortex-a710" }
113+
// CHECK-NOT: attributes #16 = {{.*}} "target-features"
114+
// CHECK: attributes #17 = { {{.*}} "target-features"="-v9.3a" }

0 commit comments

Comments
 (0)