[PATCH, rs6000 V2] Add support for vec_extract_fp_from_shorth() and vec_extract_fp_from_short

Segher Boessenkool segher@kernel.crashing.org
Fri Jul 14 19:51:00 GMT 2017


Hi Carl,

> Also, per the note from Segher I could use xxperm instead of vperm, I
> stayed with the vperm instruction.  I don't see any functional or
> performance advantage of the xxperm over vperm.

xxperm does the same as vperm, but for all vector registers instead
of only v0..v31.  Since xvcvhpsp allows all registers as well, there
is no real reason to restrict to "v" (instead of "wa") as far as I see.

> +;; Generate vector extract four float 32 values from left four elements
> +;; of eight element vector of float 16 values.
> +(define_expand "vextract_fp_from_shorth"
> +  [(set (match_operand:V4SF 0 "register_operand" "=v")
> +	(unspec:V4SF [(match_operand:V8HI 1 "register_operand" "v")]
> +	UNSPEC_VSX_VEXTRACT_FP_FROM_SHORTH))]

Nit: this last line should be indented the same as the [ on the line
above (both are arguments to the unspec).

Okay for trunk with those fixed.  Thanks,


Segher



More information about the Gcc-patches mailing list