Substitute constants with modular equivalents more safely
authorPaul Khuong <pvk@pvk.ca>
Sat, 20 Apr 2013 11:50:52 +0000 (13:50 +0200)
committerPaul Khuong <pvk@pvk.ca>
Sat, 20 Apr 2013 11:59:03 +0000 (13:59 +0200)
commitccd2a1d4ab60a9539472df45fc4f9ec7b7fdc7b7
tree5c2d3ff7e70dfb77558616e56d3867f3770c28be
parent0562f2b641c71b8461f9aac4a354ff4b341961fe
Substitute constants with modular equivalents more safely

* Modular arithmetic sometimes lets us narrow constants down,
  especially with signed arithmetic. We now update the receiving
  LVAR's type conservatively when there are multiple uses; otherwise,
  conflicting type information results in spurious dead code
  elimination.

* Test case by Eric Marsden.

* Reported by Eric Marsden on sbcl-devel (2013-04-18).
NEWS
src/compiler/srctran.lisp
tests/compiler.pure.lisp