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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-10-18
           Keywords|                            |needs-bisection
             Status|UNCONFIRMED                 |NEW
   Target Milestone|14.0                        |12.4
            Summary|[14 Regression] Dead Code   |[12/13/14 Regression] Dead
                   |Elimination Regression      |Code Elimination Regression
                   |since r14-4038-gb975c0dc3be |

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed but this is just happened to be a side effect.

In forwprop1 we can change:
```
  # iftmp.5_11 = PHI <1(3), 0(4)>
  _4 = iftmp.5_11 <= 0;
  _5 = (short int) _4;
  _25 = (int) _4;
  _26 = _25 << 5;
  _29 = (short int) _4;
  _27 = _29 << 5;
  _6 = (int) _27;
  if (_27 != 0)
```

Into just:
```
  # iftmp.5_11 = PHI <1(3), 0(4)>
  if (iftmp.5_11 <= 0)
```

And then ethread is able to thread through that bb.

You get the same missed optimization with removing the call to a.
that is changing:
```
    short v = a((g && p(t)) <= 0, 5);
```
to
```
    short v = ((g && p(t)) <= 0);
```

Which then becomes a regression between GCC 11 and GCC 12.

Reply via email to