This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, rs6000] Fold vector shifts in GIMPLE


On Thu, Jun 01, 2017 at 09:48:37AM +0200, Richard Biener wrote:
> On Wed, May 31, 2017 at 10:01 PM, Will Schmidt
> <will_schmidt@vnet.ibm.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.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]