https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111012
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-08-14
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So the difference here is basically doing the following manually:
```
#if 0
static char i(int k) {
if (k)
bar173_();
c <= 0 >= b;
if (k)
return c;
return c;
}
#else
static char i(int k) {
if (k)
bar173_();
c <= 0 >= b;
int t;
if (k)
t = c;
else
t = c;
return t;
}
#endif
```
and we used to do some jump threading previously such that the load of the c
would be in the `if (k)` branch after the call to `bar173_()`. The only pass
which moves it like that is pre which happens maybe later but too late for jump
threading to happen for the optimizations.
I have not looked into why this makes a difference either. maybe because there
is another jump threading where we know c is 0 ...
Confirmed.