public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18438] New: vectorizer failed for vector matrix multiplication
@ 2004-11-12  1:29 giovannibajo at libero dot it
  2004-11-12  2:43 ` [Bug tree-optimization/18438] " pinskia at gcc dot gnu dot org
  2005-09-20 17:47 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-12  1:29 UTC (permalink / raw)
  To: gcc-bugs

Vectorizer fails to handle this:


------------------------------------------------------------
#define NUMPOINTS 50000

#define align(x) __attribute__((align(x)))

typedef float align(16) MATRIX[3][3];

static float points[NUMPOINTS][4];
static align(16) float opoints[NUMPOINTS][4];
static bool flags[NUMPOINTS];
static MATRIX gmatrix;


void RotateVectors (void)
{
  int i, r;

  for (r = 0; r < 4; r++)
  {
    for (i = 0; i < NUMPOINTS; i++)
    {
      opoints[i][0] =     gmatrix[0][0] * points[i][0]
                        + gmatrix[0][1] * points[i][1]
                        + gmatrix[0][2] * points[i][2];
      opoints[i][1] =     gmatrix[1][0] * points[i][0]
                        + gmatrix[1][1] * points[i][1]
                        + gmatrix[1][2] * points[i][2];
      opoints[i][2] =     gmatrix[2][0] * points[i][0]
                        + gmatrix[2][1] * points[i][1]
                        + gmatrix[2][2] * points[i][2];
      flags[i] = true;
    }
  }
}
------------------------------------------------------------
loop at bench.cc:52: not vectorized: complicated access pattern.
loop at bench.cc:52: bad data access.

-- 
           Summary: vectorizer failed for vector matrix multiplication
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug tree-optimization/18438] vectorizer failed for vector matrix multiplication
  2004-11-12  1:29 [Bug tree-optimization/18438] New: vectorizer failed for vector matrix multiplication giovannibajo at libero dot it
@ 2004-11-12  2:43 ` pinskia at gcc dot gnu dot org
  2005-09-20 17:47 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-12  2:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-12 02:43 -------
Confirmed, ICC can do this but does not because it is not very inefficient to do it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-12 02:43:35
               date|                            |


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


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

* [Bug tree-optimization/18438] vectorizer failed for vector matrix multiplication
  2004-11-12  1:29 [Bug tree-optimization/18438] New: vectorizer failed for vector matrix multiplication giovannibajo at libero dot it
  2004-11-12  2:43 ` [Bug tree-optimization/18438] " pinskia at gcc dot gnu dot org
@ 2005-09-20 17:47 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 17:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-20 17:47 -------
t.c:20: note: not vectorized: mixed data-types
t.c:20: note: can't determine vectorization factor.

Removing flags[i] = true;
we get:
t.c:20: note: not consecutive access
t.c:20: note: not vectorized: complicated access pattern.


-- 


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


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

end of thread, other threads:[~2005-09-20 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-12  1:29 [Bug tree-optimization/18438] New: vectorizer failed for vector matrix multiplication giovannibajo at libero dot it
2004-11-12  2:43 ` [Bug tree-optimization/18438] " pinskia at gcc dot gnu dot org
2005-09-20 17:47 ` 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).