[pypy-commit] pypy vecopt2: added a test for an unalias counter example
plan_rich
noreply at buildbot.pypy.org
Tue May 5 09:45:41 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: vecopt2
Changeset: r77092:00def8c688af
Date: 2015-03-25 15:52 +0100
http://bitbucket.org/pypy/pypy/changeset/00def8c688af/
Log: added a test for an unalias counter example
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_dependency.py b/rpython/jit/metainterp/optimizeopt/test/test_dependency.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_dependency.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_dependency.py
@@ -282,5 +282,19 @@
self.assert_edges(dep_graph,
[ [1,2,3], [0,2], [0,1,3], [0,2] ])
+ def test_setarrayitem_same_modified_var_not_aliased(self):
+ # #1 depends on #2, i1 and i2 might alias, reordering would destroy
+ # coorectness
+ ops="""
+ [p0, i1]
+ setarrayitem_raw(p0, i1, 1, descr=floatarraydescr) #1
+ i2 = int_add(i1,1)
+ setarrayitem_raw(p0, i2, 2, descr=floatarraydescr) #2
+ jump(p0, i1)
+ """
+ dep_graph = self.build_dependency(ops)
+ self.assert_edges(dep_graph,
+ [ [1,2,3,4], [0], [0,3], [0,2,4], [0,3] ])
+
class TestLLtype(BaseTestDependencyGraph, LLtypeMixin):
pass
More information about the pypy-commit
mailing list