From: Richard Henderson <rth@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Uros Bizjak <ubizjak@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Optimize (x * 8) | 5 and (x << 3) ^ 3 to use lea (PR target/48688)
Date: Wed, 20 Apr 2011 17:51:00 -0000 [thread overview]
Message-ID: <4DAF1788.7060306@redhat.com> (raw)
In-Reply-To: <20110420160959.GR17079@tyan-ft48-01.lab.bos.redhat.com>
On 04/20/2011 09:09 AM, Jakub Jelinek wrote:
> Hi!
>
> This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y
> for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in
> that case, when the low bits are known to be all 0, is like plus).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2011-04-20 Jakub Jelinek <jakub@redhat.com>
>
> PR target/48688
> * config/i386/i386.md (*lea_general_4): New define_insn_and_split.
Any chance you could do this in combine instead? Shift-and-add patterns
are a fairly common architectural feature...
r~
next prev parent reply other threads:[~2011-04-20 17:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 16:36 Jakub Jelinek
2011-04-20 17:51 ` Richard Henderson [this message]
2011-04-21 13:01 ` Jakub Jelinek
2011-06-04 15:20 ` H.J. Lu
2011-06-04 15:40 ` Jakub Jelinek
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=4DAF1788.7060306@redhat.com \
--to=rth@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=ubizjak@gmail.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).