From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30955 invoked by alias); 4 Aug 2014 14:48:53 -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 30935 invoked by uid 48); 4 Aug 2014 14:48:50 -0000 From: "ysrumyan at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/62012] New: Loop is not vectorized after function inlining (SCEV) Date: Mon, 04 Aug 2014 14:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ysrumyan at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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-08/txt/msg00211.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62012 Bug ID: 62012 Summary: Loop is not vectorized after function inlining (SCEV) Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ysrumyan at gmail dot com We noticed that for one important benchmark using '-lto' options leads to performance degradation which is caused by not-vectorizing the hottest loop after function inlining. I can able to reproduce this deficiency using simple test-case: if we passed class by reference to function (it need to be compiled with -DPARAM macros) loop is vectorized: g++ -Ofast -m64 -march=core-avx2 -c test.cpp -fdump-tree-vect-details -fopenmp -DPARAM; grep 'note: vectorized' test.cpp.114t.vect test.cpp:45:1: note: vectorized 1 loops in function. But if we compile it without macros we get: g++ -Ofast -m64 -march=core-avx2 -c test.cpp -fdump-tree-vect-details -fopenmp; grep 'note: vectorized' test.cpp.114t.vect test.cpp:45:1: note: vectorized 0 loops in function. It looks like SCEV issue.