Complete cut-to-width for modular arithmetic
authorPaul Khuong <pvk@pvk.ca>
Fri, 7 Jun 2013 22:46:25 +0000 (18:46 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sat, 8 Jun 2013 06:26:43 +0000 (02:26 -0400)
commita8419eb994f3b59b70cfa12e1004711a830a43fa
tree21ab259df09afa98282d587473645bf169dafea8
parent4f0bd9304dfa5010e2c7f17d7cecde0bba6c578e
Complete cut-to-width for modular arithmetic

 For each modular argument, go through the nodes that provide its
 value and try to narrow down their bitwidth. If we fail on any and
 the result might be too wide, splice in an explicit call to LOGAND
 or MASK-SIGNED-FIELD. Skip that last step if the value is an argument
 to an equivalent LOGAND or MASK-SIGNED-FIELD.

 Test case by Eric Marsden.
NEWS
src/compiler/srctran.lisp
tests/arith.pure.lisp