This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rs6000] Enable scalar shifts of vectors


I suppose technically the middle-end could be improved to implement
ashl<mode> as vashl<mode> by broadcasting the scalar, but Altivec
is the only extant SIMD ISA that would make use of this.  All of
the others can arrange for constant shifts to be encoded into the
insn, and so implement the ashl<mode> named pattern.

Tested on ppc64-linux, --with-cpu=G5.

Ok?


r~


	* config/rs6000/rs6000.c (rs6000_expand_vector_broadcast): New.
	* config/rs6000/rs6000-protos.h: Update.
	* config/rs6000/vector.md (ashl<VEC_I>3): New.
	(lshr<VEC_I>3, ashr<VEC_I>3): New.

Attachment: d-ppc-shiftv
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]