[pypy-commit] pypy int-test-is-zero: merge heads
arigo
pypy.commits at gmail.com
Sat Nov 16 08:03:53 EST 2019
Author: Armin Rigo <arigo at tunes.org>
Branch: int-test-is-zero
Changeset: r98067:f2afd59f9872
Date: 2019-11-16 14:02 +0100
http://bitbucket.org/pypy/pypy/changeset/f2afd59f9872/
Log: merge heads
diff --git a/pypy/module/pypyjit/test_pypy_c/test_misc.py b/pypy/module/pypyjit/test_pypy_c/test_misc.py
--- a/pypy/module/pypyjit/test_pypy_c/test_misc.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_misc.py
@@ -420,3 +420,20 @@
# the following assertion fails if the loop was cancelled due
# to "abort: vable escape"
assert len(loops) == 1
+
+ def test_bit_check(self):
+ def main(n):
+ x = 0
+ while n:
+ y = bool(n & 7) # ID: bitcheck
+ x += y
+ n -= 1
+
+ log = self.run(main, [300])
+ loop, = log.loops_by_id("bitcheck")
+ assert loop.match_by_id("bitcheck", """
+ guard_not_invalidated?
+ i11 = int_and(i7, 7) # not used
+ i12 = int_test_is_true(i7, 7)
+ guard_true(i12, descr=...)
+ """)
More information about the pypy-commit
mailing list