public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/40073]  New: Vector short/char shifts generate sub-optimal code
@ 2009-05-08 16:57 meissner at linux dot vnet dot ibm dot com
  2009-05-08 16:59 ` [Bug tree-optimization/40073] " meissner at linux dot vnet dot ibm dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: meissner at linux dot vnet dot ibm dot com @ 2009-05-08 16:57 UTC (permalink / raw)
  To: gcc-bugs

On machines like the x86_64/i386 with -msse2 option or powerpc with the
-maltivec option that support vector 8-bit/16-bit shift instructions, GCC
generates suboptimal code for variable shifts.  Rather than generate the native
instruction, the compiler converts the vector to V4SI vector, does the shift,
and then converts the vector back to V16QI/V8HI mode.  I speculate that this is
due to the normal binary operator rules being done to bring both sides to the
same type.  Shifts and rotates are different in that the right hand side is an
int type.


-- 
           Summary: Vector short/char shifts generate sub-optimal code
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: meissner at linux dot vnet dot ibm dot com
 GCC build triplet: x86_64-unknown-linux-gnu, powerpc64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu, powerpc64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu, powerpc64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40073


^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <bug-40073-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2022-03-08 17:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-08 16:57 [Bug tree-optimization/40073] New: Vector short/char shifts generate sub-optimal code meissner at linux dot vnet dot ibm dot com
2009-05-08 16:59 ` [Bug tree-optimization/40073] " meissner at linux dot vnet dot ibm dot com
2009-05-08 17:02 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 17:03 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 17:05 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 17:06 ` meissner at linux dot vnet dot ibm dot com
2009-05-08 20:39 ` rguenth at gcc dot gnu dot org
     [not found] <bug-40073-4@http.gcc.gnu.org/bugzilla/>
2014-04-26  7:00 ` glisse at gcc dot gnu.org
2015-06-12  9:56 ` alalaw01 at gcc dot gnu.org
2015-06-12 10:08 ` pinskia at gcc dot gnu.org
2015-06-12 11:39 ` alalaw01 at gcc dot gnu.org
2015-06-12 12:01 ` glisse at gcc dot gnu.org
2022-03-08 17:25 ` law 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).