From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9173 invoked by alias); 21 Dec 2012 14:02:15 -0000 Received: (qmail 9004 invoked by uid 48); 21 Dec 2012 14:01:40 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55334] [4.8 Regression] mgrid regression (ipa-cp disables vectorization) Date: Fri, 21 Dec 2012 14:02: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: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: 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-12/txt/msg02125.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55334 --- Comment #18 from Richard Biener 2012-12-21 14:01:33 UTC --- (In reply to comment #17) > > Nothing to fix for me - it's the IPA-CP decision that pessimizes things. > Well, replacing parameter by known constant should not pessimize in general... True, but replacing restrict parameter with sth non-restrict may be. The language spec allows me to write void foo (int * restrict p, int * restrict q, int n) { for (i = 0; i < n; ++i) p[i] = q[n-i]; } and call it with foo (&a[0], &a[100], n) when I know that with this particular n it will not alias. But without knowing 'n' (like in the mgrid case) there is no chance that we can re-discover this non-aliasing when you propagate &a[0] and &a[100].