From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id 92B3E385AC1E; Thu, 11 Nov 2021 17:54:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92B3E385AC1E Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 768D9280F28; Thu, 11 Nov 2021 18:54:06 +0100 (CET) Date: Thu, 11 Nov 2021 18:54:06 +0100 From: Jan Hubicka To: Richard Biener Cc: "fortran@gcc.gnu.org" , Martin =?iso-8859-2?Q?Li=B9ka?= , Richard Sandiford , GCC Patches Subject: Re: [PATCH] vect: Remove vec_outside/inside_cost fields Message-ID: <20211111175406.GK17431@kam.mff.cuni.cz> References: <24ab5c36-26e8-1eb0-01e9-6f6d3d22892a@suse.cz> <20211111094451.GI97553@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2021 17:54:08 -0000 > > Now afunc writes to __var_5_mma only indirectly so I think it is correct that > > we optimize the conditional out. > > > > Easy fix would be to add -fno-ipa-modref, but perhaps someone with > > better understanding of Fortran would help me to improve the testcase so > > the calls to matmul_r4 remains reachable? > > I think the two matmul_r4 cases were missed optimizations before so just > changing the expected number of calls to zero is the correct fix here. Indeed > we can now statically determine the matrices are not large and so only > keep the inline copy. I have updated the matmul as follows. gcc/testsuite/ChangeLog: 2021-11-11 Jan Hubicka * gfortran.dg/inline_matmul_17.f90: Fix template diff --git a/gcc/testsuite/gfortran.dg/inline_matmul_17.f90 b/gcc/testsuite/gfortran.dg/inline_matmul_17.f90 index d2ca8e2948a..cff4b6ce5e2 100644 --- a/gcc/testsuite/gfortran.dg/inline_matmul_17.f90 +++ b/gcc/testsuite/gfortran.dg/inline_matmul_17.f90 @@ -45,4 +45,4 @@ program main c = matmul(a, bfunc()) if (any(c-d /= 0)) STOP 6 end program main -! { dg-final { scan-tree-dump-times "matmul_r4" 2 "optimized" } } +! { dg-final { scan-tree-dump-not "matmul_r4" "optimized" } }