public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/61619] Benefits from -ftree-vectorize lost easily when changing unrelated code
Date: Thu, 26 Jun 2014 14:29:00 -0000	[thread overview]
Message-ID: <bug-61619-4-C6TAQvSpl6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61619-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61619

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-06-26
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
bug.cpp:69:13: note: not vectorized: number of iterations cannot be computed.
bug.cpp:69:13: note: bad loop form.

The loop is

  <bb 20>:
  # sum_62 = PHI <sum_42(19), [bug.cpp : 69:80] sum_33(21)>
  # p_71 = PHI <p_59(19), [bug.cpp : 29:29] p_50(21)>
  [bug.cpp : 69:80] _32 = [bug.cpp : 69] *p_71;
  [bug.cpp : 69:80] sum_33 = sum_62 + _32;
  [bug.cpp : 29:31] p_50 = p_71 + pretmp_7;
  [bug.cpp : 69:13] if (_48 != p_50)
    goto <bb 21>;
  else
    goto <bb 22>;

  <bb 21>:
  goto <bb 20>;

The above is with -fopt-info-vec-missed and the excerpt is from the
bug.cpp.114t.vect file produced by -fdump-tree-vect-details-lineno

I believe the issue is that the initialization of S and E are not
inlined if none of the uncomments are done.  If you expect all
abstraction to be removed by inlining the 'flatten' attribute can do magic.

Unfortunately the inits look like

  [/usr/include/c++/4.9/bits/stl_algobase.h : 378:6] MEM[(char * {ref-all})&S]
= MEM[(char * {ref-all})&._94];
  pretmp_22 = MEM[(struct array *)&S];

which we don't fold to the constant init 1 for some reason.


  reply	other threads:[~2014-06-26 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 13:31 [Bug tree-optimization/61619] New: " shmueller2 at gmail dot com
2014-06-26 14:29 ` rguenth at gcc dot gnu.org [this message]
2014-06-26 14:35 ` [Bug tree-optimization/61619] " glisse at gcc dot gnu.org
2014-06-26 14:48 ` rguenth at gcc dot gnu.org
2014-06-27 10:39 ` rguenth at gcc dot gnu.org
2014-07-11 13:44 ` rguenth at gcc dot gnu.org
2014-08-08  9:43 ` 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-61619-4-C6TAQvSpl6@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).