[pypy-svn] r78559 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Sat Oct 30 19:15:29 CEST 2010
Author: cfbolz
Date: Sat Oct 30 19:15:27 2010
New Revision: 78559
Modified:
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
further improvement possible
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py Sat Oct 30 19:15:27 2010
@@ -2821,6 +2821,7 @@
# time. Check that it is either constant-folded (and replaced by
# the result of the call, recorded as the first arg), or turned into
# a regular CALL.
+ # XXX can this test be improved with unrolling?
ops = '''
[i0, i1, i2]
escape(i1)
@@ -2829,14 +2830,21 @@
i4 = call_pure(43, 123456, 4, i0, 6, descr=plaincalldescr)
jump(i0, i3, i4)
'''
- expected = '''
+ preamble = '''
[i0, i1, i2]
escape(i1)
escape(i2)
i4 = call(123456, 4, i0, 6, descr=plaincalldescr)
- jump(i0, 42, i4)
+ jump(i0, i4)
'''
- self.optimize_loop(ops, expected)
+ expected = '''
+ [i0, i2]
+ escape(42)
+ escape(i2)
+ i4 = call(123456, 4, i0, 6, descr=plaincalldescr)
+ jump(i0, i4)
+ '''
+ self.optimize_loop(ops, expected, preamble)
def test_vref_nonvirtual_nonescape(self):
ops = """
More information about the Pypy-commit
mailing list