From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by sourceware.org (Postfix) with ESMTPS id 39C0438618B8; Tue, 23 Feb 2021 21:46:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 39C0438618B8 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [93.207.92.186] ([93.207.92.186]) by web-mail.gmx.net (3c-app-gmx-bs42.server.lan [172.19.170.94]) (via HTTP); Tue, 23 Feb 2021 22:46:22 +0100 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: fortran , gcc-patches Subject: [PATCH] PR libfortran/99218 - [8/9/10/11 Regression] matmul on temporary array accesses invalid memory Content-Type: multipart/mixed; boundary=refeik-ce2ceb61-01a3-47ed-8bf9-810d9c0b0b88 Date: Tue, 23 Feb 2021 22:46:22 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:+A5ifWgaa1S0f1V4/9AM5ZJDa62JyBc5GYrIESSAIRUggGo9VMveZ9QwxibarDUCemVYj tvB05013/uZStByoEkyu4f8xkzt/4DvgeX2YI3IlFkjGg1wlIZqiwrI7ILUYLEhbKQkXtMi+xOjj vAfbhL6AlpBXeWbfChWhZeK8rBFrzLJjOddIv9yVPUQ5gZhxIRZ+oWOjlb0/5UtPXlda9NPc650P UwHz85X0hd/lExMzUWHi5/n9MFrtb59jVsXh/wYg5/u9bHNLjLkbTG6W9SB0qyW2qlxWbOH3frwH vg= X-UI-Out-Filterresults: notjunk:1;V03:K0:DNv5cN8mapI=:DmCnDK8bdDTZApP2Ae+Yfn Vaszpc5Tf+zscIcG9JqVxrl6O7ERYDOU7w2iiostKCuDox7eN2o+lxAiWfwaLI4q1J7zpU1fn ekuNxcJNxTevjyrLvJNIAgFam7PNn7+J9WS7nQIbzs1oRz1qZa/o7G7Sw+n8mmu4vmsiuXeQT pp96mTpeB5H8anHfeqbU5mYnhCQPfSiGzc8PrQSW6TEdgMSMag0FlxvQDXwA9rFFKsZTQZ6Tx Bw9ZFoc4/DAZ2EDeCSMGbYOpIe3CqdHAnRVqixemgjaMAhbGOmwdxDhmIJbvPRVC0FWBvqkp1 McDoXLib38J1040EZCyOvAPSH2ZOTkTYodpGpfirCfFFIE1ujUpuFzxDHoF3+ivRWRkcchuvB Ndk+Cp4p/Gbz0z06k9qh9uiYY1Efm6k43d2HzlAdHHMgETzSafoKX2hxjEyoiOHgyPFR0yNef 1qzrCRV9uaC5YqBUdPXypKxTgV2GTtLeGk2fXWtTHndGEw6qnVe8e1k1aHf+JPCwtbVDvrATG KW20W4wWJbf+H/i63JpNJsmOud/Sft2hDho8Y4yDOB8NXwXHvuaHLhZE475f2OS+gh9/NxDGo f+Di188lmjyQA= X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2021 21:46:28 -0000 --refeik-ce2ceb61-01a3-47ed-8bf9-810d9c0b0b88 Content-Type: text/plain; charset=UTF-8 Dear all, under certain circumstances a call to MATMUL for rank-2 times rank-1 would invoke a highly tuned rank-2 times rank-2 algorithm which could lead to invalid reads and writes. The solution is to check the rank of the second argument to matmul and fall back to a regular algorithm for rank-1. The invalid accesses did show up with valgrind. I have not been able to create a testcase that gives wrong results. Regtested on x86_64-pc-linux-gnu, and verified with valgrind. OK for master? As this affects all open branches down to 8, ok for backports? Thanks, Harald PR libfortran/99218 - matmul on temporary array accesses invalid memory Do not invoke tuned rank-2 times rank-2 matmul if rank(b) == 1. libgfortran/ChangeLog: PR libfortran/99218 * m4/matmul_internal.m4: Invoke tuned matmul only for rank(b)>1. * generated/matmul_c10.c: Regenerated. * generated/matmul_c16.c: Likewise. * generated/matmul_c4.c: Likewise. * generated/matmul_c8.c: Likewise. * generated/matmul_i1.c: Likewise. * generated/matmul_i16.c: Likewise. * generated/matmul_i2.c: Likewise. * generated/matmul_i4.c: Likewise. * generated/matmul_i8.c: Likewise. * generated/matmul_r10.c: Likewise. * generated/matmul_r16.c: Likewise. * generated/matmul_r4.c: Likewise. * generated/matmul_r8.c: Likewise. * generated/matmulavx128_c10.c: Likewise. * generated/matmulavx128_c16.c: Likewise. * generated/matmulavx128_c4.c: Likewise. * generated/matmulavx128_c8.c: Likewise. * generated/matmulavx128_i1.c: Likewise. * generated/matmulavx128_i16.c: Likewise. * generated/matmulavx128_i2.c: Likewise. * generated/matmulavx128_i4.c: Likewise. * generated/matmulavx128_i8.c: Likewise. * generated/matmulavx128_r10.c: Likewise. * generated/matmulavx128_r16.c: Likewise. * generated/matmulavx128_r4.c: Likewise. * generated/matmulavx128_r8.c: Likewise. --refeik-ce2ceb61-01a3-47ed-8bf9-810d9c0b0b88 Content-Type: text/x-patch Content-Disposition: attachment; filename=pr99218.patch Content-Transfer-Encoding: quoted-printable diff --git a/libgfortran/generated/matmul_c10.c b/libgfortran/generated/ma= tmul_c10.c index 3e81b491ea1..b8172e8845d 100644 =2D-- a/libgfortran/generated/matmul_c10.c +++ b/libgfortran/generated/matmul_c10.c @@ -276,7 +276,8 @@ matmul_c10_avx (gfc_array_c10 * const restrict retarra= y, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_c10_avx2 (gfc_array_c10 * const restrict retarr= ay, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_c10_avx512f (gfc_array_c10 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_c10_vanilla (gfc_array_c10 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_c10 (gfc_array_c10 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_c16.c b/libgfortran/generated/ma= tmul_c16.c index 61a9a70b5e4..a97e06f0155 100644 =2D-- a/libgfortran/generated/matmul_c16.c +++ b/libgfortran/generated/matmul_c16.c @@ -276,7 +276,8 @@ matmul_c16_avx (gfc_array_c16 * const restrict retarra= y, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_c16_avx2 (gfc_array_c16 * const restrict retarr= ay, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_c16_avx512f (gfc_array_c16 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_c16_vanilla (gfc_array_c16 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_c16 (gfc_array_c16 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_c4.c b/libgfortran/generated/mat= mul_c4.c index ecbd2c11918..f884a4ba8f1 100644 =2D-- a/libgfortran/generated/matmul_c4.c +++ b/libgfortran/generated/matmul_c4.c @@ -276,7 +276,8 @@ matmul_c4_avx (gfc_array_c4 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_c4_avx2 (gfc_array_c4 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_c4_avx512f (gfc_array_c4 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_c4_vanilla (gfc_array_c4 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_c4 (gfc_array_c4 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_c8.c b/libgfortran/generated/mat= mul_c8.c index e2b36ff5490..29fbaa2f8b5 100644 =2D-- a/libgfortran/generated/matmul_c8.c +++ b/libgfortran/generated/matmul_c8.c @@ -276,7 +276,8 @@ matmul_c8_avx (gfc_array_c8 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_c8_avx2 (gfc_array_c8 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_c8_avx512f (gfc_array_c8 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_c8_vanilla (gfc_array_c8 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_c8 (gfc_array_c8 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_i1.c b/libgfortran/generated/mat= mul_i1.c index 24fb1619306..285d37cda71 100644 =2D-- a/libgfortran/generated/matmul_i1.c +++ b/libgfortran/generated/matmul_i1.c @@ -276,7 +276,8 @@ matmul_i1_avx (gfc_array_i1 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_i1_avx2 (gfc_array_i1 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_i1_avx512f (gfc_array_i1 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_i1_vanilla (gfc_array_i1 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_i1 (gfc_array_i1 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_i16.c b/libgfortran/generated/ma= tmul_i16.c index 498740a48d3..d54a7d966d5 100644 =2D-- a/libgfortran/generated/matmul_i16.c +++ b/libgfortran/generated/matmul_i16.c @@ -276,7 +276,8 @@ matmul_i16_avx (gfc_array_i16 * const restrict retarra= y, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_i16_avx2 (gfc_array_i16 * const restrict retarr= ay, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_i16_avx512f (gfc_array_i16 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_i16_vanilla (gfc_array_i16 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_i16 (gfc_array_i16 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_i2.c b/libgfortran/generated/mat= mul_i2.c index 1d40b399e40..eca6daad2d8 100644 =2D-- a/libgfortran/generated/matmul_i2.c +++ b/libgfortran/generated/matmul_i2.c @@ -276,7 +276,8 @@ matmul_i2_avx (gfc_array_i2 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_i2_avx2 (gfc_array_i2 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_i2_avx512f (gfc_array_i2 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_i2_vanilla (gfc_array_i2 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_i2 (gfc_array_i2 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_i4.c b/libgfortran/generated/mat= mul_i4.c index b5f83d5453c..a33bb6afaa6 100644 =2D-- a/libgfortran/generated/matmul_i4.c +++ b/libgfortran/generated/matmul_i4.c @@ -276,7 +276,8 @@ matmul_i4_avx (gfc_array_i4 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_i4_avx2 (gfc_array_i4 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_i4_avx512f (gfc_array_i4 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_i4_vanilla (gfc_array_i4 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_i4 (gfc_array_i4 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_i8.c b/libgfortran/generated/mat= mul_i8.c index bfaee38f2d2..f49b8c0a185 100644 =2D-- a/libgfortran/generated/matmul_i8.c +++ b/libgfortran/generated/matmul_i8.c @@ -276,7 +276,8 @@ matmul_i8_avx (gfc_array_i8 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_i8_avx2 (gfc_array_i8 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_i8_avx512f (gfc_array_i8 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_i8_vanilla (gfc_array_i8 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_i8 (gfc_array_i8 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_r10.c b/libgfortran/generated/ma= tmul_r10.c index f4851878e66..6cb59bda7ca 100644 =2D-- a/libgfortran/generated/matmul_r10.c +++ b/libgfortran/generated/matmul_r10.c @@ -276,7 +276,8 @@ matmul_r10_avx (gfc_array_r10 * const restrict retarra= y, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_r10_avx2 (gfc_array_r10 * const restrict retarr= ay, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_r10_avx512f (gfc_array_r10 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_r10_vanilla (gfc_array_r10 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_r10 (gfc_array_r10 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_r16.c b/libgfortran/generated/ma= tmul_r16.c index 662cea13894..aca9bd2a140 100644 =2D-- a/libgfortran/generated/matmul_r16.c +++ b/libgfortran/generated/matmul_r16.c @@ -276,7 +276,8 @@ matmul_r16_avx (gfc_array_r16 * const restrict retarra= y, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_r16_avx2 (gfc_array_r16 * const restrict retarr= ay, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_r16_avx512f (gfc_array_r16 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_r16_vanilla (gfc_array_r16 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_r16 (gfc_array_r16 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_r4.c b/libgfortran/generated/mat= mul_r4.c index 9f435f57357..4e0caa6cfe6 100644 =2D-- a/libgfortran/generated/matmul_r4.c +++ b/libgfortran/generated/matmul_r4.c @@ -276,7 +276,8 @@ matmul_r4_avx (gfc_array_r4 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_r4_avx2 (gfc_array_r4 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_r4_avx512f (gfc_array_r4 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_r4_vanilla (gfc_array_r4 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_r4 (gfc_array_r4 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmul_r8.c b/libgfortran/generated/mat= mul_r8.c index 5ceec71b58d..d4e825c8155 100644 =2D-- a/libgfortran/generated/matmul_r8.c +++ b/libgfortran/generated/matmul_r8.c @@ -276,7 +276,8 @@ matmul_r8_avx (gfc_array_r8 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -844,7 +845,8 @@ matmul_r8_avx2 (gfc_array_r8 * const restrict retarray= , } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1412,7 +1414,8 @@ matmul_r8_avx512f (gfc_array_r8 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -1994,7 +1997,8 @@ matmul_r8_vanilla (gfc_array_r8 * const restrict ret= array, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -2635,7 +2639,8 @@ matmul_r8 (gfc_array_r8 * const restrict retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_c10.c b/libgfortran/genera= ted/matmulavx128_c10.c index 434d327c601..e21e6cbe253 100644 =2D-- a/libgfortran/generated/matmulavx128_c10.c +++ b/libgfortran/generated/matmulavx128_c10.c @@ -241,7 +241,8 @@ matmul_c10_avx128_fma3 (gfc_array_c10 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_c10_avx128_fma4 (gfc_array_c10 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_c16.c b/libgfortran/genera= ted/matmulavx128_c16.c index 27110ad17e5..1cf686a7e4b 100644 =2D-- a/libgfortran/generated/matmulavx128_c16.c +++ b/libgfortran/generated/matmulavx128_c16.c @@ -241,7 +241,8 @@ matmul_c16_avx128_fma3 (gfc_array_c16 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_c16_avx128_fma4 (gfc_array_c16 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_c4.c b/libgfortran/generat= ed/matmulavx128_c4.c index 4f0f67a6d1d..64f4886399b 100644 =2D-- a/libgfortran/generated/matmulavx128_c4.c +++ b/libgfortran/generated/matmulavx128_c4.c @@ -241,7 +241,8 @@ matmul_c4_avx128_fma3 (gfc_array_c4 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_c4_avx128_fma4 (gfc_array_c4 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_c8.c b/libgfortran/generat= ed/matmulavx128_c8.c index 4521103d40f..d0846d7be8a 100644 =2D-- a/libgfortran/generated/matmulavx128_c8.c +++ b/libgfortran/generated/matmulavx128_c8.c @@ -241,7 +241,8 @@ matmul_c8_avx128_fma3 (gfc_array_c8 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_c8_avx128_fma4 (gfc_array_c8 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_i1.c b/libgfortran/generat= ed/matmulavx128_i1.c index e96e30293a3..aa161ba0056 100644 =2D-- a/libgfortran/generated/matmulavx128_i1.c +++ b/libgfortran/generated/matmulavx128_i1.c @@ -241,7 +241,8 @@ matmul_i1_avx128_fma3 (gfc_array_i1 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_i1_avx128_fma4 (gfc_array_i1 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_i16.c b/libgfortran/genera= ted/matmulavx128_i16.c index a4330584a0c..a28b226a080 100644 =2D-- a/libgfortran/generated/matmulavx128_i16.c +++ b/libgfortran/generated/matmulavx128_i16.c @@ -241,7 +241,8 @@ matmul_i16_avx128_fma3 (gfc_array_i16 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_i16_avx128_fma4 (gfc_array_i16 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_i2.c b/libgfortran/generat= ed/matmulavx128_i2.c index 53ebd769cfb..cd54a519417 100644 =2D-- a/libgfortran/generated/matmulavx128_i2.c +++ b/libgfortran/generated/matmulavx128_i2.c @@ -241,7 +241,8 @@ matmul_i2_avx128_fma3 (gfc_array_i2 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_i2_avx128_fma4 (gfc_array_i2 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_i4.c b/libgfortran/generat= ed/matmulavx128_i4.c index 7feb2cf6403..ece1ddd668e 100644 =2D-- a/libgfortran/generated/matmulavx128_i4.c +++ b/libgfortran/generated/matmulavx128_i4.c @@ -241,7 +241,8 @@ matmul_i4_avx128_fma3 (gfc_array_i4 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_i4_avx128_fma4 (gfc_array_i4 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_i8.c b/libgfortran/generat= ed/matmulavx128_i8.c index 65b64037861..b63a7feba50 100644 =2D-- a/libgfortran/generated/matmulavx128_i8.c +++ b/libgfortran/generated/matmulavx128_i8.c @@ -241,7 +241,8 @@ matmul_i8_avx128_fma3 (gfc_array_i8 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_i8_avx128_fma4 (gfc_array_i8 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_r10.c b/libgfortran/genera= ted/matmulavx128_r10.c index eecddf4247e..bc2ea08a1b8 100644 =2D-- a/libgfortran/generated/matmulavx128_r10.c +++ b/libgfortran/generated/matmulavx128_r10.c @@ -241,7 +241,8 @@ matmul_r10_avx128_fma3 (gfc_array_r10 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_r10_avx128_fma4 (gfc_array_r10 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_r16.c b/libgfortran/genera= ted/matmulavx128_r16.c index e5042aece2f..228dde8f537 100644 =2D-- a/libgfortran/generated/matmulavx128_r16.c +++ b/libgfortran/generated/matmulavx128_r16.c @@ -241,7 +241,8 @@ matmul_r16_avx128_fma3 (gfc_array_r16 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_r16_avx128_fma4 (gfc_array_r16 * const restrict= retarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_r4.c b/libgfortran/generat= ed/matmulavx128_r4.c index 45039f89547..32f634b07c9 100644 =2D-- a/libgfortran/generated/matmulavx128_r4.c +++ b/libgfortran/generated/matmulavx128_r4.c @@ -241,7 +241,8 @@ matmul_r4_avx128_fma3 (gfc_array_r4 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_r4_avx128_fma4 (gfc_array_r4 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/generated/matmulavx128_r8.c b/libgfortran/generat= ed/matmulavx128_r8.c index 1d3311e833e..01bea4f0949 100644 =2D-- a/libgfortran/generated/matmulavx128_r8.c +++ b/libgfortran/generated/matmulavx128_r8.c @@ -241,7 +241,8 @@ matmul_r8_avx128_fma3 (gfc_array_r8 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 @@ -810,7 +811,8 @@ matmul_r8_avx128_fma4 (gfc_array_r8 * const restrict r= etarray, } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 diff --git a/libgfortran/m4/matmul_internal.m4 b/libgfortran/m4/matmul_int= ernal.m4 index 13fd7696238..0e96207a0fc 100644 =2D-- a/libgfortran/m4/matmul_internal.m4 +++ b/libgfortran/m4/matmul_internal.m4 @@ -192,7 +192,8 @@ sinclude(`matmul_asm_'rtype_code`.m4')dnl } } - if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1) + if (rxstride =3D=3D 1 && axstride =3D=3D 1 && bxstride =3D=3D 1 + && GFC_DESCRIPTOR_RANK (b) !=3D 1) { /* This block of code implements a tuned matmul, derived from Superscalar GEMM-based level 3 BLAS, Beta version 0.1 --refeik-ce2ceb61-01a3-47ed-8bf9-810d9c0b0b88--