Sign-extension elimination
The optimization that deletes instructions widening a 32-bit integer to 64 bits when the compiler can show the widening already happened or doesn't matter.
On a 64-bit processor, an int used as an array index has to be sign-extended to full register width first: movsxd on x86-64, sxtw on AArch64. Inside a hot loop that's an extra instruction per iteration. The compiler can instead widen the whole induction variable to 64 bits once, and it is allowed to precisely because signed overflow is undefined. An unsigned counter wraps around at 232 by definition and so can't be widened — one of the few cases where signed loop counters really are faster.
RISC-V makes the problem hard to ignore, since 32-bit instructions on RV64 sign-extend their results and redundant sext.w instructions pile up easily. LLVM has a dedicated pass to remove them; GCC has -free, redundant extension elimination.