public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenther at suse dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/42108] [4.4/4.5 Regression] 50% performance regression
Date: Mon, 14 Dec 2009 12:27:00 -0000	[thread overview]
Message-ID: <20091214122720.3010.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42108-9410@http.gcc.gnu.org/bugzilla/>



------- Comment #32 from rguenther at suse dot de  2009-12-14 12:27 -------
Subject: Re:  [4.4/4.5 Regression] 50% performance
 regression

On Mon, 14 Dec 2009, matz at gcc dot gnu dot org wrote:

> ------- Comment #26 from matz at gcc dot gnu dot org  2009-12-14 04:55 -------
> And if I fix this problem (so that only one reference to *n_9) remains
> I hit the problem that the fortran frontend emits the computation of countm1
> after the loop bound test.  No pass is moving code in front of that test as
> this is potentially a regression (more evaluations in out-of-bound case).
> 
> And if I fix _that_ I hit the problem of the fix for PR38819.  PRE won't move
> the division at all, because it could trap :-/  If I disable this I get back
> the 4.3 performance.

Well.  VRP should mark divisions as non-trapping if possible.  I see
(after fixing the FRE issue):

  # iftmp.12_8 = PHI <-1(30), 1(12)>
  D.1588_67 = iftmp.12_8 * D.1529_119;
  D.1589_68 = (character(kind=4)) D.1588_67;
  countm1.6_69 = D.1583_64 / D.1589_68;

with

D.1529_119: [2, +INF]
iftmp.12_8: [1, 1]
D.1588_67: [2, +INF]
D.1589_68: [2, 2147483647]
countm1.6_69: [0, 2147483647]

so as D.1589_68 is never -1 or zero the division doesn't trap.
Now it's easy to mark the stmt in VRP this way but non-trivial
to keep track of it in the SCCVN IL.

Richard.


-- 


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


  parent reply	other threads:[~2009-12-14 12:27 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 16:01 [Bug fortran/42108] New: Performance drop from 4.3 to 4.4/4.5 sfilippone at uniroma2 dot it
2009-11-19 16:01 ` [Bug fortran/42108] " sfilippone at uniroma2 dot it
2009-11-19 16:50 ` [Bug tree-optimization/42108] [4.4/4.5 Regression] Vectorizer cannot deal with PAREN_EXPR gracefully, 50% performance regression rguenth at gcc dot gnu dot org
2009-11-19 17:17 ` sfilippone at uniroma2 dot it
2009-11-19 17:30 ` rguenther at suse dot de
2009-11-19 19:42 ` sfilippone at uniroma2 dot it
2009-11-19 19:53 ` toon at moene dot org
2009-11-19 22:33 ` anlauf at gmx dot de
2009-11-20  8:32 ` sfilippone at uniroma2 dot it
2009-11-20 13:45 ` dominiq at lps dot ens dot fr
2009-11-20 14:04 ` sfilippone at uniroma2 dot it
2009-11-20 14:12 ` sfilippone at uniroma2 dot it
2009-11-20 14:14 ` rguenth at gcc dot gnu dot org
2009-11-20 19:45 ` toon at moene dot org
2009-11-20 23:48 ` rguenth at gcc dot gnu dot org
2009-11-21 12:11 ` toon at moene dot org
2009-11-21 12:19 ` rguenther at suse dot de
2009-11-21 13:58 ` rguenth at gcc dot gnu dot org
2009-11-23  9:02 ` irar at il dot ibm dot com
2009-11-27 11:23 ` rguenth at gcc dot gnu dot org
2009-11-30  8:53 ` irar at il dot ibm dot com
2009-11-30  8:54 ` irar at il dot ibm dot com
2009-11-30 10:13 ` rguenther at suse dot de
2009-11-30 12:21 ` irar at il dot ibm dot com
2009-12-04 14:25 ` [Bug tree-optimization/42108] [4.4/4.5 Regression] " dominiq at lps dot ens dot fr
2009-12-13 23:48 ` matz at gcc dot gnu dot org
2009-12-14  4:55 ` matz at gcc dot gnu dot org
2009-12-14  5:26 ` matz at gcc dot gnu dot org
2009-12-14 10:51 ` dominiq at lps dot ens dot fr
2009-12-14 11:21 ` dominiq at lps dot ens dot fr
2009-12-14 11:23 ` rguenth at gcc dot gnu dot org
2009-12-14 11:50 ` rguenth at gcc dot gnu dot org
2009-12-14 12:27 ` rguenther at suse dot de [this message]
2009-12-14 12:30 ` rguenth at gcc dot gnu dot org
2009-12-14 12:58 ` rguenth at gcc dot gnu dot org
2009-12-14 16:58 ` matz at gcc dot gnu dot org
2009-12-15  7:10 ` tkoenig at gcc dot gnu dot org
2009-12-15 11:08 ` rguenth at gcc dot gnu dot org
2009-12-18 15:43 ` rguenth at gcc dot gnu dot org
2009-12-18 21:04 ` dominiq at lps dot ens dot fr
2009-12-18 21:40 ` matz at gcc dot gnu dot org
2009-12-18 23:44 ` rguenth at gcc dot gnu dot org
2009-12-19 11:25 ` rguenth at gcc dot gnu dot org
2009-12-19 19:29 ` rguenth at gcc dot gnu dot org
2009-12-19 19:41 ` rguenth at gcc dot gnu dot org
2009-12-19 21:10 ` rguenth at gcc dot gnu dot org
2010-01-21 13:15 ` jakub at gcc dot gnu dot org
2010-04-05 12:53 ` steven at gcc dot gnu dot org
2010-04-05 12:54 ` rguenther at suse dot de
2010-04-05 12:57 ` rguenther at suse dot de
2010-04-05 13:02 ` steven at gcc dot gnu dot org
2010-04-05 14:23 ` rguenth at gcc dot gnu dot org
2010-04-30  8:55 ` [Bug tree-optimization/42108] [4.4/4.5/4.6 " jakub at gcc dot gnu dot 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=20091214122720.3010.qmail@sourceware.org \
    --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).