Skip to content

Commit 5d8eadc

Browse files
SpencerAbsonpradt2
authored andcommitted
[AArch64] Adopt updated B16B16 target flags
The enablement of SVE/SME non-widening BFloat16 instructions was recently changed in response to an architecture update, in which: - FEAT_SVE_B16B16 was weakened - FEAT_SME_B16B16 was introduced New flags, 'sve-b16b16' and 'sme-b16b16' were introduced to replace the existing 'b16b16'. This was acheived in the below two patches. - llvm#101480 - llvm#102501 Ideally, the interface change introduced here will be valid in LLVM-19. We do not see it necessary to back-port the entire change, but just to add 'sme-b16b16' and 'sve-b16b16' as aliases to the existing (and unchanged) 'b16b16' and 'sme2' flags which together cover all of these features. The predication of Bf16 variants of svmin/svminnm and svmax/svmaxnm is also fixed in this change.
1 parent 77cf874 commit 5d8eadc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/lib/Target/AArch64/AArch64Features.td

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,15 @@ def FeatureSMEB16B16 : ExtensionWithMArch<"sme-b16b16", "SMEB16B16", "FEAT_SME_B
441441
"Enable SME2.1 ZA-targeting non-widening BFloat16 instructions",
442442
[FeatureSME2, FeatureSVEB16B16]>;
443443

444+
// FeatureSVEB16B16 and FeatureSMEB16B16 act as aliases for {FeatureB16B16}, and
445+
// {FeatureB16B16, FeatureSME2} respectively. This allows LLVM-20 interfacing programs
446+
// that use '+sve-b16b16' and '+sme-b16b16' to compile in LLVM-19.
447+
def FeatureSVEB16B16 : ExtensionWithMArch<"sve-b16b16", "SVEB16B16", "FEAT_SVE_B16B16",
448+
"Enable SVE2 non-widening and SME2 Z-targeting non-widening BFloat16 instructions", [FeatureB16B16]>;
449+
450+
def FeatureSMEB16B16 : ExtensionWithMArch<"sme-b16b16", "SMEB16B16", "FEAT_SME_B16B16",
451+
"Enable SME2.1 ZA-targeting non-widening BFloat16 instructions", [FeatureSME2, FeatureB16B16]>;
452+
444453
def FeatureSMEF16F16 : ExtensionWithMArch<"sme-f16f16", "SMEF16F16", "FEAT_SME_F16F16",
445454
"Enable SME non-widening Float16 instructions", [FeatureSME2]>;
446455

0 commit comments

Comments
 (0)