public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/32110]  New: vector "extract" and then vector "splat" is not optimized
@ 2007-05-27 21:46 pinskia at gcc dot gnu dot org
  2007-06-11 22:37 ` [Bug target/32110] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-27 21:46 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
#define vector __attribute__((vector_size(16) ))
typedef vector int t;

t f(t a)
{
  int b = *(int*)&a;
  return (vector int){b,b,b,b};
}

----------------- CUT --------
This should just produce :
        vspltw v2,v2,0
        blr

But right now we do:
_f:
        addi r2,r1,-16
        stvewx v2,0,r2
        lvewx v2,0,r2
        vspltw v2,v2,0
        blr

Which is not good at all, as it causes a load hit store hazzard to happen on
the Cell and it also causes the dispatch group to be rejected for the
power4/power5/970.

This is related to PR 32107.


-- 
           Summary: vector "extract" and then vector "splat" is not
                    optimized
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/32110] vector "extract" and then vector "splat" is not optimized
  2007-05-27 21:46 [Bug target/32110] New: vector "extract" and then vector "splat" is not optimized pinskia at gcc dot gnu dot org
@ 2007-06-11 22:37 ` pinskia at gcc dot gnu dot org
  2008-02-20 21:35 ` pinskia at gcc dot gnu dot org
  2010-03-02 18:34 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-11 22:37 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/32110] vector "extract" and then vector "splat" is not optimized
  2007-05-27 21:46 [Bug target/32110] New: vector "extract" and then vector "splat" is not optimized pinskia at gcc dot gnu dot org
  2007-06-11 22:37 ` [Bug target/32110] " pinskia at gcc dot gnu dot org
@ 2008-02-20 21:35 ` pinskia at gcc dot gnu dot org
  2010-03-02 18:34 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-20 21:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-02-20 21:34 -------
Mine, the PS3 toolchain has patches which fixes this issue.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-20 21:34:23
               date|                            |


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/32110] vector "extract" and then vector "splat" is not optimized
  2007-05-27 21:46 [Bug target/32110] New: vector "extract" and then vector "splat" is not optimized pinskia at gcc dot gnu dot org
  2007-06-11 22:37 ` [Bug target/32110] " pinskia at gcc dot gnu dot org
  2008-02-20 21:35 ` pinskia at gcc dot gnu dot org
@ 2010-03-02 18:34 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-03-02 18:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2010-03-02 18:34 -------
Hmm, we get worse code now on the trunk:
        addi 9,1,-80
        li 0,48
        stvewx 2,9,0
        lwz 0,-32(1)
        stw 0,-16(1)
        stw 0,-12(1)
        stw 0,-8(1)
        stw 0,-4(1)
        li 0,64
        lvx 2,9,0
        blr


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pinskia at gcc dot gnu dot  |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-02 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-27 21:46 [Bug target/32110] New: vector "extract" and then vector "splat" is not optimized pinskia at gcc dot gnu dot org
2007-06-11 22:37 ` [Bug target/32110] " pinskia at gcc dot gnu dot org
2008-02-20 21:35 ` pinskia at gcc dot gnu dot org
2010-03-02 18:34 ` pinskia at gcc dot gnu dot 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).