https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128119
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2026-10-24
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #4 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #3)
> (In reply to Drea Pinski from comment #2)
> > (In reply to Sam James from comment #1)
> > > It bisects to r17-4656-gd382f953805cb0, but I did it with a grep on the
> > > assembly rather than a dump, so may not be robust enough.
> >
> > No that seems reasonible, There must be a missing side_effects_p check
> > somewhere.
>
> It might not be in the patch itself but rather ASHIFTRT simplify_rtx code.
Nope the problem is in the patch:
```
/* Simplify x h* 1 to 0. */
if (trueop1 == CONST1_RTX (mode)
&& !side_effects_p (op1))
return CONST0_RTX (mode);
```
That side_effects_p should have been checking op0 rather than op1.