This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31849] [4.3 Regression] Code size regression caused by fix to PR 31360
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Nov 2007 18:43:11 -0000
- Subject: [Bug tree-optimization/31849] [4.3 Regression] Code size regression caused by fix to PR 31360
- References: <bug-31849-374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from ebotcazou at gcc dot gnu dot org 2007-11-24 18:43 -------
The pessizimation actually happens at the tree level, -fivopts turns
<bb 9>:
s1 = (long unsigned int) *buf + s1;
buf = buf + 1;
s2 = s1 + s2;
k = k + -1;
if (k != 0)
goto <bb 9>;
else
goto <bb 10>;
into
<bb 10>:
s1 = s1 + (long unsigned int) MEM[base: buf.91, index: D.1322];
s2 = s1 + s2;
D.1322 = D.1322 + 1;
if (D.1322 != (unsigned int) k)
goto <bb 10>;
else
goto <bb 11>;
in final_cleanup.
Couldn't ivopts be taught to recognize "dec and branch on zero" patterns
k_114 = k_15 + -1;
if (k_114 != 0)
goto <bb 10>;
else
goto <bb 11>;
and take into account their breakage for its cost estimates somehow?
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Component|rtl-optimization |tree-optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31849