From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4769 invoked by alias); 18 Nov 2014 10:59:28 -0000 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 Received: (qmail 4725 invoked by uid 48); 18 Nov 2014 10:59:24 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization Date: Tue, 18 Nov 2014 10:59: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-Version: 4.9.3 X-Bugzilla-Keywords: missed-optimization, openmp 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.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-11/txt/msg01624.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jakub at gcc dot gnu.org |rguenth at gcc dot gnu.org --- Comment #5 from Richard Biener --- The issue here is the induction variable is shared? : # _17 = PHI <0(2), _11(4)> _6 = b[_17]; _7 = c[_17]; _8 = _6 + _7; a[_17] = _8; _10 = .omp_data_i_3(D)->i; _11 = _10 + 1; .omp_data_i_3(D)->i = _11; if (_11 <= 9999999) goto ; else goto ; and we didn't apply store-motion to it: Memory reference 1: b[_17] Memory reference 2: c[_17] Memory reference 3: a[_17] Memory reference 4: .omp_data_i_3(D)->i ... Querying dependency of refs 4 and 1: dependent. Querying dependencies of ref 4 in loop 1: dependent I think the static chain never points to global decls thus we could special-case this. We could also treat members of the frame as non-allocated and thus not worry about trailing arrays and such. Unfortunately the .omp_data_i is a regular function parameter and not a static chain :/