[pypy-commit] pypy jit-short_from_state: we get 2 version of this loop too
hakanardo
noreply at buildbot.pypy.org
Sun May 22 10:10:51 CEST 2011
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-short_from_state
Changeset: r44361:6317b50ca814
Date: 2011-05-21 19:36 +0200
http://bitbucket.org/pypy/pypy/changeset/6317b50ca814/
Log: we get 2 version of this loop too
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -824,19 +824,19 @@
""" % (a, b)
log = self.run(src, [], threshold=400)
assert log.result == res
- loop, = log.loops_by_filename(self.filepath)
- le_ops = log.opnames(loop.ops_by_id('lt'))
- gt_ops = log.opnames(loop.ops_by_id('gt'))
- assert le_ops.count('int_lt') == 1
- #
- if opt_expected:
- assert gt_ops.count('int_gt') == 0
- else:
- # if this assert fails it means that the optimization was
- # applied even if we don't expect to. Check whether the
- # optimization is valid, and either fix the code or fix the
- # test :-)
- assert gt_ops.count('int_gt') == 1
+ for loop in log.loops_by_filename(self.filepath):
+ le_ops = log.opnames(loop.ops_by_id('lt'))
+ gt_ops = log.opnames(loop.ops_by_id('gt'))
+ assert le_ops.count('int_lt') == 1
+ #
+ if opt_expected:
+ assert gt_ops.count('int_gt') == 0
+ else:
+ # if this assert fails it means that the optimization was
+ # applied even if we don't expect to. Check whether the
+ # optimization is valid, and either fix the code or fix the
+ # test :-)
+ assert gt_ops.count('int_gt') == 1
def test_boolrewrite_allcases_inverse(self):
More information about the pypy-commit
mailing list