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

Vectorizer fails to handle this:

----------------------------------------------------
#define align(x) __attribute__((align(x)))
typedef float align(16) MATRIX[3][3];

void RotateMatrix(MATRIX ret, MATRIX a, MATRIX b)
{
  int i, j;

  for (j = 0; j < 3; j++)
    for (i = 0; i < 3; i++)
      ret[j][i] =   a[j][0] * b[0][i]
                  + a[j][1] * b[1][i]
                  + a[j][2] * b[2][i];
}
----------------------------------------------------

loop at bench.cc:33: not vectorized: unsupported scalar cycle.
loop at bench.cc:33: bad scalar cycle.

-- 
           Summary: vectorizer failed for matrix multiplication
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          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=18437


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

* [Bug tree-optimization/18437] vectorizer failed for matrix multiplication
  2004-11-12  1:22 [Bug tree-optimization/18437] New: vectorizer failed for matrix multiplication giovannibajo at libero dot it
@ 2004-11-12  2:43 ` pinskia at gcc dot gnu dot org
  2005-02-11 19:16 ` pinskia at gcc dot gnu dot org
  2005-09-20 17:44 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ 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
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-12 02:43:04
               date|                            |


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


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

* [Bug tree-optimization/18437] vectorizer failed for matrix multiplication
  2004-11-12  1:22 [Bug tree-optimization/18437] New: vectorizer failed for matrix multiplication giovannibajo at libero dot it
  2004-11-12  2:43 ` [Bug tree-optimization/18437] " pinskia at gcc dot gnu dot org
@ 2005-02-11 19:16 ` pinskia at gcc dot gnu dot org
  2005-09-20 17:44 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-11 19:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-11 14:12 -------
We now get:
t3.c:9: note: not vectorized: can't determine dependence between: (*D.1338_16)[0] and 
(*D.1336_10)[i_53]


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-11-12 02:43:04         |2005-02-11 14:12:15
               date|                            |


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


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

* [Bug tree-optimization/18437] vectorizer failed for matrix multiplication
  2004-11-12  1:22 [Bug tree-optimization/18437] New: vectorizer failed for matrix multiplication giovannibajo at libero dot it
  2004-11-12  2:43 ` [Bug tree-optimization/18437] " pinskia at gcc dot gnu dot org
  2005-02-11 19:16 ` pinskia at gcc dot gnu dot org
@ 2005-09-20 17:44 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 17:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-20 17:44 -------
Oh, the issue here is that a, b, and ret all could point to the same array because the type is (float[3])* 
or arraryptr in:
typedef float array[3];
typedef array *arraryptr;

If we change ret, a, and b to be global variables, then the vectorizer could be done except for the fact:
t.c:11: note: not vectorized: iteration count too small.
t.c:11: note: bad operation or unsupported loop bound.
t.c:11: note: vectorized 0 loops in function.


-- 


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


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

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

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