From 88c502146c211a991649f71f3952965997d8b49d Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Tue, 6 Jun 2017 22:23:07 +0000 Subject: [PATCH] backport: re PR fortran/80975 (matmul for zero-length arrays) 2017-06-06 Thomas Koenig 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 Backport from trunk PR fortran/80975 * gfortran.dg/matmul_16.f90: New test. * gfortran.dg/inline_matmul_18.f90: New test. From-SVN: r248935 --- gcc/testsuite/ChangeLog | 7 ++++ .../gfortran.dg/inline_matmul_18.f90 | 16 ++++++++ gcc/testsuite/gfortran.dg/matmul_16.f90 | 13 ++++++ libgfortran/ChangeLog | 19 +++++++++ libgfortran/Makefile.in | 5 ++- libgfortran/generated/matmul_c10.c | 40 +++++++++---------- libgfortran/generated/matmul_c16.c | 40 +++++++++---------- libgfortran/generated/matmul_c4.c | 40 +++++++++---------- libgfortran/generated/matmul_c8.c | 40 +++++++++---------- libgfortran/generated/matmul_i1.c | 40 +++++++++---------- libgfortran/generated/matmul_i16.c | 40 +++++++++---------- libgfortran/generated/matmul_i2.c | 40 +++++++++---------- libgfortran/generated/matmul_i4.c | 40 +++++++++---------- libgfortran/generated/matmul_i8.c | 40 +++++++++---------- libgfortran/generated/matmul_r10.c | 40 +++++++++---------- libgfortran/generated/matmul_r16.c | 40 +++++++++---------- libgfortran/generated/matmul_r4.c | 40 +++++++++---------- libgfortran/generated/matmul_r8.c | 40 +++++++++---------- libgfortran/m4/matmul_internal.m4 | 8 ++-- 19 files changed, 322 insertions(+), 266 deletions(-) create mode 100644 gcc/testsuite/gfortran.dg/inline_matmul_18.f90 create mode 100644 gcc/testsuite/gfortran.dg/matmul_16.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 11c3c07036e..d9ed325a884 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2017-06-06 Thomas Koenig + + 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 * gcc.target/sparc/sparc-ret-3.c: New test. diff --git a/gcc/testsuite/gfortran.dg/inline_matmul_18.f90 b/gcc/testsuite/gfortran.dg/inline_matmul_18.f90 new file mode 100644 index 00000000000..c846733c8c2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/inline_matmul_18.f90 @@ -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" } } + diff --git a/gcc/testsuite/gfortran.dg/matmul_16.f90 b/gcc/testsuite/gfortran.dg/matmul_16.f90 new file mode 100644 index 00000000000..9def1336344 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/matmul_16.f90 @@ -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 diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e037f03f89a..ca109865be3 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,22 @@ +2017-06-06 Thomas Koenig + + 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 Backport from trunk diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in index 05b183dcadb..4914a6f323f 100644 --- a/libgfortran/Makefile.in +++ b/libgfortran/Makefile.in @@ -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 \ diff --git a/libgfortran/generated/matmul_c10.c b/libgfortran/generated/matmul_c10.c index c8e7a6c37fb..d8b26c51374 100644 --- a/libgfortran/generated/matmul_c10.c +++ b/libgfortran/generated/matmul_c10.c @@ -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) diff --git a/libgfortran/generated/matmul_c16.c b/libgfortran/generated/matmul_c16.c index adbf1c81a7a..bc37fcd7139 100644 --- a/libgfortran/generated/matmul_c16.c +++ b/libgfortran/generated/matmul_c16.c @@ -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) diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/matmul_c4.c index ff0e76a9275..683df98edca 100644 --- a/libgfortran/generated/matmul_c4.c +++ b/libgfortran/generated/matmul_c4.c @@ -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) diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/matmul_c8.c index 483ebf114d7..9cf7623948b 100644 --- a/libgfortran/generated/matmul_c8.c +++ b/libgfortran/generated/matmul_c8.c @@ -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) diff --git a/libgfortran/generated/matmul_i1.c b/libgfortran/generated/matmul_i1.c index 51cfcc05360..e2fd404d6a9 100644 --- a/libgfortran/generated/matmul_i1.c +++ b/libgfortran/generated/matmul_i1.c @@ -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) diff --git a/libgfortran/generated/matmul_i16.c b/libgfortran/generated/matmul_i16.c index 90a422f4290..1601e104402 100644 --- a/libgfortran/generated/matmul_i16.c +++ b/libgfortran/generated/matmul_i16.c @@ -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) diff --git a/libgfortran/generated/matmul_i2.c b/libgfortran/generated/matmul_i2.c index 58be84fc9c8..c9b67af0aeb 100644 --- a/libgfortran/generated/matmul_i2.c +++ b/libgfortran/generated/matmul_i2.c @@ -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) diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/matmul_i4.c index 1e724d54ffa..47b061cc1d5 100644 --- a/libgfortran/generated/matmul_i4.c +++ b/libgfortran/generated/matmul_i4.c @@ -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) diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/matmul_i8.c index f5ed84fa288..716ef13f5da 100644 --- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.c @@ -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) diff --git a/libgfortran/generated/matmul_r10.c b/libgfortran/generated/matmul_r10.c index 8f76faceabf..e0246b0f49b 100644 --- a/libgfortran/generated/matmul_r10.c +++ b/libgfortran/generated/matmul_r10.c @@ -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) diff --git a/libgfortran/generated/matmul_r16.c b/libgfortran/generated/matmul_r16.c index 6a7687fdc33..7d34e2b5814 100644 --- a/libgfortran/generated/matmul_r16.c +++ b/libgfortran/generated/matmul_r16.c @@ -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) diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/matmul_r4.c index dbb31b05c3b..f6f86a6516f 100644 --- a/libgfortran/generated/matmul_r4.c +++ b/libgfortran/generated/matmul_r4.c @@ -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) diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/matmul_r8.c index 23efed22e2a..9210d91718a 100644 --- a/libgfortran/generated/matmul_r8.c +++ b/libgfortran/generated/matmul_r8.c @@ -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) diff --git a/libgfortran/m4/matmul_internal.m4 b/libgfortran/m4/matmul_internal.m4 index d35968b3be5..f7b82483cd9 100644 --- a/libgfortran/m4/matmul_internal.m4 +++ b/libgfortran/m4/matmul_internal.m4 @@ -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)