From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8024 invoked by alias); 18 May 2012 11:49:15 -0000 Received: (qmail 8009 invoked by uid 22791); 18 May 2012 11:49:14 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 May 2012 11:49:00 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/53346] [4.6/4.7/4.8 Regression] Bad vectorization in the proc cptrf2 of rnflow.f90 Date: Fri, 18 May 2012 11:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Status AssignedTo Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg01790.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53346 Richard Guenther changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | --- Comment #5 from Richard Guenther 2012-05-18 11:02:53 UTC --- Yeah, this is sort-of related to what is observed in PR53355. I suppose at runtime nxtr is comparatively small. Reduced testcase: subroutine cptrf2 (nxtr, ixtrt) integer, dimension (1:nxtr), intent (out) :: ixtrt ixtrt = 0 end subroutine we peel the loop to possibly align the stores, and we peel the loop to possibly take care of a remaining store at the end of the array. And of course we compute that we need at least 6 scalar iterations to make executing the vectorized loop profitable. And apart from all that we should have recognized the loop as memset. Mine.