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

pypy/module/pypyjit/test_pypy_c/test_00_model.py::TestRunPyPyC::()::test_ops_by_id

self = <pypy.module.pypyjit.test_pypy_c.test_00_model.TestRunPyPyC object at 0x000000003ad1f408>

    def test_ops_by_id(self):
        def f():
            i = 0
            while i < 1003: # ID: cond
                i += 1 # ID: increment
                a = 0  # to make sure that JUMP_ABSOLUTE is not part of the ID
            return i
        #
        log = self.run(f)
        loop, = log.loops_by_id('increment')
        #
        ops = loop.ops_by_id('increment')
        assert log.opnames(ops) == ['int_add']
        #
        ops = loop.ops_by_id('cond')
        # the 'jump' at the end is because the last opcode in the loop
        # coincides with the first, and so it thinks that 'jump' belongs to
        # the id
>       assert log.opnames(ops) == ['int_lt', 'guard_true', 'jump']
E       assert ['guard_not_i...true', 'jump'] == ['int_lt', 'gu...true', 'jump']
E         At index 0 diff: 'guard_not_invalidated' != 'int_lt'
E         Left contains more items, first extra item: 'jump'
E         Use -v to get the full diff

pypy/module/pypyjit/test_pypy_c/test_00_model.py:509: AssertionError
builder: pypy-c-jit-linux-x86-64 build #11982+
test: pypy/module/pypyjit/test_pypy_c/test_00_model.py::TestRunPyPyC::()::test_ops_by_id