[PATCH 4/4][Vectorizer]Make reductions-via-shifts and vec_shr_optab endianness-neutral

2014-11-12 Thread Alan Lawrence
This redefines vec_shr optab to be the same (in terms of gcc vectors) regardless of target endianness. The vectorizer uses this to do reductions via shifts, so also change the vectorizer to shift things always the same way (from the midend's POV of vectors). cross-tested check-gcc on (1) aarch

Re: [PATCH 4/4][Vectorizer]Make reductions-via-shifts and vec_shr_optab endianness-neutral

2014-11-13 Thread Richard Biener
On Wed, Nov 12, 2014 at 6:56 PM, Alan Lawrence wrote: > This redefines vec_shr optab to be the same (in terms of gcc vectors) > regardless of target endianness. The vectorizer uses this to do reductions > via shifts, so also change the vectorizer to shift things always the same > way (from the mid