https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84157
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Segher Boessenkool from comment #5) > Hi Tom, > > That looks good. Hi, that patch was by Uros though. > But maybe the REG_P check should be in the outer "if"? > Slightly easier and safer to exit as early as possible. I'm not familiar with this code, but AFAIU already before r257270 we can generate a SUBREG of an LSHIFTRT, which is incorrect RTL. And the patch does not fix that, it only fixes the ICE introduces in r257270.