assembly - Zero/sign-extend are no-op, why then instructions for each size type? - Stack Overflow
The compiler and calling convention maintain an invariant that all 32-bit values are held in a sign-extended format in 64-bit registers. Even 32-bit unsigned integers extend bit 31 into bits 63 through 32.