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 tree-optimization/39094] New: loop_niter_by_eval should deal with &a[i_1]


Brute force evaluation of niters does not deal with

<bb 5>:
  i_10 = i_1 + 1;

<bb 6>:
  # i_1 = PHI <0(2), i_10(5)>
  # .MEM_11 = PHI <.MEM_17(2), .MEM_11(5)>
  if (i_1 <= 4)
    goto <bb 3>;
  else
    goto <bb 7>;

<bb 3>:
  D.5476_6 = &a._M_instance[i_1];
  D.5457_8 = i_1 * 4;
  D.5458_9 = &a._M_instance[0] + D.5457_8;
  if (D.5476_6 != D.5458_9)
    goto <bb 4>;
  else
    goto <bb 5>;

where get_val_for cannot handle &a._M_instance[i_1].


-- 
           Summary: loop_niter_by_eval should deal with &a[i_1]
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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