https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116747
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2024-09-17
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
Looks like this is a latent bug in cselim.
Before cselim we have:
```
if (iftmp.1_29 != 0)
goto <bb 12>; [66.67%]
else
goto <bb 11>; [33.33%]
<bb 11> [local count: 59055800]:
# _51 = PHI <_50(10)>
_94 = f[_51];
_73 = _94 & 1;
d[e.0_43] = _73;
_57 = f[_51];
_58 = _57 & 1;
d[e.0_43] = _58;
_101 = f[_51];
_80 = _101 & 1;
d[e.0_43] = _80;
goto <bb 13>; [100.00%]
<bb 12> [local count: 59055800]:
# _55 = PHI <_50(10)>
_10 = f[_55];
_17 = _10 & 1;
d[e.0_43] = _17;
_63 = f[_55];
_41 = _63 & 1;
d[e.0_43] = _41;
<bb 13> [local count: 118111600]:
# _53 = PHI <_55(12), _51(11)>
```
Notice how there are uneven # of stores on one side of the if.
so we match up the pairs and for one of them we double up.