diff --git a/libc/src/__support/macros/properties/cpu_features.h b/libc/src/__support/macros/properties/cpu_features.h --- a/libc/src/__support/macros/properties/cpu_features.h +++ b/libc/src/__support/macros/properties/cpu_features.h @@ -36,7 +36,7 @@ #define LIBC_TARGET_CPU_HAS_AVX512BW #endif -#if defined(__ARM_FEATURE_FMA) || defined(__AVX2__) || defined(__FMA__) || \ +#if defined(__ARM_FEATURE_FMA) || (defined(__AVX2__) && defined(__FMA__)) || \ defined(__LIBC_RISCV_USE_FMA) #define LIBC_TARGET_CPU_HAS_FMA #endif