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 middle-end/28685] Multiple comparisons are not simplified
Date: Tue, 25 May 2010 08:12:00 -0000	[thread overview]
Message-ID: <20100525081155.15212.qmail@sourceware.org> (raw)
In-Reply-To: <bug-28685-1649@http.gcc.gnu.org/bugzilla/>



------- Comment #14 from rguenther at suse dot de  2010-05-25 08:11 -------
Subject: Re:  Multiple comparisons are not simplified

On Mon, 24 May 2010, sandra at codesourcery dot com wrote:

> ------- Comment #13 from sandra at codesourcery dot com  2010-05-24 13:21 -------
> I'm working on a patch that fixes the test case in comment #5 (originally filed
> as PR 39874) and some other test cases by improving the comparison combination
> logic in both tree-ssa-ifcombine and tree-ssa-reassoc.
> 
> The test case in comment #4 is a somewhat different problem -- maybe it is a
> VRP failure?  The problem is figuring out the right place to attempt to combine
> the comparisons....

In this case it is probably phiopt that could recognize this (though
it does not do the kind of transformation).  It could transform

<bb 2>:
  eq_5 = a_2(D) == b_3(D);
  if (a_2(D) < b_3(D))
    goto <bb 4>;
  else
    goto <bb 3>;

<bb 3>:

<bb 4>:
  # eq_1 = PHI <1(2), eq_5(3)>
  return eq_1;

to

<bb 2>:
  if (a_2(D) <= b_3(D))
    goto <bb 4>;
  else
    goto <bb 3>;

<bb 3>:

<bb 4>:
  # eq_1 = PHI <1(2), 0(3)>
  return eq_1;

and eventually further if-convert that.

Richard.


-- 


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


  parent reply	other threads:[~2010-05-25  8:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 18:15 [Bug middle-end/28685] New: " uros at kss-loka dot si
2006-08-10 18:18 ` [Bug middle-end/28685] " pinskia at gcc dot gnu dot org
2008-04-30 15:13 ` rguenth at gcc dot gnu dot org
2008-09-06 16:34 ` ubizjak at gmail dot com
2008-10-12 20:46 ` rguenth at gcc dot gnu dot org
2009-04-24  9:24 ` rguenth at gcc dot gnu dot org
2009-04-24  9:25 ` rguenth at gcc dot gnu dot org
2009-06-24  7:49 ` steven at gcc dot gnu dot org
2009-06-24  9:15 ` rguenth at gcc dot gnu dot org
2009-09-17 10:25 ` ubizjak at gmail dot com
2010-05-07  2:32 ` sandra at codesourcery dot com
2010-05-08  3:44 ` sandra at codesourcery dot com
2010-05-08 15:54 ` sandra at gcc dot gnu dot org
2010-05-24 13:22 ` sandra at codesourcery dot com
2010-05-25  8:12 ` rguenther at suse dot de [this message]
2010-06-01  2:24 ` sandra at codesourcery dot com
2010-06-08 18:16 ` sandra at gcc dot gnu dot org
     [not found] <bug-28685-4@http.gcc.gnu.org/bugzilla/>
2012-01-12  1:07 ` pinskia at gcc dot gnu.org
2012-02-05 12:42 ` ubizjak at gmail dot com
2012-02-06 21:37 ` ubizjak at gmail dot com
2012-04-22 12:42 ` ubizjak at gmail dot com
2012-04-22 12:46 ` ubizjak at gmail dot com
2012-04-22 12:48 ` ubizjak at gmail dot com
2014-10-31  4:02 ` pinskia 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=20100525081155.15212.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).