backport: re PR fortran/80975 (matmul for zero-length arrays)

2017-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backport from trunk
	PR fortran/80975
	* m4/matmul_internal.m4:  Move zeroing before early return.
	* 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.

2017-06-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

	Backport from trunk
	PR fortran/80975
	* gfortran.dg/matmul_16.f90: New test.
	* gfortran.dg/inline_matmul_18.f90: New test.

From-SVN: r248935
This commit is contained in:
Thomas Koenig 2017-06-06 22:23:07 +00:00
parent 3179bb54ce
commit 88c502146c
19 changed files with 322 additions and 266 deletions

View File

@ -1,3 +1,10 @@
2017-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/80975
* gfortran.dg/matmul_16.f90: New test.
* gfortran.dg/inline_matmul_18.f90: New test.
2017-06-06 David S. Miller <davem@davemloft.net>
* gcc.target/sparc/sparc-ret-3.c: New test.

View File

@ -0,0 +1,16 @@
! { dg-do run }
! { dg-options "-O -finline-matmul-limit=100 -fdump-tree-optimized" }
! PR 80975 - this did not zero the result array in the library version;
! make sure this also doesn't happen in the inline version.
program bogus_matmul
implicit none
real :: M(3,0), v(0), w(3)
w = 7
w = matmul(M,v)
if( any(w .ne. 0) ) then
call abort
end if
end program bogus_matmul
! { dg-final { scan-tree-dump-times "matmul_r4" 0 "optimized" } }

View File

@ -0,0 +1,13 @@
! { dg-do run }
! { dg-options "-finline-matmul-limit=0" }
! PR 80975 - this did not zero the result array
program bogus_matmul
implicit none
real :: M(3,0), v(0), w(3)
w = 7
w = matmul(M,v)
if( any(w .ne. 0) ) then
call abort
end if
end program bogus_matmul

View File

@ -1,3 +1,22 @@
2017-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/80975
* m4/matmul_internal.m4: Move zeroing before early return.
* 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.
2017-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from trunk

View File

@ -137,8 +137,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/../ltversion.m4 $(top_srcdir)/../lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/../config/acx.m4 \
$(top_srcdir)/../config/no-executables.m4 \
$(top_srcdir)/../config/math.m4 $(top_srcdir)/../libtool.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/../config/math.m4 \
$(top_srcdir)/../config/ax_check_define.m4 \
$(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \

View File

@ -307,15 +307,15 @@ matmul_c10_avx (gfc_array_c10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_c10_avx2 (gfc_array_c10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_c10_avx512f (gfc_array_c10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_c10_vanilla (gfc_array_c10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_c10 (gfc_array_c10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_c16_avx (gfc_array_c16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_c16_avx2 (gfc_array_c16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_c16_avx512f (gfc_array_c16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_c16_vanilla (gfc_array_c16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_c16 (gfc_array_c16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_c4_avx (gfc_array_c4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_c4_avx2 (gfc_array_c4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_c4_avx512f (gfc_array_c4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_c4_vanilla (gfc_array_c4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_c4 (gfc_array_c4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_c8_avx (gfc_array_c8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_c8_avx2 (gfc_array_c8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_c8_avx512f (gfc_array_c8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_c8_vanilla (gfc_array_c8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_c8 (gfc_array_c8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_COMPLEX_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_1)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_i1_avx2 (gfc_array_i1 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_1)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_i1_avx512f (gfc_array_i1 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_1)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_i1_vanilla (gfc_array_i1 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_1)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_i1 (gfc_array_i1 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_1)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_i16_avx (gfc_array_i16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_i16_avx2 (gfc_array_i16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_i16_avx512f (gfc_array_i16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_i16_vanilla (gfc_array_i16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_i16 (gfc_array_i16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_i2_avx (gfc_array_i2 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_2)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_i2_avx2 (gfc_array_i2 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_2)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_i2_avx512f (gfc_array_i2 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_2)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_i2_vanilla (gfc_array_i2 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_2)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_i2 (gfc_array_i2 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_2)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_i4 (gfc_array_i4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_i8_avx (gfc_array_i8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_i8_avx2 (gfc_array_i8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_i8_avx512f (gfc_array_i8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_i8_vanilla (gfc_array_i8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_i8 (gfc_array_i8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_INTEGER_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_r10_avx (gfc_array_r10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_r10_avx2 (gfc_array_r10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_r10_avx512f (gfc_array_r10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_r10_vanilla (gfc_array_r10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_r10 (gfc_array_r10 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_10)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_r16_avx (gfc_array_r16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_r16_avx2 (gfc_array_r16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_r16_avx512f (gfc_array_r16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_r16_vanilla (gfc_array_r16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_r16 (gfc_array_r16 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_16)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_r4_avx (gfc_array_r4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_r4_avx2 (gfc_array_r4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_r4_avx512f (gfc_array_r4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_r4_vanilla (gfc_array_r4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_r4 (gfc_array_r4 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_4)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -307,15 +307,15 @@ matmul_r8_avx (gfc_array_r8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -850,15 +850,15 @@ matmul_r8_avx2 (gfc_array_r8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1393,15 +1393,15 @@ matmul_r8_avx512f (gfc_array_r8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -1932,15 +1932,15 @@ matmul_r8_vanilla (gfc_array_r8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)
@ -2529,15 +2529,15 @@ matmul_r8 (gfc_array_r8 * const restrict retarray,
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = (GFC_REAL_8)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)

View File

@ -223,15 +223,15 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl
b_offset = 1 + b_dim1;
b -= b_offset;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Empty c first. */
for (j=1; j<=n; j++)
for (i=1; i<=m; i++)
c[i + j * c_dim1] = ('rtype_name`)0;
/* Early exit if possible */
if (m == 0 || n == 0 || k == 0)
return;
/* Start turning the crank. */
i1 = n;
for (jj = 1; jj <= i1; jj += 512)