This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/80275] [6/7 Regression] Poor (but valid) code generated by optimizer passing optimizer list to function
- 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: Mon, 03 Apr 2017 07:26:32 +0000
- Subject: [Bug tree-optimization/80275] [6/7 Regression] Poor (but valid) code generated by optimizer passing optimizer list to function
- Auto-submitted: auto-generated
- References: <bug-80275-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80275
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |ASSIGNED
Known to work| |5.4.1
Keywords| |missed-optimization
Last reconfirmed| |2017-04-03
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Ever confirmed|0 |1
Summary|Poor (but valid) code |[6/7 Regression] Poor (but
|generated by optimizer |valid) code generated by
|passing optimizer list to |optimizer passing optimizer
|function |list to function
Target Milestone|--- |6.4
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. In GCC 5 cunrolli is able to compute number of iterations of the
loop(s) and unrolls them so we can optimize away the stuff.
niter issue. trunk gets
Analyzing # of iterations of loop 1
exit condition [(const int *) &D.15512 + 4, + , 4](no_overflow) != &MEM[(void
*)&D.15512 + 12B]
bounds on difference of bases: -18446744073709551615 ... 18446744073709551611
Applying pattern match.pd:148, generic-match.c:7290
result:
# of iterations ((unsigned long) &MEM[(void *)&D.15512 + 12B] - (unsigned
long) ((const int *) &D.15512 + 4)) /[ex] 4 & 4611686018427387903, bounded by
4611686018427387902
...
Loop 1 iterates at most -2 times.
Loop 1 likely iterates at most -2 times.
IL is quite similar. So we fail to simplify &MEM[&D.15512 + 12B] - (unsigned
long) ((const int *) &D.15512 + 4)) for a start. I would guess at the
associate
case in fold-const.