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: "rakdver 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 22:28:46 -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 #24 from rakdver at gcc dot gnu dot org 2007-11-24 22:28 -------
(In reply to comment #20)
> > 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?
>
> Why? If using dec and branch is profitable, doloop pass should do it; the
> transformation that ivopts do does not prevent that or make it any more
> difficult.
sorry, I misunderstood what you are asking for. Yes, ivopts would have to
solve this; however, they would not only have to know about the possibility to
compare with zero and jump in one instruction, but also about autoincrement
addressing modes, to get this one correctly. That looks like a bit complicated
way to solve the issue, I need to think about it more.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31849