This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Add support for vec_rlnm and vec_rlmi
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Mon, 16 Jan 2017 16:24:32 -0600
- Subject: Re: [PATCH, rs6000] Add support for vec_rlnm and vec_rlmi
- Authentication-results: sourceware.org; auth=none
- References: <26e01065-a7b2-9a11-96e9-579ad3e1614b@linux.vnet.ibm.com>
Hi Bill,
A few comments:
On Mon, Jan 16, 2017 at 12:12:22PM -0600, Bill Schmidt wrote:
> * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
> function entry.
I had to look up if "monomorphic" is an existing word in this context.
Unfortunately it is, sigh (it clashes hard with all the more common
meanings).
> --- gcc/config/rs6000/altivec.h (revision 244498)
> +++ gcc/config/rs6000/altivec.h (working copy)
> @@ -168,6 +168,9 @@
> #define vec_re __builtin_vec_re
> #define vec_round __builtin_vec_round
> #define vec_recipdiv __builtin_vec_recipdiv
> +#define vec_rlmi __builtin_vec_rlmi
> +#define vec_vrlnm __builtin_vec_rlnm
> +#define vec_rlnm(a,b,c) (__builtin_vec_rlnm(a,(b<<8)|c))
This needs parens around the arguments.
> +The result of @code{vec_rlmi} is obtained by rotating each element of
> +the first argument vector left and inserting it under mask into the
> +second argument vector.
Did you swap first and second here?
Okay for trunk with those points addressed. Thanks!
Segher