From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16872 invoked by alias); 7 Apr 2016 14:52:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16707 invoked by uid 89); 7 Apr 2016 14:52:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 07 Apr 2016 14:52:44 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1aoBIV-0001iU-SC from Tom_deVries@mentor.com ; Thu, 07 Apr 2016 07:52:40 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Thu, 7 Apr 2016 15:52:38 +0100 Subject: Re: Do not give realistic estimates for loop with array accesses To: Richard Biener , Jan Hubicka References: <20160330100018.GA54780@kam.mff.cuni.cz> <20160330122751.GA97459@kam.mff.cuni.cz> CC: From: Tom de Vries Message-ID: <5706742C.1070101@mentor.com> Date: Thu, 07 Apr 2016 14:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-04/txt/msg00352.txt.bz2 On 30/03/16 14:36, Richard Biener wrote: > On Wed, 30 Mar 2016, Jan Hubicka wrote: > >>> > > >>> > >You are only changing one place in this file. >> > >> >You are right. I am attaching the updated patch which I am re-testing now. >>> > > >>> > >The vectorizer already checks this (albeit indirectly): >>> > > >>> > > HOST_WIDE_INT max_niter >>> > > = max_stmt_executions_int (LOOP_VINFO_LOOP (loop_vinfo)); >>> > > if ((LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) >>> > > && (LOOP_VINFO_INT_NITERS (loop_vinfo) < vectorization_factor)) >>> > > || (max_niter != -1 >>> > > && (unsigned HOST_WIDE_INT) max_niter < vectorization_factor)) >>> > > { >>> > > if (dump_enabled_p ()) >>> > > dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, >>> > > "not vectorized: iteration count smaller than " >>> > > "vectorization factor.\n"); >>> > > return false; >>> > > } >> > >> >Yes, but one tests only vectorization_factor and other min_profitable_estimate >> >which probably should be greater than vectorization_factor. >> > >> >The check above should therefore become redundant. My reading of the code is >> >that min_profiltable_estimate is computed after the check above, so it is >> >probably an useful shortcut and the message is also bit more informative. >> >I updated the later test to use max_niter variable once it is computed. >> > >> >OK with those changes assuming testing passes? > Ok. This patch caused PR70577 - 'tree-ssa/prefetch-5.c scan-tree-dump-times aprefetch failures' ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70577 ). Thanks, - Tom