[Bug tree-optimization/18438] vectorizer failed for vector matrix multiplication

steven at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun May 22 16:19:00 GMT 2011


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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-09-19 07:10:15         |2011-05-22 17:40:15

--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2011-05-22 15:40:28 UTC ---
Still not vectorized in recent GCC 
t.c:20: note: not vectorized: complicated access pattern.
t.c:22: note: not vectorized: complicated access pattern.


     1    typedef unsigned int bool;
     2    #define true 1
     3     
     4    #define NUMPOINTS 50000
     5     
     6    #define align(x) __attribute__((align(x)))
     7     
     8    typedef float align(16) MATRIX[3][3];
     9     
    10    static float points[NUMPOINTS][4];
    11    static align(16) float opoints[NUMPOINTS][4];
    12    static bool flags[NUMPOINTS];
    13    static MATRIX gmatrix;
    14     
    15     
    16    void RotateVectors (void)
    17    {
    18      int i, r;
    19     
    20      for (r = 0; r < 4; r++)
    21      {
    22        for (i = 0; i < NUMPOINTS; i++)
    23        {
    24          opoints[i][0] =     gmatrix[0][0] * points[i][0]
    25                            + gmatrix[0][1] * points[i][1]
    26                            + gmatrix[0][2] * points[i][2];
    27          opoints[i][1] =     gmatrix[1][0] * points[i][0]
    28                            + gmatrix[1][1] * points[i][1]
    29                            + gmatrix[1][2] * points[i][2];
    30          opoints[i][2] =     gmatrix[2][0] * points[i][0]
    31                            + gmatrix[2][1] * points[i][1]
    32                            + gmatrix[2][2] * points[i][2];
    33          flags[i] = true;
    34        }
    35      }
    36    }
    37    

"GCC: (GNU) 4.6.0 20110312 (experimental) [trunk revision 170907]"



More information about the Gcc-bugs mailing list