https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98681
--- Comment #5 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- Patch looks generally sensible, but I think all the INTVALs in that expression should be converted to UINTVAL. The mask, in particular, is unsigned and it is weird that one moment we're using a unsigned value and the next we're using a signed value for shift_amt.