This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Add support for vbpermd instruction and vec_bperm API
- 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: Tue, 17 Jan 2017 11:55:58 -0600
- Subject: Re: [PATCH, rs6000] Add support for vbpermd instruction and vec_bperm API
- Authentication-results: sourceware.org; auth=none
- References: <7ec89c09-4ca0-bfaa-f1cf-dcbe340ce6c5@linux.vnet.ibm.com>
Hi Bill,
On Tue, Jan 17, 2017 at 09:58:52AM -0600, Bill Schmidt wrote:
> Bootstrapped and tested on powerpc64-unknown-linux-gnu and on
> powerpc64le-unknown-linux-gnu with no regressions. Is this ok for
> trunk?
Yes this is fine. Just one trivial remark, fix it or not, your choice...
> +; One of the vector API interfaces requires returning vector unsigned char.
> +(define_insn "altivec_vbpermq2"
> + [(set (match_operand:V16QI 0 "register_operand" "=v")
> + (unspec:V16QI [(match_operand:V16QI 1 "register_operand" "v")
> + (match_operand:V16QI 2 "register_operand" "v")]
> + UNSPEC_VBPERMQ))]
> + "TARGET_P8_VECTOR"
> + "vbpermq %0,%1,%2"
> + [(set_attr "length" "4")
> + (set_attr "type" "vecsimple")])
Length 4 is the default (so you can just leave it out). This is less
clutter, and makes it clearer where the length is *not* the default.
Segher