Fixes <http://bugs.gnu.org/12883>.
* module/language/tree-il/cse.scm (cse)[find-dominating-lexical]: Fix
computation of the last argument passed to `unroll'.
Patch by Stefan Israelsson Tampe <stefan.itampe@gmail.com>.
* test-suite/tests/cse.test ("cse")["http://bugs.gnu.org/12883"]: New
test.
* module/language/tree-il/cse.scm (cse): When trying to fold
conditionals, only look at entries in the database that were added in
test context.
* test-suite/tests/cse.test ("cse"): Add a test case.
* module/language/tree-il/cse.scm (singly-valued-expression?, cse):
Allow CSE to propagate lexicals to tail positions, if the expression
is singly-valued.
* module/language/tree-il/cse.scm: New pass, some simple common
subexpression elimination with effects analysis.
* test-suite/tests/cse.test: New test.
* test-suite/Makefile.am:
* module/Makefile.am: Adapt.