On Thu, Sep 18, 2014 at 8:42 AM, Alan Lawrence <alan.lawre...@arm.com> 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. > > gcc/ChangeLog: > > * fold-const.c (const_binop): VEC_RSHIFT_EXPR always shifts towards > element 0. > > * tree-vect-loop.c (vect_create_epilog_for_reduction): always > extract > the result of a reduction with vector shifts from element 0. > > * tree.def (VEC_RSHIFT_EXPR, VEC_LSHIFT_EXPR): Comment shift > direction. > > * 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 > aarch64-none-elf.
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. Thanks, David