This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 78243 on PowerPC
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>, Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, Aaron Sawdey <acsawdey at linux dot vnet dot ibm dot com>
- Date: Thu, 10 Nov 2016 19:03:01 -0600
- Subject: Re: [PATCH] Fix PR 78243 on PowerPC
- Authentication-results: sourceware.org; auth=none
- References: <20161111002115.GA30042@ibm-tiger.the-meissners.org>
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