public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94870] New: Failure to use movhlps instead of seperated mov+unpckhpd
@ 2020-04-30 8:37 gabravier at gmail dot com
2021-04-26 1:18 ` [Bug target/94870] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: gabravier at gmail dot com @ 2020-04-30 8:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94870
Bug ID: 94870
Summary: Failure to use movhlps instead of seperated
mov+unpckhpd
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: gabravier at gmail dot com
Target Milestone: ---
typedef double v2df __attribute__((vector_size(16)));
v2df _mm_sqrt_sd(v2df a, v2df b)
{
v2df c = __builtin_ia32_sqrtpd((v2df){b[0], b[1]});
return (v2df){c[1], a[1]};
}
With -O3, LLVM outputs :
_mm_sqrt_sd(double __vector(2), double __vector(2)):
sqrtpd xmm1, xmm1
movhlps xmm0, xmm1 # xmm0 = xmm1[1],xmm0[1]
ret
GCC outputs :
_mm_sqrt_sd(double __vector(2), double __vector(2)):
movapd xmm2, xmm0
sqrtpd xmm0, xmm1
unpckhpd xmm0, xmm2
ret
unpckhpd and movhlps seem to have equivalent performance, so using movhlps to
elide the extra movapd seems like it would make sense
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/94870] Failure to use movhlps instead of seperated mov+unpckhpd
2020-04-30 8:37 [Bug target/94870] New: Failure to use movhlps instead of seperated mov+unpckhpd gabravier at gmail dot com
@ 2021-04-26 1:18 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-04-26 1:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94870
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-26 1:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 8:37 [Bug target/94870] New: Failure to use movhlps instead of seperated mov+unpckhpd gabravier at gmail dot com
2021-04-26 1:18 ` [Bug target/94870] " pinskia 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).