pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_gt
self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x000000000af32fa8>
def test_intbound_gt(self):
def main(n):
i, a, b = 0, 0, 0
while i < n:
if i > -1:
a += 1
if i > -2:
b += 1
i += 1
return (a, b)
#
log = self.run(main, [300])
assert log.result == (300, 300)
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i10 = int_lt(i8, i9)
guard_true(i10, descr=...)
i12 = int_add_ovf(i7, 1)
guard_no_overflow(descr=...)
i14 = int_add_ovf(i6, 1)
guard_no_overflow(descr=...)
i17 = int_add(i8, 1)
--TICK--
jump(..., descr=...)
""")
pypy/module/pypyjit/test_pypy_c/test_intbound.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy/module/pypyjit/test_pypy_c/model.py:177: in match
return matcher.match(expected_src, **kwds)
pypy/module/pypyjit/test_pypy_c/model.py:524: in match
self.match_loop(expected_ops, ignore_ops)
pypy/module/pypyjit/test_pypy_c/model.py:500: in match_loop
self.match_op(op, exp_op)
pypy/module/pypyjit/test_pypy_c/model.py:409: in match_op
self._assert(op.name == exp_opname, "operation mismatch")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x000000000af97d70>
cond = False, message = 'operation mismatch'
def _assert(self, cond, message):
if not cond:
> raise InvalidMatch(message, frame=sys._getframe(1))
E InvalidMatch: operation mismatch
pypy/module/pypyjit/test_pypy_c/model.py:402: InvalidMatch
---------- Captured stdout call ----------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Loops don't match
=================
loop id = None
('operation mismatch',)
<could not determine information>
Ignore ops: []
Got:
===== HERE =====
guard_not_invalidated(descr=<Guard0x7fc4475e3970>)
i44 = int_lt(i39, i26)
guard_true(i44, descr=<Guard0x7fc447510838>)
i46 = int_add_ovf(i33, 1)
guard_no_overflow(descr=<Guard0x7fc447510870>)
i48 = int_add_ovf(i37, 1)
guard_no_overflow(descr=<Guard0x7fc4475108a8>)
i50 = int_add(i39, 1)
i52 = getfield_raw_i(140480986024608, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i54 = int_lt(i52, 0)
guard_false(i54, descr=<Guard0x7fc447510918>)
jump(p0, p1, p8, i48, i46, i50, p20, i26, descr=TargetToken(140480986817568))
Expected:
i10 = int_lt(i8, i9)
guard_true(i10, descr=...)
i12 = int_add_ovf(i7, 1)
guard_no_overflow(descr=...)
i14 = int_add_ovf(i6, 1)
guard_no_overflow(descr=...)
i17 = int_add(i8, 1)
guard_not_invalidated?
ticker0 = getfield_raw_i(#, descr=<FieldS pypysig_long_struct_inner.c_value .*>)
ticker_cond0 = int_lt(ticker0, 0)
guard_false(ticker_cond0, descr=...)
jump(..., descr=...)
builder: pypy-c-jit-linux-x86-64 build #11971+
test: pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_gt