Author: Maciej Fijalkowski <fij...@gmail.com>
Branch: optresult-unroll
Changeset: r78840:baf938297d47
Date: 2015-08-06 22:11 +0200
http://bitbucket.org/pypy/pypy/changeset/baf938297d47/

Log:    write a passing test

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
@@ -5736,5 +5736,23 @@
         """
         self.optimize_loop(ops, expected)
 
+    def test_getarrayitem_gc_pure_not_invalidated(self):
+        ops = """
+        [p0]
+        i1 = getarrayitem_gc_pure_i(p0, 1, descr=arraydescr)
+        escape_n(p0)
+        i2 = getarrayitem_gc_pure_i(p0, 1, descr=arraydescr)
+        escape_n(i2)
+        jump(p0)
+        """
+        expected = """
+        [p0]
+        i1 = getarrayitem_gc_pure_i(p0, 1, descr=arraydescr)
+        escape_n(p0)
+        escape_n(i1)
+        jump(p0)
+        """
+        self.optimize_loop(ops, expected)
+
 class TestLLtype(BaseTestOptimizeBasic, LLtypeMixin):
     pass
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to