https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61619

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-06-26
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
bug.cpp:69:13: note: not vectorized: number of iterations cannot be computed.
bug.cpp:69:13: note: bad loop form.

The loop is

  <bb 20>:
  # sum_62 = PHI <sum_42(19), [bug.cpp : 69:80] sum_33(21)>
  # p_71 = PHI <p_59(19), [bug.cpp : 29:29] p_50(21)>
  [bug.cpp : 69:80] _32 = [bug.cpp : 69] *p_71;
  [bug.cpp : 69:80] sum_33 = sum_62 + _32;
  [bug.cpp : 29:31] p_50 = p_71 + pretmp_7;
  [bug.cpp : 69:13] if (_48 != p_50)
    goto <bb 21>;
  else
    goto <bb 22>;

  <bb 21>:
  goto <bb 20>;

The above is with -fopt-info-vec-missed and the excerpt is from the
bug.cpp.114t.vect file produced by -fdump-tree-vect-details-lineno

I believe the issue is that the initialization of S and E are not
inlined if none of the uncomments are done.  If you expect all
abstraction to be removed by inlining the 'flatten' attribute can do magic.

Unfortunately the inits look like

  [/usr/include/c++/4.9/bits/stl_algobase.h : 378:6] MEM[(char * {ref-all})&S]
= MEM[(char * {ref-all})&._94];
  pretmp_22 = MEM[(struct array *)&S];

which we don't fold to the constant init 1 for some reason.

Reply via email to