[PATCH, rs6000] Add support for vbpermd instruction and vec_bperm API

Segher Boessenkool segher@kernel.crashing.org
Tue Jan 17 17:57:00 GMT 2017


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



More information about the Gcc-patches mailing list