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/73457] Missed optimizations: count_if on std::array of constants.


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-08-11
                 CC|                            |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  This is unrolling happening too late or DOM not being able to
simplify the reads from the initializer:

  <bb 2>:
  MEM[(event *)&events] = { 0, 1, 0, 0 };
  _3 = MEM[(const event *)&events];
  _ifc__2 = _3 == 0 ? 1 : 0;
  _8 = MEM[(const event *)&events + 4B];
  _ifc__11 = _8 == 0 ? 1 : 0;
  __n_10 = _ifc__2 + _ifc__11;
  _70 = MEM[(const event *)&events + 8B];
  _ifc__71 = _70 == 0 ? 1 : 0;
  __n_72 = __n_10 + _ifc__71;
  _30 = MEM[(const event *)&events + 12B];
  _ifc__31 = _30 == 0 ? 1 : 0;
  __n_32 = _ifc__31 + __n_72;
  _6 = (int) __n_32;
  events ={v} {CLOBBER};
  return _6;

I think we have a dup of this somewhere.

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