]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgfortran/generated/matmul_i1.c
re PR libfortran/78379 (Processor-specific versions for matmul)
[thirdparty/gcc.git] / libgfortran / generated / matmul_i1.c
index 621183671ee67eef2e2fd2a9f671e8d287b84a18..924826338d8d909b125f4e0f4c0da1a6ce95f3e0 100644 (file)
@@ -74,9 +74,6 @@ extern void matmul_i1 (gfc_array_i1 * const restrict retarray,
        int blas_limit, blas_call gemm);
 export_proto(matmul_i1);
 
-
-
-
 /* Put exhaustive list of possible architectures here here, ORed together.  */
 
 #if defined(HAVE_AVX) || defined(HAVE_AVX2) || defined(HAVE_AVX512F)
@@ -628,7 +625,7 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray,
 static void
 matmul_i1_avx2 (gfc_array_i1 * const restrict retarray, 
        gfc_array_i1 * const restrict a, gfc_array_i1 * const restrict b, int try_blas,
-       int blas_limit, blas_call gemm) __attribute__((__target__("avx2")));
+       int blas_limit, blas_call gemm) __attribute__((__target__("avx2,fma")));
 static void
 matmul_i1_avx2 (gfc_array_i1 * const restrict retarray, 
        gfc_array_i1 * const restrict a, gfc_array_i1 * const restrict b, int try_blas,
@@ -2277,7 +2274,8 @@ void matmul_i1 (gfc_array_i1 * const restrict retarray,
 #endif  /* HAVE_AVX512F */
 
 #ifdef HAVE_AVX2
-         if (__cpu_model.__cpu_features[0] & (1 << FEATURE_AVX2))
+         if ((__cpu_model.__cpu_features[0] & (1 << FEATURE_AVX2))
+            && (__cpu_model.__cpu_features[0] & (1 << FEATURE_FMA)))
            {
              matmul_p = matmul_i1_avx2;
              goto tailcall;