On 18/09/15 09:35, Richard Biener wrote:
Btw, we ditched the original reduce-to-vector variant due to its endianess issues (it only had _one_ element of the vector contain the reduction result). Re-introducing reduce-to-vector but with the reduction result in all elements wouldn't have any issue like that. Of course it would introduce a third optab variant similar to the old (now legacy) version but with different semantics...
I am working (again) on finishing this migration, and think I have fixed the endianness issues on PowerPC, patch posted just now. MIPS/Loongson, I'm still struggling with; AFAICT, they implement their own reduc_ pattern for most cases, which for the most part repeats the midend's approach using shifts, but the first step uses a funky permute, as they have a faster instruction for this...
--Alan