https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96563
--- Comment #3 from Gabriel Ravier <gabravier at gmail dot com> --- It seems like GCC does better for the unrolled case as of now on trunk and seemingly since GCC 11, though the operation is done in a different way due to `((unsigned)x <= 9) ? 8 : 4;` being expanded differently, which does seem interesting w.r.t. perhaps optimizing `(((unsigned)x <= 9) * 4) + 4` to it or the other way around.