This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, 1 of 4 or 5], Enhance PowerPC vec_extract support for power8/power9 machines
- 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>
- Date: Wed, 27 Jul 2016 14:35:18 -0500
- Subject: Re: [PATCH, 1 of 4 or 5], Enhance PowerPC vec_extract support for power8/power9 machines
- Authentication-results: sourceware.org; auth=none
- References: <20160727143221.GA18453@ibm-tiger.the-meissners.org>
On Wed, Jul 27, 2016 at 10:32:21AM -0400, Michael Meissner wrote:
> 2016-07-27 Michael Meissner <meissner@linux.vnet.ibm.com>
>
> * config/rs6000/vector.md (vec_extract<mode>): Change the calling
> signature of rs6000_expand_vector_extract so that the element
> number is a RTX instead of a constant integer.
> * config/rs6000/rs6000-protos.h (rs6000_expand_vector_extract):
> Likewise.
> * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Likewise.
> (altivec_expand_vec_ext_builtin): Likewise.
> * config/rs6000/altivec.md (reduc_plus_scal_<mode>): Likewise.
> * config/rs6000/vsx.md (vsx_extract_<mode>): Fix spelling of the
> MFVSRLD instruction.
> @@ -14658,14 +14661,18 @@ altivec_expand_vec_ext_builtin (tree exp
> {
> machine_mode tmode, mode0;
> tree arg0, arg1;
> - int elt;
> rtx op0;
> + rtx op1;
You could put op0, op1 on one line, or better yet, declare them where
they are first initialised.
> --- gcc/config/rs6000/vsx.md (revision 238772)
> +++ gcc/config/rs6000/vsx.md (working copy)
> @@ -2159,7 +2159,7 @@ (define_insn "vsx_extract_<mode>"
>
> else if (element == VECTOR_ELEMENT_MFVSRLD_64BIT && INT_REGNO_P (op0_regno)
> && TARGET_P9_VECTOR && TARGET_POWERPC64 && TARGET_DIRECT_MOVE)
> - return "mfvsrdl %0,%x1";
> + return "mfvsrld %0,%x1";
Later patches have some testcases?
This is okay for trunk, with or without the cosmetic change. Thanks,
Segher