This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/19590] New: IVs with the same evolution not eliminated


This is from Briggs' code quality suite: 
 
void vnum_test8(int *data) 
{ 
  int i; 
  int stop = data[3]; 
  int m = data[4]; 
  int n = m; 
  for (i=0; i<stop; i++) { 
    int k = data[2]; 
    data[k] = 2; 
    data[0] = m - n; 
    k = data[1]; 
    m = m + k; 
    n = n + k; 
  } 
} 
void vnum_result8(int *data) 
{ 
  int i; 
  int stop = data[3]; 
  for (i=0; i<stop; i++) { 
    int k = data[2]; 
    data[k] = 2; 
    data[0] = 0; 
  } 
} 
 
In the .ivopts dump we have  
 
(set_scalar_evolution 
  (scalar = n_2) 
  (scalar_evolution = {m_8, +, k_19}_1)) 
) 
and 
 
(set_scalar_evolution 
  (scalar = m_1) 
  (scalar_evolution = {m_8, +, k_19}_1)) 
) 
 
But we don't eliminate one of these IVs.

-- 
           Summary: IVs with the same evolution not eliminated
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,rakdver at gcc dot gnu
                    dot org,spop at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]