Add size check to vector-matrix matmul.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 19 Mar 2021 19:49:38 +0000 (20:49 +0100)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Fri, 19 Mar 2021 19:52:20 +0000 (20:52 +0100)
commit83855386c41b78c92f4445e4d0e6397372136c90
treecf6d44fe148b30d1ecfaf33d46d20a8dec89e148
parentd81019db099ad95febbb2d4b4afd8cbe95762062
Add size check to vector-matrix matmul.

It turns out the library version is much faster for vector-matrix
multiplications for large sizes than what inlining can produce.
Use size checks for switching between this and inlining for
that case to.

gcc/fortran/ChangeLog:

* frontend-passes.c (inline_limit_check): Add rank_a
argument. If a is rank 1, set the second dimension to 1.
(inline_matmul_assign): Pass rank_a argument to inline_limit_check.
(call_external_blas): Likewise.

gcc/testsuite/ChangeLog:

* gfortran.dg/inline_matmul_6.f90: Adjust count for
  _gfortran_matmul.
gcc/fortran/frontend-passes.c
gcc/testsuite/gfortran.dg/inline_matmul_6.f90