Author: Maciej Fijalkowski <fij...@gmail.com> Branch: optresult-unroll Changeset: r79355:6c72b2fe2180 Date: 2015-09-01 11:47 +0200 http://bitbucket.org/pypy/pypy/changeset/6c72b2fe2180/
Log: add a failing test diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py --- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py +++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py @@ -8685,5 +8685,23 @@ """ self.optimize_loop(ops, ops) + def test_pass_both_short_preamble_and_arg(self): + ops = """ + [i0, i1] + i2 = int_add(i0, 1) + jump(i0, i2) + """ + expected = """ + [i0, i1, i2] + jump(i0, i1, i2) + """ + preamble = """ + [i0, i1] + i2 = int_add(i0, 1) + i3 = same_as_i(i2) + jump(i0, i2, i3) + """ + self.optimize_loop(ops, expected, preamble) + class TestLLtype(OptimizeOptTest, LLtypeMixin): pass diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py b/rpython/jit/metainterp/optimizeopt/unroll.py --- a/rpython/jit/metainterp/optimizeopt/unroll.py +++ b/rpython/jit/metainterp/optimizeopt/unroll.py @@ -138,7 +138,6 @@ return (UnrollInfo(target_token, label_op, [], self.optimizer.quasi_immutable_deps), self.optimizer._newoperations) - #return new_virtual_state, self.optimizer._newoperations return (UnrollInfo(target_token, label_op, extra_same_as, self.optimizer.quasi_immutable_deps), self.optimizer._newoperations) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit