https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122541
--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Note that I recently committed a patch from Shreya to simplify-rtx to help with
at least some of the problems with "over" simplification of the constants
fragment shown by Andrew in c#5 (targetting the case in pr58727).
Essentially we turn the bit back on in simplify-rtx.cc which was sufficient to
fix the RISC-V code generation issue, but it wasn't sufficient to fix the
problem across the board.
andi a0,a0,-2
bseti a0,a0,31