Name: Anonymous 2018-12-21 4:18
CL-USER> (defun add (x y)
(declare (type fixnum x y))
(declare (optimize (speed 3) (safety 0) (debug 0)))
(the fixnum (+ x y)))
ADD
CL-USER> (disassemble #'add)
; disassembly for ADD
; Size: 19 bytes. Origin: #x10035E5B01
; 01: 84042500000F20 TEST AL, [#x200F0000] ; safepoint
; no-arg-parsing entry point
; 08: 4801F9 ADD RCX, RDI
; 0B: 488BD1 MOV RDX, RCX
; 0E: 488BE5 MOV RSP, RBP
; 11: F8 CLC
; 12: 5D POP RBP
; 13: C3 RET
Why is SBCL incapable of optimizing this simple add to just one LEA instruction like GCC/Clang do?