Author: Berkin Ilbeyi <[email protected]>
Branch: fold-arith-ops
Changeset: r77456:55654cba5990
Date: 2015-05-21 13:12 -0400
http://bitbucket.org/pypy/pypy/changeset/55654cba5990/
Log: change add/sub elim test to reflect int_add folding
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
b/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
@@ -3756,7 +3756,13 @@
i4 = int_sub(i0, %s)
jump(i0, i2, i3, i4)
""" % ((-sys.maxint - 1, ) * 3)
- self.optimize_loop(ops, ops) # does not crash
+ expected = """
+ [i0, i10, i11, i12]
+ i2 = int_add(%s, i0)
+ i4 = int_sub(i0, %s)
+ jump(i0, i2, i0, i4)
+ """ % ((-sys.maxint - 1, ) * 2)
+ self.optimize_loop(ops, expected)
def test_framestackdepth_overhead(self):
ops = """
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit