@@ -471,23 +471,25 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
471
471
if (HasSVE2 && HasSVE2SM4)
472
472
Builder.defineMacro (" __ARM_FEATURE_SVE2_SM4" , " 1" );
473
473
474
+ if (HasSVEB16B16)
475
+ Builder.defineMacro (" __ARM_FEATURE_SVE_B16B16" , " 1" );
476
+
474
477
if (HasSME) {
475
478
Builder.defineMacro (" __ARM_FEATURE_SME" );
476
479
Builder.defineMacro (" __ARM_FEATURE_LOCALLY_STREAMING" , " 1" );
477
480
}
478
481
479
- if (HasSME2) {
480
- Builder.defineMacro (" __ARM_FEATURE_SME" , " 1" );
482
+ if (HasSME2)
481
483
Builder.defineMacro (" __ARM_FEATURE_SME2" , " 1" );
482
- Builder.defineMacro (" __ARM_FEATURE_LOCALLY_STREAMING" , " 1" );
483
- }
484
484
485
- if (HasSME2p1) {
486
- Builder.defineMacro (" __ARM_FEATURE_SME" , " 1" );
487
- Builder.defineMacro (" __ARM_FEATURE_SME2" , " 1" );
485
+ if (HasSME2p1)
488
486
Builder.defineMacro (" __ARM_FEATURE_SME2p1" , " 1" );
489
- Builder.defineMacro (" __ARM_FEATURE_LOCALLY_STREAMING" , " 1" );
490
- }
487
+
488
+ if (HasSMEF16F16)
489
+ Builder.defineMacro (" __ARM_FEATURE_SME_F16F16" , " 1" );
490
+
491
+ if (HasSMEB16B16)
492
+ Builder.defineMacro (" __ARM_FEATURE_SME_B16B16" , " 1" );
491
493
492
494
if (HasCRC)
493
495
Builder.defineMacro (" __ARM_FEATURE_CRC32" , " 1" );
@@ -749,6 +751,7 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const {
749
751
.Case (" sve" , FPU & SveMode)
750
752
.Case (" sve-bf16" , FPU & SveMode && HasBFloat16)
751
753
.Case (" sve-i8mm" , FPU & SveMode && HasMatMul)
754
+ .Case (" sve-b16b16" , HasSVEB16B16)
752
755
.Case (" f32mm" , FPU & SveMode && HasMatmulFP32)
753
756
.Case (" f64mm" , FPU & SveMode && HasMatmulFP64)
754
757
.Case (" sve2" , FPU & SveMode && HasSVE2)
@@ -763,6 +766,8 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const {
763
766
.Case (" sme-f64f64" , HasSMEF64F64)
764
767
.Case (" sme-i16i64" , HasSMEI16I64)
765
768
.Case (" sme-fa64" , HasSMEFA64)
769
+ .Case (" sme-f16f16" , HasSMEF16F16)
770
+ .Case (" sme-b16b16" , HasSMEB16B16)
766
771
.Cases (" memtag" , " memtag2" , HasMTE)
767
772
.Case (" sb" , HasSB)
768
773
.Case (" predres" , HasPredRes)
@@ -863,6 +868,8 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
863
868
HasSVE2 = true ;
864
869
HasSVE2SM4 = true ;
865
870
}
871
+ if (Feature == " +sve-b16b16" )
872
+ HasSVEB16B16 = true ;
866
873
if (Feature == " +sve2-bitperm" ) {
867
874
FPU |= NeonMode;
868
875
FPU |= SveMode;
@@ -919,6 +926,21 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
919
926
HasSVE2 = true ;
920
927
HasSMEFA64 = true ;
921
928
}
929
+ if (Feature == " +sme-f16f16" ) {
930
+ HasSME = true ;
931
+ HasSME2 = true ;
932
+ HasBFloat16 = true ;
933
+ HasFullFP16 = true ;
934
+ HasSMEF16F16 = true ;
935
+ }
936
+ if (Feature == " +sme-b16b16" ) {
937
+ HasSME = true ;
938
+ HasSME2 = true ;
939
+ HasBFloat16 = true ;
940
+ HasFullFP16 = true ;
941
+ HasSVEB16B16 = true ;
942
+ HasSMEB16B16 = true ;
943
+ }
922
944
if (Feature == " +sb" )
923
945
HasSB = true ;
924
946
if (Feature == " +predres" )
0 commit comments