Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/pypyjit/test_pypy_c/test_intbound.py::TestIntbound::()::test_intbound_addmul_ge

self = <pypy.module.pypyjit.test_pypy_c.test_intbound.TestIntbound object at 0x000000000b548448>

    def test_intbound_addmul_ge(self):
        def main(n):
            i, a, b = 0, 0, 0
            while i < 300:
                if i + 5 >= 5:
                    a += 1
                if 2 * i >= 0:
                    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, 300)
                guard_true(i10, descr=...)
                i12 = int_add(i8, 5)
                i14 = int_add_ovf(i7, 1)
                guard_no_overflow(descr=...)
                i16 = int_lshift(i8, 1)
                i18 = int_add_ovf(i6, 1)
                guard_no_overflow(descr=...)
                i21 = int_add(i8, 1)
                --TICK--
                jump(..., descr=...)
            """)

pypy/module/pypyjit/test_pypy_c/test_intbound.py:170: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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 0x000000000c699980>
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=<Guard0x7f46b20ad920>)
    i48 = int_lt(i42, 300)
    guard_true(i48, descr=<Guard0x7f46b1e7e790>)
    i50 = int_add(i42, 5)
    i52 = int_add_ovf(i34, 1)
    guard_no_overflow(descr=<Guard0x7f46b1e7e7c8>)
    i54 = int_lshift(i42, 1)
    i56 = int_add_ovf(i40, 1)
    guard_no_overflow(descr=<Guard0x7f46b1e7e800>)
    i58 = int_add(i42, 1)
    i60 = getfield_raw_i(139941606918816, descr=<FieldS pypysig_long_struct_inner.c_value 0>)
    i62 = int_lt(i60, 0)
    guard_false(i62, descr=<Guard0x7f46b1e7e870>)
    jump(p0, p1, p8, i56, i52, i58, p20, descr=TargetToken(139941609210528))

Expected:
    
    i10 = int_lt(i8, 300)
    guard_true(i10, descr=...)
    i12 = int_add(i8, 5)
    i14 = int_add_ovf(i7, 1)
    guard_no_overflow(descr=...)
    i16 = int_lshift(i8, 1)
    i18 = int_add_ovf(i6, 1)
    guard_no_overflow(descr=...)
    i21 = 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_addmul_ge