Author: Richard Plangger <[email protected]>
Branch: vecopt
Changeset: r77979:450cfd82b800
Date: 2015-06-09 10:17 +0200
http://bitbucket.org/pypy/pypy/changeset/450cfd82b800/

Log:    added test to ensure sum is not prohibited by cost calculation

diff --git a/rpython/jit/metainterp/optimizeopt/test/test_costmodel.py 
b/rpython/jit/metainterp/optimizeopt/test/test_costmodel.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_costmodel.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_costmodel.py
@@ -121,5 +121,15 @@
         savings = self.savings(loop1)
         assert savings == 1
 
+    def test_sum(self):
+        loop1 = self.parse("""
+        f10 = raw_load(p0, i0, descr=double)
+        f11 = raw_load(p0, i1, descr=double)
+        f12 = float_add(f1, f10)
+        f13 = float_add(f12, f11)
+        """)
+        savings = self.savings(loop1)
+        assert savings == 2
+
 class Test(CostModelBaseTest, LLtypeMixin):
     pass
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to