(defun f (x)
(declare (type word x) (optimize speed))
(values (floor x -8)))
both (DISASSEMBLE 'F) or (SB-DISASSEM::DISASSEMBLE-CODE-COMPONENT #'F) show the correct disassembly.
Replace F here with the (COMPILE NIL ...) expression from the bug description and both calls again show the correct disassembly.
So it may be that the bug occurs only when using *COMPILER-TRACE-OUTPUT*.
With a function definition
(defun f (x)
(declare (type word x) (optimize speed))
(values (floor x -8)))
both (DISASSEMBLE 'F) or (SB-DISASSEM: :DISASSEMBLE- CODE-COMPONENT #'F) show the correct disassembly.
Replace F here with the (COMPILE NIL ...) expression from the bug description and both calls again show the correct disassembly.
So it may be that the bug occurs only when using *COMPILER- TRACE-OUTPUT* .