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]

[PATCH] PR target/79799, Add vec_insert of V4SFmode on PowerPC ISA 3.0 (power9)


In doing some vector insert tests, I noticed I didn't add support for doing a
vec_insert on vector float data (PR target/79799) with ISA 3.0.  This meant
that it would do the insert by storing the vector to the stack, storing the
individual word, and then reloading the vector.

While I was at it, I added an optimization so that if you did:

	vector float v1, v2, v3;
	v1 = vec_insert (vec_extract (v2, 0), v3, 3);

it would not extract the floating point value and convert it from vector format
to scalar format, and then convert the scalar format back to vector format.

I have tested this on a little endian power8 system with bootstrap, and it had
no regressions.  I have tested the executable code on a little endian power9,
and it ran correctly.  I started a non-bootstrap make check on the power9
system, and assuming there is no regression, can I install the patch into the
trunk?

I would also like to backport it to GCC 7 after a burn-in period on the trunk.
The patch will not apply to earlier revisions.  Can I install the patch after a
burn-in period of time, assuming it applies cleanly?

[gcc]
2017-06-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79799
	* config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
	for doing vector set of SFmode on ISA 3.0.
	* config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
	(vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
	SFmode value into a V4SF variable that was extracted from another
	V4SF variable without converting the element to double precision
	and back to single precision vector format.
	(vsx_insert_extract_v4sf_p9_2): Likewise.

[gcc/testsuite]
2017-06-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/79799
	* gcc.target/powerpc/pr79799-1.c: New test.
	* gcc.target/powerpc/pr79799-2.c: New test.
	* gcc.target/powerpc/pr79799-3.c: New test.
	* gcc.target/powerpc/pr79799-4.c: New test.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

Attachment: pr79799.patch01b
Description: Text document


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