This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR 78243 on PowerPC


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]