public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Optimize vec_splats of vec_extract, PR target/99293
@ 2022-03-28 16:24 Michael Meissner
  2022-03-28 16:26 ` [PATCH 1/4] Optimize vec_splats of constant vec_extract for V2DI/V2DF, PR target 99293 Michael Meissner
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Michael Meissner @ 2022-03-28 16:24 UTC (permalink / raw)
  To: gcc-patches, Michael Meissner, Segher Boessenkool,
	David Edelsohn, Peter Bergner, Will Schmidt

The following 4 patches fix PR target/99293.  This bug complains that on power9
and power10:

	vector long long v, v0, v1;
	// ...
	v0 = __builtin_vec_splats (__builtin_vec_extract (v, 0));
	v1 = __builtin_vec_splats (__builtin_vec_extract (v, 1));

generates move from vector register and move to vector register instructions
instead of keeping the data within the vector registers.

The first patch adds a combiner patterns to match this case and generate a
single xxpermdi instruction, instead of two instructions (the extract and then
the splats operations).

The second and third patches fix the insn attributes to be correct in the
extract and concat operations.

The fourth patch allows the target to be traditional Altivec registers in
addition to traditional floating point registers and GPRs.

I have built bootstrap versions on the following systems with these patches
applied.  There were no regressions in the runs:

	Power9 little endian, --with-cpu=power9
	Power10 little endian, --with-cpu=power10
	Power8 big endian, --with-cpu=power8 (both 32-bit & 64-bit tests)

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meissner@linux.ibm.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-04-01 17:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28 16:24 [PATCH 0/4] Optimize vec_splats of vec_extract, PR target/99293 Michael Meissner
2022-03-28 16:26 ` [PATCH 1/4] Optimize vec_splats of constant vec_extract for V2DI/V2DF, PR target 99293 Michael Meissner
2022-03-28 17:14   ` Segher Boessenkool
2022-03-28 22:30     ` Michael Meissner
2022-03-28 23:25       ` Segher Boessenkool
2022-03-28 16:27 ` [PATCH 2/4] Make vsx_splat_<mode>_reg use correct insn attributes, PR target/99293 Michael Meissner
2022-03-28 20:28   ` Segher Boessenkool
2022-03-30 22:41     ` Michael Meissner
2022-04-01 17:21       ` Segher Boessenkool
2022-03-28 16:28 ` [PATCH 3/4] Make vsx_extract_<mode> use correct insn attributes, PR target 99293 Michael Meissner
2022-03-28 22:06   ` Segher Boessenkool
2022-03-30 22:58     ` Michael Meissner
2022-03-28 16:28 ` [PATCH 4/4] Allow vsx_extract_<mode> to use Altivec registers, PR target/99293 Michael Meissner
2022-03-28 23:59   ` Segher Boessenkool
2022-03-29 17:26     ` Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).