Why does ABI on amd64 require bit extension of function arguments smaller than 32 bits?

I noticed that clang adds signext or zeroext attribute to all such function arguments. Why is this required? Isn't bit extension by the callee only when needed more efficient?

Yuri

The calle is required to do the expansion. The attributes just reflect
what the content is the registers are supposed to be.

Joerg

Yes, signext and zeroext require the caller to do the expansion. I am asking why it's not the callee who should do the expansion. It seems that it would have been more efficient if callee did the expansion.

Yuri

Nope, since the expansion is normally implied. E.g. movl %eax, %ebx will
be implicitly the same as movzlq %eax, %rbx.

Joerg