https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112660
--- Comment #1 from gooncreeper <goon.pri.low at gmail dot com> --- This could be further extended for signed integers as we can assume for left shifts that shifted out bits are always 0 else UB, and always combine x << a >> b.