This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/73457] Missed optimizations: count_if on std::array of constants.
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Aug 2016 09:31:31 +0000
- Subject: [Bug tree-optimization/73457] Missed optimizations: count_if on std::array of constants.
- Auto-submitted: auto-generated
- References: <bug-73457-4@http.gcc.gnu.org/bugzilla/>
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.