On Thu, Nov 10, 2016 at 07:21:15PM -0500, Michael Meissner wrote: > --- gcc/config/rs6000/vsx.md (revision 242048) > +++ gcc/config/rs6000/vsx.md (revision 242049) > @@ -2542,10 +2542,13 @@ (define_insn "vsx_extract_<mode>_p9" > "VECTOR_MEM_VSX_P (<MODE>mode) && TARGET_VEXTRACTUB > && TARGET_VSX_SMALL_INTEGER" > { > - /* Note, the element number has already been adjusted for endianness, so we > - don't have to adjust it here. */ > - int unit_size = GET_MODE_UNIT_SIZE (<MODE>mode); > - HOST_WIDE_INT offset = unit_size * INTVAL (operands[2]); > + HOST_WIDE_INT elt = INTVAL (operands[2]); > + HOST_WIDE_INT elt_adj = ((!VECTOR_ELT_ORDER_BIG) > + ? (GET_MODE_NUNITS (<MODE>mode) - 1 - elt) > + : elt);
Two unnecessary pairs of parens (three, but emacs likes the outer pair?) Otherwise looks fine. Okay for trunk with that fix, thanks, Segher