public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/60451] New: X86 vectorization improve: pack instead of pshufb
@ 2014-03-06 22:32 evstupac at gmail dot com
2014-03-07 8:53 ` [Bug target/60451] " rguenth at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: evstupac at gmail dot com @ 2014-03-06 22:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60451
Bug ID: 60451
Summary: X86 vectorization improve: pack instead of pshufb
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: evstupac at gmail dot com
Created attachment 32294
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32294&action=edit
test case
Currently vectorizer use 2 "pshufb" and "or" for even/odd permutation.
(odd case)
pshufb %xmm5, %xmm1
pshufb %xmm4, %xmm0
por %xmm0, %xmm1
where
%xmm4 0 2 4 6 8 a c e -1 -1 -1 -1 -1 -1 -1 -1
%xmm5 -1 -1 -1 -1 -1 -1 -1 -1 0 2 4 6 8 a c e
gcc/config/i386/i386.c (expand_vec_perm_even_odd_1):
case V16QImode:
if (TARGET_SSSE3)
return expand_vec_perm_pshufb2 (d);
However in case of even/odd we can use:
2 "pand" and 1 "packuswb"
pand %xmm6, %xmm0
pand %xmm6, %xmm1
packuswb %xmm1, %xmm0
where
%xmm6 is 0x00ff00ff00ff00ff
This will improve performance for architectures with slow pshufb instructions
and reduce code size on 1 constant.
For attached test Silvermont performance improve is 30%.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/60451] X86 vectorization improve: pack instead of pshufb
2014-03-06 22:32 [Bug tree-optimization/60451] New: X86 vectorization improve: pack instead of pshufb evstupac at gmail dot com
@ 2014-03-07 8:53 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-07 8:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60451
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*, i?86-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-07
Component|tree-optimization |target
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-07 8:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-06 22:32 [Bug tree-optimization/60451] New: X86 vectorization improve: pack instead of pshufb evstupac at gmail dot com
2014-03-07 8:53 ` [Bug target/60451] " rguenth 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).