[Bug tree-optimization/31849] [4.3 Regression] Code size regression caused by fix to PR 31360
rakdver at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 24 22:28:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list