[PATCH 1/6] rs6000, Update support for vec_extract

Segher Boessenkool segher@kernel.crashing.org
Wed Jun 3 23:01:51 GMT 2020


Hi carl,

On Mon, Jun 01, 2020 at 09:14:33AM -0700, Carl Love wrote:
>         * config/rs6000/altivec.md: Move UNSPEC_EXTRACTL, UNSPEC_EXTRACTR
> 	declarations to gcc/config/rs6000/vsx.md.
> 	(define_expand): Move vextractl<mode> and vextractr<mode> to
> 	gcc/config/rs6000/vsx.md.
> 	(define_insn): Move vextractl<mode>_internal and vextractr<mode>_internal
> 	to gcc/config/rs6000/vsx.md.

	* config/rs6000/altivec.md (UNSPEC_EXTRACTL, UNSPEC_EXTRACTR)
	(vextractl<mode>, vextractr<mode>)
	(vextractl<mode>_internal, vextractr<mode>_internal): Move to ...

> 	* config/rs6000/vsx.md: Code moved from file config/rs6000/altivec.md.

	* config/rs6000/vsx.md (UNSPEC_EXTRACTL, UNSPEC_EXTRACTR)
	(vextractl<mode>, vextractr<mode>)
	(vextractl<mode>_internal, vextractr<mode>_internal): ... here.

You can probably do this some less formal way, but (define_insn) as
name is a bit much ;-)

> 	* gcc/doc/extend.texi: Update documentation for vec_extractl.
> 	Replace builtin name vec_extractr with vec_extracth.  Update description
> 	of vec_extracth.

(For documentation like this I certainly do not care at all.)

> -;; Like VI, defined in vector.md, but add ISA 2.07 integer vector ops
> -(define_mode_iterator VI2 [V4SI V8HI V16QI V2DI])

You should mention this in the changelog as well.

> +;; Like VI, defined in vector.md, but add ISA 2.07 integer vector ops
> +(define_mode_iterator VI2 [V4SI V8HI V16QI V2DI])

It may be easier to just put them together in vector.me then, no matter
where they are used?  But we should restructure this whole thing anyway,
just something to keep in the back of your head.

Okay for trunk with such tweaks.  Thanks!


Segher


More information about the Gcc-patches mailing list