From: Richard Guenther <richard.guenther@gmail.com>
To: Richard Henderson <rth@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 0/7] Clean up widen mult even/odd
Date: Tue, 10 Jul 2012 09:03:00 -0000 [thread overview]
Message-ID: <CAFiYyc03UWEJcVQdsacydXYDusioGmrdwarkCZowWgDaxJQu+A@mail.gmail.com> (raw)
In-Reply-To: <1341908571-30346-1-git-send-email-rth@redhat.com>
On Tue, Jul 10, 2012 at 10:22 AM, Richard Henderson <rth@redhat.com> wrote:
> I find it instructive that 4 of the 5 isas that actually implement
> widening integer multiplication do have mult-widen-even as the isa
> primitive (even if the -odd variant is missing). The fact that this
> operation is implemented as a set of builtins and target hooks has
> lead to disturbingly cookie-cutter implementations of these hooks
> in the various backends.
>
> Thus I choose to add VEC_WIDEN_MULT_EVEN/ODD_EXPR as tree codes and
> optabs. This removes a farily trivial amount of code from three
> backends (the fourth backend, ia64, never grew this support).
>
> The existance of optabs then allows the expansion of MULT_HIGHPART_EXPR
> at the rtl-expansion level without having to resort to builtin expansion
> in order to emit the even/odd alternative. This saves a fairly
> substantial amount of code from the vectorizer.
>
> I've not touched the interface to supportable_widening_operation,
> which is still prepared to return a CALL_EXPR and some decls. After
> this patch set it will never do so. I'm undecided as to whether we
> ought to be prepared for such in the future, or whether this should
> simply go in as a completely separate patch that could in the future
> be easily reverted.
>
> Tested on x86_64; cross-compiled to ppc64 and spu, spot checking the
> relevant division-by-constant testcases.
Thanks,
This looks all good!
Richard.
>
> r~
>
>
>
> Richard Henderson (7):
> Add VEC_WIDEN_MULT_EVEN/ODD_EXPR
> i386: Rename patterns for vec_widen_<s>mult_even/odd_<mode>
> rs6000: Rename patterns for vec_widen_<s>mult_even/odd_<mode>
> spu: Rename patterns for vec_widen_<s>mult_even/odd_<mode>
> Move vector highpart emulation to the optabs layer
> Use VEC_WIDEN_MULT_EVEN/ODD_EXPR in supportable_widening_operation
> Zap now unused builtin_mul_widen_even/odd target hooks
>
> gcc/ChangeLog | 89 ++++++++++++
> gcc/cfgexpand.c | 4 +-
> gcc/config/i386/i386.c | 103 ++-----------
> gcc/config/i386/sse.md | 18 +--
> gcc/config/rs6000/altivec.md | 54 +++----
> gcc/config/rs6000/rs6000-builtin.def | 24 +--
> gcc/config/rs6000/rs6000.c | 51 -------
> gcc/config/spu/spu-builtins.def | 24 +--
> gcc/config/spu/spu-builtins.md | 65 ---------
> gcc/config/spu/spu.c | 42 ------
> gcc/config/spu/spu.md | 86 +++++++++--
> gcc/doc/md.texi | 12 +-
> gcc/doc/tm.texi | 22 ---
> gcc/doc/tm.texi.in | 22 ---
> gcc/expmed.c | 32 ++--
> gcc/expr.c | 35 ++---
> gcc/fold-const.c | 36 +++--
> gcc/genopinit.c | 4 +
> gcc/gimple-pretty-print.c | 2 +
> gcc/optabs.c | 134 +++++++++++++++++
> gcc/optabs.h | 18 ++-
> gcc/system.h | 4 +-
> gcc/target.def | 14 --
> gcc/tree-cfg.c | 2 +
> gcc/tree-inline.c | 2 +
> gcc/tree-pretty-print.c | 32 ++--
> gcc/tree-vect-generic.c | 145 +++++-------------
> gcc/tree-vect-patterns.c | 23 +--
> gcc/tree-vect-stmts.c | 267 +++++++++-------------------------
> gcc/tree.c | 2 +
> gcc/tree.def | 4 +
> 31 files changed, 580 insertions(+), 792 deletions(-)
>
> --
> 1.7.10.4
>
next prev parent reply other threads:[~2012-07-10 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 8:23 Richard Henderson
2012-07-10 8:23 ` [PATCH 2/7] i386: Rename patterns for vec_widen_<s>mult_even/odd_<mode> Richard Henderson
2012-07-10 8:23 ` [PATCH 5/7] Move vector highpart emulation to the optabs layer Richard Henderson
2012-07-10 8:23 ` [PATCH 3/7] rs6000: Rename patterns for vec_widen_<s>mult_even/odd_<mode> Richard Henderson
2012-07-10 8:23 ` [PATCH 4/7] spu: " Richard Henderson
2012-07-10 8:23 ` [PATCH 1/7] Add VEC_WIDEN_MULT_EVEN/ODD_EXPR Richard Henderson
2012-07-10 8:23 ` [PATCH 6/7] Use VEC_WIDEN_MULT_EVEN/ODD_EXPR in supportable_widening_operation Richard Henderson
2012-07-10 8:23 ` [PATCH 7/7] Zap now unused builtin_mul_widen_even/odd target hooks Richard Henderson
2012-07-10 9:03 ` Richard Guenther [this message]
2012-07-10 9:12 ` [PATCH 0/7] Clean up widen mult even/odd Jakub Jelinek
2012-07-17 12:32 ` Richard Henderson
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=CAFiYyc03UWEJcVQdsacydXYDusioGmrdwarkCZowWgDaxJQu+A@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rth@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).