While trying to make DECL_GIMPLE_REG_P more generic, I ran into a regression
due to we never change non gimple register variables into gimple registers so I
looked into it and found that I could also reproduce it in the current sources
with vector types (complex does not matter as much as they are always SRA'd).
Testcase:
#define vector __attribute__(( vector_size(16) ))

vector float f(vector float a, int b, vector float c)
{
  vector float dd = c*a;
  if (0)
  {
   vector float *d = &a;
   vector float *d1 = &c;
    g:;
  }
  if (b)
    return dd * a;
  return c*a;
}


You will see that a is never turned into a gimple register which could cause
some issues with debugging info and also this introduces an extra variable
which could cause a memory usage/compile time slow down.


-- 
           Summary: [4.3 Regression] vector can cause to create an extra
                    variable
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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

Reply via email to