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/54717] [4.8 Regression] Runtime regression: polyhedron test "rnflow" degraded
Date: Thu, 27 Sep 2012 10:43:00 -0000	[thread overview]
Message-ID: <bug-54717-4-aYBtp9xCAT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54717-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54717

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-27 10:43:00 UTC ---
I can reproduce the slowdown.  Code differences appear first in early FRE,
good ones like:

-  _84 = &*a_56(D)[_83];
+  _84 = _75;

which was the intention of the patch (and that is also likely the
reason for the inliner code size/time estimate changes).

It would be nice to get a smaller testcase for the PRE change you quote.

Unfortunately the big slowdown does not reproduce with -fno-inline which makes
it harder to track down.

The real differences do appear in PRE, some of the kind you quote and
some where we perform more PRE like:

@@ -19695,11 +19720,13 @@
   <bb 289>:
   pretmp_ = stride.258_ * _;
   pretmp_ = offset.259_ + pretmp_;
+  pretmp_ = stride.258_ * _;
+  pretmp_ = offset.259_ + pretmp_;

   <bb 123>:
   # i_ = PHI <1(289), i_(292)>
-  _ = stride.258_ * _;
-  _ = _ + offset.259_;
+  _ = pretmp_;
+  _ = pretmp_;

Aside from that the differences you quote result in less if-conversion
applied:

   # ival2_ = PHI <ival2_(39), ival2_(41)>
   # ival2_ = PHI <ival2_(39), ival2_(41)>
-  # prephitmp_ = PHI <pretmp_(39), prephitmp_(41)>
   _ = (integer(kind=8)) ival2_;
   _ = _ + -1;
   _ = *xxtrt_(D)[_];
-  ival2_ = _ < prephitmp_ ? ival2_ : ival2_;
-  prephitmp_ = MIN_EXPR <_, prephitmp_>;
+  _ = (integer(kind=8)) ival2_;
+  _ = _ + -1;
+  _ = *xxtrt_(D)[_];
+  ival2_ = _ < _ ? ival2_ : ival2_;

but that does not result in any extra or missed vectorization.

Btw, dropping to -O2 also fixes the regression.

So, it's not at all clear what we are chasing here (the PRE seems to be
a partial antic expression).


  parent reply	other threads:[~2012-09-27 10:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 12:54 [Bug tree-optimization/54717] New: " sergos.gnu at gmail dot com
2012-09-26 13:17 ` [Bug tree-optimization/54717] " ubizjak at gmail dot com
2012-09-26 14:17 ` [Bug tree-optimization/54717] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-09-26 15:12 ` sergos.gnu at gmail dot com
2012-09-26 15:41 ` dominiq at lps dot ens.fr
2012-09-26 20:07 ` sergos.gnu at gmail dot com
2012-09-27  9:28 ` rguenth at gcc dot gnu.org
2012-09-27 10:43 ` rguenth at gcc dot gnu.org [this message]
2012-10-02 20:24 ` dominiq at lps dot ens.fr
2012-10-08  8:55 ` sergos.gnu at gmail dot com
2012-11-13 18:40 ` ubizjak at gmail dot com
2012-11-13 18:54 ` dominiq at lps dot ens.fr
2012-11-14 18:56 ` sergos.gnu at gmail dot com
2012-11-14 19:42   ` Jan Hubicka
2012-11-14 19:43 ` hubicka at ucw dot cz
2012-11-14 20:11 ` hubicka at gcc dot gnu.org
2012-11-15 10:28 ` hubicka at gcc dot gnu.org
2012-11-15 10:52 ` hubicka at gcc dot gnu.org
2012-11-15 15:07 ` dominiq at lps dot ens.fr
2012-11-16 10:37 ` hubicka at gcc dot gnu.org
2012-12-06 16:51 ` 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-54717-4-aYBtp9xCAT@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).