public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54531] New: vpermilpd(x, 2 or 10) is a move
@ 2012-09-08 23:10 glisse at gcc dot gnu.org
2012-09-09 9:31 ` [Bug target/54531] " glisse at gcc dot gnu.org
2013-07-07 8:42 ` glisse at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-08 23:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54531
Bug #: 54531
Summary: vpermilpd(x, 2 or 10) is a move
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: glisse@gcc.gnu.org
Target: x86_64-linux-gnu
Hello,
it is quite easy to make gcc generate instructions that are equivalent to
moves, but gcc doesn't realize that. Simple examples include
_mm256_permute_pd(x,10) and _mm_permute_pd(x,2), but I also got it while trying
a patch that generated some vec_selects. I believe those instructions should be
optimized out.
#include <x86intrin.h>
__m256d f(__m256d x){
return _mm256_permute_pd(x,2+8);
}
gcc -O3 -S -mavx
(with -mavx2 we get vpermpd(x,228) which is a similar issue)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/54531] vpermilpd(x, 2 or 10) is a move
2012-09-08 23:10 [Bug target/54531] New: vpermilpd(x, 2 or 10) is a move glisse at gcc dot gnu.org
@ 2012-09-09 9:31 ` glisse at gcc dot gnu.org
2013-07-07 8:42 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-09-09 9:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54531
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> 2012-09-09 09:30:57 UTC ---
As a side note, is there a reason to prefer vpermpd to vpermilpd when both are
available (apart from the fact that they are written in that order in the .md
file)? I would expect that by default we take the intra-lane version, which in
theory could be cheaper on some machines. I guess in practice they are
equivalent and it doesn't matter...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/54531] vpermilpd(x, 2 or 10) is a move
2012-09-08 23:10 [Bug target/54531] New: vpermilpd(x, 2 or 10) is a move glisse at gcc dot gnu.org
2012-09-09 9:31 ` [Bug target/54531] " glisse at gcc dot gnu.org
@ 2013-07-07 8:42 ` glisse at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: glisse at gcc dot gnu.org @ 2013-07-07 8:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54531
Marc Glisse <glisse at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
We now generate optimal (empty) code with -mavx or -mavx2.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-07 8:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-08 23:10 [Bug target/54531] New: vpermilpd(x, 2 or 10) is a move glisse at gcc dot gnu.org
2012-09-09 9:31 ` [Bug target/54531] " glisse at gcc dot gnu.org
2013-07-07 8:42 ` glisse 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).