Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: better-storesink
Changeset: r87234:5c15154ee248
Date: 2016-09-19 20:03 +0200
http://bitbucket.org/pypy/pypy/changeset/5c15154ee248/

Log:    a passing test

diff --git a/rpython/translator/backendopt/test/test_cse.py 
b/rpython/translator/backendopt/test/test_cse.py
--- a/rpython/translator/backendopt/test/test_cse.py
+++ b/rpython/translator/backendopt/test/test_cse.py
@@ -335,6 +335,25 @@
             return res
         self.check(f, [int], getfield=0)
 
+    def test_loopinvariant_heap_merge_not_possible(self):
+        class A(object):
+            pass
+        def f(i):
+            res = 0
+            x = i
+            a = A()
+            if i == 0:
+                a.x = 1
+            else:
+                a.x = i
+            while x:
+                x -= 1
+                res += a.x
+                if x % 1000 == 1:
+                    a.x = 5
+            return res
+        self.check(f, [int], getfield=1)
+
     def test_direct_merge(self):
         def f(i):
             a = i + 1
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to