[PATCH 12/14][Vectorizer] Redefine VEC_RSHIFT_EXPR and vec_shr_optab as endianness-neutral
Thu Sep 18 13:12:00 GMT 2014
On Thu, Sep 18, 2014 at 8:42 AM, Alan Lawrence <firstname.lastname@example.org> wrote:
> The direction of VEC_RSHIFT_EXPR has been endian-dependent, contrary to the
> general principles of tree. This patch updates fold-const and the vectorizer
> (the only place where such expressions are created), such that
> VEC_RSHIFT_EXPR always shifts towards element 0.
> The tree code still maps directly onto the vec_shr_optab, and so this patch
> *will break any bigendian platform defining the vec_shr optab*.
> --> For AArch64_be, patch follows next in series;
> --> For PowerPC, I think patch/rfc 15 should fix, please inspect;
> --> For MIPS, I think patch/rfc 16 should fix, please inspect.
> * fold-const.c (const_binop): VEC_RSHIFT_EXPR always shifts towards
> element 0.
> * tree-vect-loop.c (vect_create_epilog_for_reduction): always
> the result of a reduction with vector shifts from element 0.
> * tree.def (VEC_RSHIFT_EXPR, VEC_LSHIFT_EXPR): Comment shift
> * doc/md.texi (vec_shr_m, vec_shl_m): Document shift direction.
> Testing Done:
> Bootstrap and check-gcc on x86_64-none-linux-gnu; check-gcc on
Why wasn't this tested on the PowerLinux system in the GCC Compile Farm?
Also, Bill Schmidt can help check the PPC parts fo the patches.
More information about the Gcc-patches