[Bug tree-optimization/21212] missed vectorization opportunity

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Apr 25 13:09:00 GMT 2005


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-25 13:09 -------
Actually char a[16] decays into pointers in agruments. So the optimizators don't know if a, b, or c point 
to the same place (or even overlaps).
Instead if you define the function as the following we do vectorize the loop:
oid test_loop_c(char * __restrict__ a, char *__restrict__ b, char * __restrict__ c)
{
  int i;

  for(i = 0; i<16; i++)
    {
      c[i] = a[i] + b[i];
    }
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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



More information about the Gcc-bugs mailing list