Compiling
#include <stdint.h>
uint64_t inc(uint64_t x) { return x + 1; }
With -O0 gives me: 48 83 c0 01 add $0x1,%rax
and with -O2: 48 8d 47 01 lea 0x1(%rdi),%rax
That is, both are four bytes.