This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Consider lrotate const rotation in vectorizer
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, "Kewen.Lin" <linkw at linux dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <richard dot sandiford at arm dot com>, Bill Schmidt <wschmidt at linux dot ibm dot com>
- Date: Thu, 18 Jul 2019 12:28:36 -0500
- Subject: Re: [RFC] Consider lrotate const rotation in vectorizer
- References: <232a38b1-76c2-476d-1be0-a1958e5624bb@linux.ibm.com> <20190715085929.GO2125@tucnak> <d2ccc831-c805-c7b8-5a90-cb3e5ee5ed8b@linux.ibm.com> <32f89c4f-cd2d-a7bd-16d2-26fed6bb5f56@linux.ibm.com> <CAFiYyc1rVc=GsJTN1w9B5DAGATjrcb7vYp8UH1Sqjbm-G2vZzQ@mail.gmail.com> <20190717105432.GG2125@tucnak> <20190717170032.GO20882@gate.crashing.org> <be588062-aaf0-dc41-abe5-61a076bf527a@arm.com>
On Thu, Jul 18, 2019 at 04:12:48PM +0100, Richard Earnshaw (lists) wrote:
>
>
> On 17/07/2019 18:00, Segher Boessenkool wrote:
> >On Wed, Jul 17, 2019 at 12:54:32PM +0200, Jakub Jelinek wrote:
> >>On Wed, Jul 17, 2019 at 12:37:59PM +0200, Richard Biener wrote:
> >>>I'm not sure if it makes sense to have both LROTATE_EXPR and
> >>>RROTATE_EXPR on the GIMPLE level then (that CPUs only
> >>>support one direction is natural though). So maybe simply get
> >>>rid of one? Its semantics are also nowhere documented
> >>
> >>A lot of targets support both,
> >
> >Of all the linux targets, we have:
> >
> >No rotate:
> > alpha microblaze riscv sparc
> >
> >Both directions:
> > aarch64 c6x ia64 m68k nios2 parisc sh x86 xtensa
>
> AArch64 is Right only.
This is whether a port has any rotate resp. rotatert in recog, which
generates HAVE_rotate and HAVE_rotatert in insn-config.h .
If the hardware can only do right rotates you should either handle
immediate left rotates everywhere as well, or avoid using left rotates
in define_expand and define_insn.
Segher