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/65917] [6 Regression] FAIL: gcc.dg/tree-ssa/20030922-2.c scan-tree-dump-times dom1 "if " 2
Date: Wed, 29 Apr 2015 08:45:00 -0000	[thread overview]
Message-ID: <bug-65917-4-gkUKCzGXeu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65917-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|law at redhat dot com              |rguenth at gcc dot gnu.org
            Summary|[6.0 regression] FAIL:      |[6 Regression] FAIL:
                   |gcc.dg/tree-ssa/20030922-2. |gcc.dg/tree-ssa/20030922-2.
                   |c scan-tree-dump-times dom1 |c scan-tree-dump-times dom1
                   |"if " 2                     |"if " 2

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So on x86_64 ifcombine has "removed" the if but after dom1 we still have

  _14 = *_13;
  if (_8 != _14)
    goto <bb 3>;
  else
    goto <bb 5>;

  <bb 3>:
  target_bb.1_15 = target_bb;
  _16 = _8 != target_bb.1_15;
  _17 = _14 == target_bb.1_15;
  _18 = _16 & _17;
  if (_18 != 0)

which shows that running ifcombine before DOM might not be the best idea.

It also shows that the testcase should disable ifcombine to really test what it
was supposed to test.  And then it also fails on x86_64.

VRP does optimize this case because it has a more powerful way to track
equivalences (and does a quadratic job in trying to simplify compares using
all equivalences of the lhs vs all equivalences of the rhs).

Which is another hint at the fact that DOM maybe shouldn't treat equivalences
derived from conditionals in the SSA_VALUE table where you can't really record
both _14 = target_bb.1_15 and target_bb.1_15 = _14 (which would get you a
nice cycle there).

For the existing way of DOM handlign this I don't see anything in the testcase
that could be used to build a new heuristic (in fact another heuristic
would say that what we do now is good -- _14 dies at the point where we
build the equivalency, target_bb.1_15 does not, so we don't want to propagate
_14 because that will increase its lifetime!)

I suggest to "fix" the testcase and XFAIL it.  I'll take care of that.


  parent reply	other threads:[~2015-04-29  8:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 13:55 [Bug tree-optimization/65917] New: [6.0 regression] " schwab@linux-m68k.org
2015-04-28 14:06 ` [Bug tree-optimization/65917] " rguenth at gcc dot gnu.org
2015-04-28 14:51 ` schwab@linux-m68k.org
2015-04-28 14:58 ` law at redhat dot com
2015-04-28 16:24 ` law at redhat dot com
2015-04-29  8:45 ` rguenth at gcc dot gnu.org [this message]
2015-04-29  8:51 ` [Bug tree-optimization/65917] [6 Regression] " rguenth at gcc dot gnu.org
2015-04-29  8:52 ` [Bug tree-optimization/65917] [6 Regression] XFAIL: " rguenth at gcc dot gnu.org
2023-03-24  7:35 ` 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-65917-4-gkUKCzGXeu@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).