@@ -420,6 +420,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
420420 HasAMXTILE = true ;
421421 } else if (Feature == " +amx-complex" ) {
422422 HasAMXCOMPLEX = true ;
423+ } else if (Feature == " +amx-fp8" ) {
424+ HasAMXFP8 = true ;
423425 } else if (Feature == " +cmpccxadd" ) {
424426 HasCMPCCXADD = true ;
425427 } else if (Feature == " +raoint" ) {
@@ -939,6 +941,8 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts,
939941 Builder.defineMacro (" __AMX_FP16__" );
940942 if (HasAMXCOMPLEX)
941943 Builder.defineMacro (" __AMX_COMPLEX__" );
944+ if (HasAMXFP8)
945+ Builder.defineMacro (" __AMX_FP8__" );
942946 if (HasCMPCCXADD)
943947 Builder.defineMacro (" __CMPCCXADD__" );
944948 if (HasRAOINT)
@@ -1069,6 +1073,7 @@ bool X86TargetInfo::isValidFeatureName(StringRef Name) const {
10691073 .Case (" amx-fp16" , true )
10701074 .Case (" amx-int8" , true )
10711075 .Case (" amx-tile" , true )
1076+ .Case (" amx-fp8" , true )
10721077 .Case (" avx" , true )
10731078 .Case (" avx10.1-256" , true )
10741079 .Case (" avx10.1-512" , true )
@@ -1187,6 +1192,7 @@ bool X86TargetInfo::hasFeature(StringRef Feature) const {
11871192 .Case (" amx-fp16" , HasAMXFP16)
11881193 .Case (" amx-int8" , HasAMXINT8)
11891194 .Case (" amx-tile" , HasAMXTILE)
1195+ .Case (" amx-fp8" , HasAMXFP8)
11901196 .Case (" avx" , SSELevel >= AVX)
11911197 .Case (" avx10.1-256" , HasAVX10_1)
11921198 .Case (" avx10.1-512" , HasAVX10_1_512)
0 commit comments