Author: Armin Rigo <ar...@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=...) + """) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit