pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_sub_lt
self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x0000000010126218>
def test_intbound_sub_lt(self):
def main():
i, a = 0, 0
while i < 300:
if i - 10 < 295:
a += 1
i += 1
return a
#
log = self.run(main, [])
assert log.result == 300
loop, = log.loops_by_filename(self.filepath)
> assert loop.match("""
i7 = int_lt(i5, 300)
guard_true(i7, descr=...)
i9 = int_sub_ovf(i5, 10)
guard_no_overflow(descr=...)
i11 = int_add_ovf(i4, 1)
guard_no_overflow(descr=...)
i13 = int_add(i5, 1)
--TICK--
jump(..., descr=...)
""")
pypy/module/pypyjit/test_pypy_c/test_intbound.py:115:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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 0x0000000010405c90>
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=<Guard0x7fcb287138d0>)
i34 = int_lt(i28, 300)
guard_true(i34, descr=<Guard0x7fcb28590448>)
i36 = int_sub_ovf(i28, 10)
guard_no_overflow(descr=<Guard0x7fcb28590480>)
i38 = int_add_ovf(i26, 1)
guard_no_overflow(descr=<Guard0x7fcb285904b8>)
i40 = int_add(i28, 1)
i42 = getfield_raw_i(140510530701984, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i44 = int_lt(i42, 0)
guard_false(i44, descr=<Guard0x7fcb28590528>)
jump(p0, p1, i38, i40, descr=TargetToken(140510532018528))
Expected:
i7 = int_lt(i5, 300)
guard_true(i7, descr=...)
i9 = int_sub_ovf(i5, 10)
guard_no_overflow(descr=...)
i11 = int_add_ovf(i4, 1)
guard_no_overflow(descr=...)
i13 = int_add(i5, 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_sub_lt