Skip to content

Commit de5dcad

Browse files
CarolineConcattotstellar
authored andcommitted
[AArch64] Update feature dep. for Armv9.6 extensions (llvm#125874)
These features FEAT_FAMINMAX, FEAT_LUT and FEAT_FP8 depends on FEAT_NEON. Update dependency from FEAT_FP8DOT4 and FEAT_FP8DOT2. Now depends indirectly on FEAT_NEON through FEAT_FP8
1 parent 4d3d444 commit de5dcad

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

llvm/lib/Target/AArch64/AArch64Features.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,13 +473,13 @@ def FeatureD128 : ExtensionWithMArch<"d128", "D128",
473473
//===----------------------------------------------------------------------===//
474474

475475
def FeatureFAMINMAX: ExtensionWithMArch<"faminmax", "FAMINMAX", "FEAT_FAMINMAX",
476-
"Enable FAMIN and FAMAX instructions">;
476+
"Enable FAMIN and FAMAX instructions", [FeatureNEON]>;
477477

478478
def FeatureLUT: ExtensionWithMArch<"lut", "LUT", "FEAT_LUT",
479-
"Enable Lookup Table instructions">;
479+
"Enable Lookup Table instructions", [FeatureNEON]>;
480480

481481
def FeatureFP8 : ExtensionWithMArch<"fp8", "FP8", "FEAT_FP8",
482-
"Enable FP8 instructions", [FeatureFAMINMAX, FeatureLUT, FeatureBF16]>;
482+
"Enable FP8 instructions", [FeatureNEON]>;
483483

484484
def FeatureFP8FMA : ExtensionWithMArch<"fp8fma", "FP8FMA", "FEAT_FP8FMA",
485485
"Enable Armv9.5-A FP8 multiply-add instructions", [FeatureFP8]>;
@@ -488,10 +488,10 @@ def FeatureSSVE_FP8FMA : ExtensionWithMArch<"ssve-fp8fma", "SSVE_FP8FMA", "FEAT_
488488
"Enable SVE2 FP8 multiply-add instructions", [FeatureSME2, FeatureFP8]>;
489489

490490
def FeatureFP8DOT4: ExtensionWithMArch<"fp8dot4", "FP8DOT4", "FEAT_FP8DOT4",
491-
"Enable FP8 4-way dot instructions", [FeatureNEON, FeatureFP8]>;
491+
"Enable FP8 4-way dot instructions", [FeatureFP8]>;
492492

493493
def FeatureFP8DOT2: ExtensionWithMArch<"fp8dot2", "FP8DOT2", "FEAT_FP8DOT2",
494-
"Enable FP8 2-way dot instructions", [FeatureNEON, FeatureFP8]>;
494+
"Enable FP8 2-way dot instructions", [FeatureFP8]>;
495495

496496
def FeatureSSVE_FP8DOT4 : ExtensionWithMArch<"ssve-fp8dot4", "SSVE_FP8DOT4", "FEAT_SSVE_FP8DOT4",
497497
"Enable SVE2 FP8 4-way dot product instructions", [FeatureSME2, FeatureFP8]>;

llvm/lib/Target/AArch64/AArch64Processors.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ def ProcessorFeatures {
868868
FeatureSSBS, FeatureLS64, FeatureCLRBHB,
869869
FeatureSPECRES2, FeatureSVEAES, FeatureSVE2SM4,
870870
FeatureSVE2SHA3, FeatureSVE2, FeatureSVEBitPerm, FeatureETE,
871-
FeatureMEC, FeatureFP8DOT2];
871+
FeatureMEC, FeatureFAMINMAX, FeatureFP8DOT2, FeatureLUT];
872872
list<SubtargetFeature> Carmel = [HasV8_2aOps, FeatureNEON, FeatureSHA2, FeatureAES,
873873
FeatureFullFP16, FeatureCRC, FeatureLSE, FeatureRAS, FeatureRDM,
874874
FeatureFPARMv8];

llvm/unittests/TargetParser/TargetParserTest.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ AArch64ExtensionDependenciesBaseArchTestParams
18141814
{AArch64::ARMV9_6A, {"nofp", "fprcvt"}, {"fp-armv8", "fprcvt"}, {}},
18151815
{AArch64::ARMV9_6A, {"fprcvt", "nofp"}, {}, {"fp-armv8", "fprcvt"}},
18161816

1817-
// simd -> {aes, sha2, sha3, sm4, f8f16mm, f8f32mm, fp8dot4, fp8dot2}
1817+
// simd -> {aes, sha2, sha3, sm4, f8f16mm, f8f32mm, faminmax, lut, fp8}
18181818
{AArch64::ARMV8A, {"nosimd", "aes"}, {"neon", "aes"}, {}},
18191819
{AArch64::ARMV8A, {"aes", "nosimd"}, {}, {"neon", "aes"}},
18201820
{AArch64::ARMV8A, {"nosimd", "sha2"}, {"neon", "sha2"}, {}},
@@ -1827,10 +1827,18 @@ AArch64ExtensionDependenciesBaseArchTestParams
18271827
{AArch64::ARMV9_6A, {"f8f16mm", "nosimd"}, {}, {"neon", "f8f16mm"}},
18281828
{AArch64::ARMV9_6A, {"nosimd", "f8f32mm"}, {"neon", "f8f32mm"}, {}},
18291829
{AArch64::ARMV9_6A, {"f8f32mm", "nosimd"}, {}, {"neon", "f8f32mm"}},
1830-
{AArch64::ARMV9_6A, {"nosimd", "fp8dot4"}, {"neon", "fp8dot4"}, {}},
1831-
{AArch64::ARMV9_6A, {"fp8dot4", "nosimd"}, {}, {"neon", "fp8dot4"}},
1832-
{AArch64::ARMV9_6A, {"nosimd", "fp8dot2"}, {"neon", "fp8dot2"}, {}},
1833-
{AArch64::ARMV9_6A, {"fp8dot2", "nosimd"}, {}, {"neon", "fp8dot2"}},
1830+
{AArch64::ARMV9_6A, {"faminmax", "nosimd"}, {}, {"neon", "faminmax"}},
1831+
{AArch64::ARMV9_6A, {"nosimd", "faminmax"}, {"neon", "faminmax"}, {}},
1832+
{AArch64::ARMV9_6A, {"lut", "nosimd"}, {}, {"neon", "lut"}},
1833+
{AArch64::ARMV9_6A, {"nosimd", "lut"}, {"neon", "lut"}, {}},
1834+
{AArch64::ARMV9_6A, {"fp8", "nosimd"}, {}, {"neon", "fp8"}},
1835+
{AArch64::ARMV9_6A, {"nosimd", "fp8"}, {"neon", "fp8"}, {}},
1836+
1837+
// fp8 -> {fp8dot4, fp8dot2}
1838+
{AArch64::ARMV9_6A, {"nofp8", "fp8dot4"}, {"fp8", "fp8dot4"}, {}},
1839+
{AArch64::ARMV9_6A, {"fp8dot4", "nofp8"}, {}, {"fp8", "fp8dot4"}},
1840+
{AArch64::ARMV9_6A, {"nofp8", "fp8dot2"}, {"fp8", "fp8dot2"}, {}},
1841+
{AArch64::ARMV9_6A, {"fp8dot2", "nofp8"}, {}, {"fp8", "fp8dot2"}},
18341842

18351843
// simd -> {rdm, dotprod, fcma}
18361844
{AArch64::ARMV8A, {"nosimd", "rdm"}, {"neon", "rdm"}, {}},

0 commit comments

Comments
 (0)