pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_addsub_ge
self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x000000000bff6e20>
def test_intbound_addsub_ge(self):
def main(n):
i, a, b = 0, 0, 0
while i < n:
if i + 5 >= 5:
a += 1
if i - 1 >= -1:
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(i8, 5)
guard_no_overflow(descr=...)
i14 = int_add_ovf(i7, 1)
guard_no_overflow(descr=...)
i16s = int_add(i8, -1)
i16 = int_add_ovf(i6, 1)
guard_no_overflow(descr=...)
i19 = int_add(i8, 1)
--TICK--
jump(..., descr=...)
""")
pypy/module/pypyjit/test_pypy_c/test_intbound.py:141:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
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 0x0000000010a9edb0>
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=<Guard0x7f451dad1970>)
i48 = int_lt(i43, i26)
guard_true(i48, descr=<Guard0x7f4519d90870>)
i50 = int_add_ovf(i43, 5)
guard_no_overflow(descr=<Guard0x7f4519d908a8>)
i52 = int_add_ovf(i35, 1)
guard_no_overflow(descr=<Guard0x7f4519d908e0>)
i54 = int_add(i43, -1)
i56 = int_add_ovf(i41, 1)
guard_no_overflow(descr=<Guard0x7f4519d90918>)
i58 = int_add(i43, 1)
i60 = getfield_raw_i(139934824729248, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
i62 = int_lt(i60, 0)
guard_false(i62, descr=<Guard0x7f4519d90988>)
jump(p0, p1, p8, i56, i52, i58, p20, i26, descr=TargetToken(139934763131936))
Expected:
i10 = int_lt(i8, i9)
guard_true(i10, descr=...)
i12 = int_add_ovf(i8, 5)
guard_no_overflow(descr=...)
i14 = int_add_ovf(i7, 1)
guard_no_overflow(descr=...)
i16s = int_add(i8, -1)
i16 = int_add_ovf(i6, 1)
guard_no_overflow(descr=...)
i19 = 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_addsub_ge