https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38264
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2012-02-02 00:00:00 |2023-5-26
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I filed this because for
void bar ();
void foo (int n)
{
int i = 0;
do
bar ();
while (++i < n);
}
we never remove the preheader forwarder created by loop passes on GIMPLE:
void foo (int n)
{
int i;
<bb 2> [local count: 118111600]:
<bb 3> [local count: 1073741824]:
# i_1 = PHI <0(2), i_5(3)>
but if you add a bar() call before the loop we do, because the forwarder
isn't the first block then.
void foo (int n)
{
int i;
<bb 2> [local count: 118111600]:
bar ();
<bb 3> [local count: 1073741824]:
# i_1 = PHI <0(2), i_6(3)>