[avr] Return values are promoted to (unsigned) int for no reason. #58877
Closed
Description
Compile with --target=avr -mmcu=atmega8 -Os -save-temps the following code:
char func (char c)
{
return c;
}The generated assembly reads:
func:
mov r25, r24
lsl r25
sbc r25, r25
retwhich just wastes 3 cycles and 6 bytes for integer promotion that's not required.
Activity