public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110331] New: ppc64 vec_extract with constant index is suboptimal on P8
@ 2023-06-21 3:19 guihaoc at gcc dot gnu.org
2023-06-29 8:35 ` [Bug target/110331] " guihaoc at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: guihaoc at gcc dot gnu.org @ 2023-06-21 3:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110331
Bug ID: 110331
Summary: ppc64 vec_extract with constant index is suboptimal on
P8
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: guihaoc at gcc dot gnu.org
Target Milestone: ---
//test.c
#include <altivec.h>
#ifdef __BIG_ENDIAN__
#define LANE_B 3
#else
#define LANE_B 12
#endif
unsigned char foo1 (vector unsigned char v)
{
return vec_extract (v, LANE_B);
}
Trunk generates:
vspltb 2,2,3
mfvsrd 3,34
rlwinm 3,3,0,0xff
While it can be optimized as:
mfvsrd 3,34
rldicl 3,3,32,56
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/110331] ppc64 vec_extract with constant index is suboptimal on P8
2023-06-21 3:19 [Bug target/110331] New: ppc64 vec_extract with constant index is suboptimal on P8 guihaoc at gcc dot gnu.org
@ 2023-06-29 8:35 ` guihaoc at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: guihaoc at gcc dot gnu.org @ 2023-06-29 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110331
--- Comment #1 from HaoChen Gui <guihaoc at gcc dot gnu.org> ---
Even the P9 assembly is not good, as vextu* has a higher lantency than mfvsrd.
li 9,12
vextubrx 3,9,2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-29 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 3:19 [Bug target/110331] New: ppc64 vec_extract with constant index is suboptimal on P8 guihaoc at gcc dot gnu.org
2023-06-29 8:35 ` [Bug target/110331] " guihaoc at gcc dot gnu.org
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).