Ticket #20 (closed defect: fixed)
Modular arith bug?
| Reported by: | rtoy | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Core | Version: | 19e |
| Keywords: | Cc: |
Description (last modified by rtoy) (diff)
(declaim (inline mat3neg mat3neg-a)) (defun mat3neg (tt v) (ldb (byte 32 0) (ash v (- tt)))) (defun mat3neg-a (tt v) (logand #xffffffff (ash v (- tt)))) (defun zot (z2) (declare (type (unsigned-byte 32) z2) (optimize speed (safety 0))) (mat3neg -28 z2)) (defun zot-a (z2) (declare (type (unsigned-byte 32) z2) (optimize speed (safety 0))) (mat3neg-a -28 z2))
Compile zot and there are lots of compiler notes, from mat3neg. But compile zot-a and there's just one for boxing up the result.
However, zot and zot-a are functionally identical, so zot and zot-a should produce the same code. But zot has to do a full call to ash and two-arg-and.
The ldb must be confusing the compiler somehow.
Change History
Note: See
TracTickets for help on using
tickets.
