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

--- Comment #12 from Andrew Macleod <amacleod at redhat dot com> ---
On 11/5/21 8:02 AM, aldyh at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103061
>
> --- Comment #7 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
> Simplified version without the noise:
>
>    <bb 35> [local count: 56063504182]:
>    _134 = M.10_120 + 1;
>    if (_71 <= _134)
>      goto <bb 19>; [11.00%]
>    else
>      goto <bb 41>; [89.00%]
>
> ...
> ...
>
>    <bb 41> [local count: 49896518755]:
>
>    <bb 20> [local count: 56063503181]:
>    # lb_75 = PHI <_134(41), 1(18)>
>    _117 = mstep_49 + lb_75;
>    _118 = _117 + -1;
>    _119 = mstep_49 + _118;
>    M.10_120 = MIN_EXPR <_119, _71>;
>    if (lb_75 > M.10_120)
>      goto <bb 21>; [11.00%]
>    else
>      goto <bb 22>; [89.00%]
>
> If _134 can be assumed to be greater than M.10_120, then we can thread
> 41->20->21.
>
I dont understand why? isnt m.10_120 killed in bb20?    whats the basis 
for threading that?  I dont see it

layed out, the thread would be:

   <bb 35> [local count: 56063504182]:
   _134 = M.10_120 + 1;

*relation _71 >_134

   <bb 20> [local count: 56063503181]:
   lb_75 = _134
   _117 = mstep_49 + lb_75;          __117 = mstep_49 + _134
   _118 = _117 + -1;
   _119 = mstep_49 + _118;           mstep_49 + mstep_49 + _134 + -1
   M.10_120 = MIN_EXPR <_119, _71>;     MIN < ^that, _134>      kill 
m.10_120
   if (lb_75 > M.10_120)          if (OLD-M.10_120 + 1 > m.10_120)
     goto <bb 21>; [11.00%]
   else
     goto <bb 22>; [89.00%]

I dont see how you can thread to 21?

Reply via email to