public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ysrumyan at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-62012-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2014-08-04 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 14:48 ysrumyan at gmail dot com [this message]
2014-08-04 14:51 ` [Bug tree-optimization/62012] " ysrumyan at gmail dot com
2014-09-08 10:59 ` ysrumyan at gmail dot com
2014-09-08 11:29 ` rguenth at gcc dot gnu.org
2014-09-09 13:57 ` ysrumyan at gmail dot com
2014-09-09 14:01 ` ysrumyan at gmail dot com
2014-09-09 14:04 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-62012-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).