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/37102] [4.3/4.4 Regression] possible integer codegen bug
Date: Thu, 28 Aug 2008 14:49:00 -0000	[thread overview]
Message-ID: <20080828144812.21376.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37102-12544@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from rguenth at gcc dot gnu dot org  2008-08-28 14:48 -------
It looks like that we correctly track liveliness by

Live on entry to BB2 :

Live on entry to BB3 : a_lsm.27_5

Live on entry to BB4 : a_lsm.27_5

Live on entry to BB5 :

Live on entry to BB6 :

for

  # BLOCK 2 freq:2000
  # PRED: ENTRY [100.0%]  (fallthru,exec)
  c.0_4 = c;
  a_lsm.27_5 = b;
  a_lsm.27_1 = a;
  if (c.0_4 != 0)
    goto <bb 3>;
  else
    goto <bb 4>;
  # SUCC: 4 [50.0%]  (false,exec) 3 [50.0%]  (true,exec)

  # BLOCK 3 freq:1000
  # PRED: 2 [50.0%]  (true,exec)
  # SUCC: 4 [100.0%]  (fallthru,exec)

  # BLOCK 4 freq:2000
  # PRED: 3 [100.0%]  (fallthru,exec) 2 [50.0%]  (false,exec)
  # a_lsm.27_29 = PHI <a_lsm.27_5(3), a_lsm.27_1(2)>
  a = a_lsm.27_5;
  e_9 = a_lsm.27_5 << 1;
  if (e_9 != 0)
    goto <bb 5>;
  else
    goto <bb 6>;
  # SUCC: 5 [54.0%]  (true,exec) 6 [46.0%]  (false,exec)


and based on this create the conflict graph.  But we still (blindly)
generate copies for the (dead) PHI node in BB4 which causes conflicts
that we didn't see.

So, why exactly do we generate copies for a PHI node which result is
not live-in in its BB?  Andrew - you are probably most familiar with
the out-of-SSA code, can you have a look here?  (the dead PHI node is
caused by the last DSE pass which removes the last use of it and there
is no other DCE pass to clean that up).

Jakubs testcase from comment #3 at -O3.

My humble "fix" for this would be to exchange 118.cddce with 120.dse which
should hide this problem.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com


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


  parent reply	other threads:[~2008-08-28 14:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13  3:46 [Bug c/37102] New: " regehr at cs dot utah dot edu
2008-08-13  9:54 ` [Bug tree-optimization/37102] [4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-08-13  9:55 ` rguenth at gcc dot gnu dot org
2008-08-14 10:04 ` jakub at gcc dot gnu dot org
2008-08-18 13:58 ` jsm28 at gcc dot gnu dot org
2008-08-26 13:39 ` cnstar9988 at gmail dot com
2008-08-27 22:13 ` jsm28 at gcc dot gnu dot org
2008-08-28 14:49 ` rguenth at gcc dot gnu dot org [this message]
2008-09-04 14:54 ` [Bug tree-optimization/37102] [4.3/4.4 Regression] out-of-SSA is broken rguenth at gcc dot gnu dot org
2008-09-04 16:10 ` amacleod at redhat dot com
2008-09-04 16:19 ` rguenth at gcc dot gnu dot org
2008-09-04 16:53 ` amacleod at redhat dot com
2008-09-15  1:04 ` lthode at mail dot unomaha dot edu
2008-09-17 14:26 ` rguenth at gcc dot gnu dot org
2008-09-17 14:35 ` amacleod at redhat dot com
2008-09-17 14:39 ` rguenth at gcc dot gnu dot org
2008-09-17 14:40 ` amacleod at redhat dot com
2008-09-17 14:49 ` amacleod at redhat dot com
2008-09-17 21:57 ` amacleod at redhat dot com
2008-09-18 14:01 ` amacleod at gcc dot gnu dot org
2008-09-18 20:06 ` [Bug tree-optimization/37102] [4.3 " amacleod at redhat dot com
2008-09-27 11:33 ` cnstar9988 at gmail dot com
2008-10-10  0:57 ` cnstar9988 at gmail dot com
2008-10-12 19:59 ` lthode at mail dot unomaha dot edu
2008-10-17 17:38 ` amacleod at gcc dot gnu dot org
2008-10-18 11:19 ` rguenth 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=20080828144812.21376.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).