This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, rs6000] Fold vector shifts in GIMPLE
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: will_schmidt at vnet dot ibm dot com, GCC Patches <gcc-patches at gcc dot gnu dot org>, Segher Boessenkool <segher at kernel dot crashing dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Date: Thu, 1 Jun 2017 10:17:13 +0200
- Subject: Re: [PATCH, rs6000] Fold vector shifts in GIMPLE
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D5061C04B326
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D5061C04B326
- References: <firstname.lastname@example.org> <CAFiYyc0Y5kfe7hbF_DtpbE0cdOWu+0GZawn1-LBKceGdLRdrjA@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 01, 2017 at 09:48:37AM +0200, Richard Biener wrote:
> On Wed, May 31, 2017 at 10:01 PM, Will Schmidt
> <email@example.com> wrote:
> > Hi,
> > Add support for early expansion of vector shifts. Including
> > vec_sl (shift left), vec_sr (shift right), vec_sra (shift
> > right algebraic), vec_rl (rotate left).
> > Part of this includes adding the vector shift right instructions to
> > the list of those instructions having an unsigned second argument.
> > The VSR (vector shift right) folding is a bit more complex than
> > the others. This is due to requiring arg0 be unsigned for an algebraic
> > shift before the gimple RSHIFT_EXPR assignment is built.
> Jakub, do we sanitize that undefinedness of left shifts of negative values
> and/or overflow of left shift of nonnegative values?
We don't yet, see PR77823 - all I've managed to do before stage1 was over
was instrumentation of signed arithmetic integer overflow on vectors,
division, shift etc. are tasks maybe for this stage1.
That said, shift instrumentation in particular is done early because every
FE has different rules, and so if it is coming from target builtins that are
folded into something, it wouldn't be instrumented anyway.