https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121405
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 62047 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62047&action=edit Reduced using int rather than char Combine in GCC 15+ is not able to do the combine in this case. Instead we get: salq $32, %rsi shrq $32, %rsi leal (%rdi,%rsi), %eax ret Which should be a the leal.