diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2017-03-02 11:04:01 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2017-03-02 11:04:01 +0000 |
commit | 6d03bdcc8196414a7d14d21629257ea746e82385 (patch) | |
tree | 479218dbc398682ff55cd867e71940dd85a0c39e /libgfortran/generated/matmul_i1.c | |
parent | db9f7f657e035786836f8371b56d876a9bec46bc (diff) | |
download | gcc-6d03bdcc8196414a7d14d21629257ea746e82385.tar.gz |
re PR libfortran/78379 (Processor-specific versions for matmul)
2017-03-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78379
* m4/matmul.m4: (matmul_'rtype_code`_avx2): Also generate for
reals. Add fma to target options.
(matmul_'rtype_code`): Call AVX2 only if FMA is available.
* generated/matmul_c10.c: Regenerated.
* generated/matmul_c16.c: Regenerated.
* generated/matmul_c4.c: Regenerated.
* generated/matmul_c8.c: Regenerated.
* generated/matmul_i1.c: Regenerated.
* generated/matmul_i16.c: Regenerated.
* generated/matmul_i2.c: Regenerated.
* generated/matmul_i4.c: Regenerated.
* generated/matmul_i8.c: Regenerated.
* generated/matmul_r10.c: Regenerated.
* generated/matmul_r16.c: Regenerated.
* generated/matmul_r4.c: Regenerated.
* generated/matmul_r8.c: Regenerated.
From-SVN: r245836
Diffstat (limited to 'libgfortran/generated/matmul_i1.c')
-rw-r--r-- | libgfortran/generated/matmul_i1.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libgfortran/generated/matmul_i1.c b/libgfortran/generated/matmul_i1.c index 621183671ee..924826338d8 100644 --- a/libgfortran/generated/matmul_i1.c +++ b/libgfortran/generated/matmul_i1.c @@ -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; |