public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Kai Tietz <ktietz@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [patch tree-ssa-math-opts]: Improve bswap detection
Date: Mon, 27 Jun 2011 10:08:00 -0000	[thread overview]
Message-ID: <BANLkTimq2h2PKR+t=rjvnKdeYKXs7XtqdA@mail.gmail.com> (raw)
In-Reply-To: <400461904.779176.1309161973367.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>

On Mon, Jun 27, 2011 at 10:06 AM, Kai Tietz <ktietz@redhat.com> wrote:
> Hello,
>
> this patch improves the bswap (32/64) detection and fixes an issue about shifted bit values out of type-size precision.
>
> ChangeLog
>
> 2011-06-27  Kai Tietz  <ktietz@redhat.com>
>
>        * tree-ssa-math-opts.c (do_shift_rotate): Zero bits
>        out of type precision after operation.
>        (find_bswap): Take for limit value the integer auto-
>        promotion into account.
>
> ChangeLog
>
> 2011-06-27  Kai Tietz  <ktietz@redhat.com>
>
>        * gcc.dg/optimize-bswapdi-2.c: New test.
>
> Bootstrapped and regression tested for x86_64-pc-linux-gnu. Ok for apply?

The do_shift_rotate hunk is ok.  Where did you get the testcase from?
I can easily construct testcases that go via an intermediate SImode step
and the still won't be recongized.  Thus, is the testcase practically
relevant?  If so we should add 1 + log2 (byte-size) instead of 3 to also
cover the SImode -> HImode intermediate case.

Thanks,
Richard.

> Regards,
> Kai
>

  reply	other threads:[~2011-06-27  9:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1518076949.779173.1309161963786.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com>
2011-06-27  8:50 ` Kai Tietz
2011-06-27 10:08   ` Richard Guenther [this message]
2011-06-27 10:13     ` Kai Tietz
2011-06-27 10:16       ` Richard Guenther

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='BANLkTimq2h2PKR+t=rjvnKdeYKXs7XtqdA@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ktietz@redhat.com \
    /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).