[Bug tree-optimization/102703] [12 Regression] Dead Code Elimination Regression at -O3 since r12-2591-g2e96b5f14e402569

aldyh at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 13 09:48:42 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102703

--- Comment #8 from Aldy Hernandez <aldyh at redhat dot com> ---
On Wed, Oct 13, 2021, 11:37 pinskia at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102703
>
> --- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> Because:
>   if (d_11 > 1)
>     goto <bb 5>; [59.00%]
>   else
>     goto <bb 4>; [41.00%]
>
>   <bb 4> [local count: 391808389]:
>
>   <bb 5> [local count: 955630225]:
>   # iftmp.1_6 = PHI <0(3), 2(4)>
>
> If the phi node was removed, the original al condition for d_11 > 1 would
> be
> remove.
>

As the IL stands, the 3->5 edge has relevant range information.  If the IL
should be different at this point, there is no way the threader can know
this.

Aldy


More information about the Gcc-bugs mailing list