Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r70014:2b667d34e6cd
Date: 2014-03-17 09:30 -0400
http://bitbucket.org/pypy/pypy/changeset/2b667d34e6cd/

Log:    passing test for virtualization of setarrayitem_raw followed by
        raw_load

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
@@ -1983,6 +1983,24 @@
         """
         self.optimize_loop(ops, expected)
 
+    def test_virtual_setarrayitem_raw_raw_load(self):
+        ops = """
+        [f1]
+        i0 = call('malloc', 16, descr=raw_malloc_descr)
+        guard_no_exception() []
+        setarrayitem_raw(i0, 1, f1, descr=rawarraydescr_float)
+        f2 = raw_load(i0, 8, descr=rawarraydescr_float)
+        f3 = float_add(f1, f2)
+        call('free', i0, descr=raw_free_descr)
+        jump(f3)
+        """
+        expected = """
+        [f1]
+        f2 = float_add(f1, f1)
+        jump(f2)
+        """
+        self.optimize_loop(ops, expected)
+
     def test_duplicate_getfield_1(self):
         ops = """
         [p1, p2]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to