public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/38819] [4.2/4.3/4.4 Regression] trapping expression wrongly hoisted out of loop
Date: Fri, 16 Jan 2009 20:05:00 -0000	[thread overview]
Message-ID: <20090116200457.31471.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38819-230@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-16 20:04 -------
PRE shouldn't cause new evaluations - the issue here is that the CFG

  # BLOCK 2 freq:900
  # PRED: ENTRY [100.0%]  (fallthru,exec)
  si1_3 ={v} a;
  si2_4 ={v} b;
  # SUCC: 3 [100.0%]  (fallthru,exec)

  # BLOCK 3 freq:9100
  # PRED: 8 [100.0%]  (fallthru) 2 [100.0%]  (fallthru,exec)
  # i_31 = PHI <i_12(8), 0(2)>
  foo ();
  x.0_6 ={v} x;
  if (x.0_6 == 8)
    goto <bb 4>;
  else
    goto <bb 7>;
  # SUCC: 4 [28.0%]  (true,exec) 7 [72.0%]  (false,exec)


  # BLOCK 7 freq:6552
  # PRED: 3 [72.0%]  (false,exec)
  goto <bb 5>;
  # SUCC: 5 [100.0%]  (fallthru)

  # BLOCK 4 freq:2548
  # PRED: 3 [28.0%]  (true,exec)
  i_7 = i_31 + 1;
  # SUCC: 5 [100.0%]  (fallthru,exec)

  # BLOCK 5 freq:9100
  # PRED: 7 [100.0%]  (fallthru) 4 [100.0%]  (fallthru,exec)
  # i_1 = PHI <i_31(7), i_7(4)>
  D.1253_8 = si1_3 % si2_4;
  r.1_10 ={v} r;
  D.1254_9 = D.1253_8 + r.1_10;
  r.2_11 = D.1254_9 + i_1;
  r ={v} r.2_11;
  i_12 = i_1 + 1;
  if (i_12 <= 99)
    goto <bb 8>;
  else
    goto <bb 6>;
  # SUCC: 8 [90.1%]  (true,exec) 6 [9.9%]  (false,exec)

  # BLOCK 8 freq:8200
  # PRED: 5 [90.1%]  (true,exec)
  goto <bb 3>;
  # SUCC: 3 [100.0%]  (fallthru)

  # BLOCK 6 freq:900
  # PRED: 5 [9.9%]  (false,exec)
  abort ();
  # SUCC:

does not model the fact that foo () does not return.

Danny, do you have any suggestion (besides to try to avoid trapping stuff
somehow) to model this?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dberlin at gcc dot gnu dot
                   |                            |org


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


  parent reply	other threads:[~2009-01-16 20:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-12 20:55 [Bug tree-optimization/38819] New: " jsm28 at gcc dot gnu dot org
2009-01-13  9:51 ` [Bug tree-optimization/38819] " rguenth at gcc dot gnu dot org
2009-01-15 16:01 ` rguenth at gcc dot gnu dot org
2009-01-16 11:22 ` jakub at gcc dot gnu dot org
2009-01-16 11:41 ` rguenth at gcc dot gnu dot org
2009-01-16 20:05 ` rguenth at gcc dot gnu dot org [this message]
2009-01-16 20:25 ` rguenth at gcc dot gnu dot org
2009-01-16 20:44 ` pinskia at gcc dot gnu dot org
2009-01-16 20:48 ` dberlin at dberlin dot org
2009-01-16 21:01 ` rguenther at suse dot de
2009-01-16 21:07 ` dberlin at dberlin dot org
2009-01-16 22:25 ` rguenth at gcc dot gnu dot org
2009-01-16 22:26 ` rguenth at gcc dot gnu dot org
2009-01-16 22:51 ` rguenth at gcc dot gnu dot org
2009-01-18 15:49 ` [Bug tree-optimization/38819] [4.2/4.3 " rguenth at gcc dot gnu dot org
2009-01-18 15:51 ` rguenth at gcc dot gnu dot org
2009-02-08 18:00 ` ebotcazou at gcc dot gnu dot org
2009-03-31 21:07 ` [Bug tree-optimization/38819] [4.3 " jsm28 at gcc dot gnu dot org
2009-08-04 12:46 ` rguenth at gcc dot gnu dot org
2010-03-12 21:00 ` davem at gcc dot gnu dot org
2010-03-12 21:27 ` ebotcazou at gcc dot gnu dot org
2010-03-13 11:04 ` rguenth at gcc dot gnu dot org
2010-05-22 18:29 ` rguenth at gcc dot gnu dot org
2010-08-07  8:26 ` ubizjak at gmail dot com

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=20090116200457.31471.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).