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 540503858402 for ; Thu, 11 Nov 2021 09:44:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 540503858402 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 9CA772827F0; Thu, 11 Nov 2021 10:44:51 +0100 (CET) Date: Thu, 11 Nov 2021 10:44:51 +0100 From: Jan Hubicka To: Martin =?iso-8859-2?Q?Li=B9ka?= Cc: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Re: [PATCH] vect: Remove vec_outside/inside_cost fields Message-ID: <20211111094451.GI97553@kam.mff.cuni.cz> References: <24ab5c36-26e8-1eb0-01e9-6f6d3d22892a@suse.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=-5.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 09:44:55 -0000 > > > > > > I think the patch causes the following on x86_64-linux-gnu: > > > FAIL: gfortran.dg/inline_matmul_17.f90 -O scan-tree-dump-times optimized "matmul_r4" 2 > > > > I get that failure even with d70ef65692f (from before the patches > > I committed today). > > Sorry, you are right, it's one revision before: > d70ef65692fced7ab72e0aceeff7407e5a34d96d > > Honza, can you please take a look? The test looks for matmul_r4 calls which we now optimize out in fre1. This is because alias info is better now afunc (&__var_5_mma); _188 = __var_5_mma.dim[0].ubound; _189 = __var_5_mma.dim[0].lbound; _190 = _188 - _189; _191 = _190 + 1; _192 = MAX_EXPR <_191, 0>; _193 = (real(kind=4)) _192; _194 = __var_5_mma.dim[1].ubound; _195 = __var_5_mma.dim[1].lbound; _196 = _194 - _195; _197 = _196 + 1; _198 = MAX_EXPR <_197, 0>; _199 = (real(kind=4)) _198; _200 = _193 * _199; _201 = _200 * 3.0e+0; if (_201 <= 1.0e+9) goto ; [INV] else goto ; [INV] : c = {}; afunc (&__var_5_mma); c = {}; 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? Honza