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

pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_and

self = <pypy.module.pypyjit.test_pypy_c.test_micronumpy.TestMicroNumPy object at 0x000000003c614720>

    def test_reduce_logical_and(self):
        def main():
            import _numpypy.multiarray as np
            import _numpypy.umath as um
            arr = np.array([1.0] * 1500)
            return um.logical_and.reduce(arr)
        log = self.run(main, [])
        assert log.result is True
        assert len(log.loops) == 1
        loop = log._filter(log.loops[0])
        if IS_RISCV:
            # The order of %(align_check)s and guard_not_invalidated(descr=...)
            # in the RISCV backend is different from other backends.
            loop.match("""
                guard_not_invalidated(descr=...)
                %(align_check)s
                f31 = raw_load_f(i9, i29, descr=<ArrayF 8>)
                i32 = float_ne(f31, 0.000000)
                guard_true(i32, descr=...)
                i36 = int_add(i24, 1)
                i37 = int_add(i29, 8)
                i38 = int_ge(i36, i30)
                guard_false(i38, descr=...)
                jump(..., descr=...)
                """ % {'align_check': align_check('i29')})
        else:
            loop.match("""
                %(align_check)s
                guard_not_invalidated(descr=...)
                f31 = raw_load_f(i9, i29, descr=<ArrayF 8>)
                i32 = float_ne(f31, 0.000000)
                guard_true(i32, descr=...)
                i36 = int_add(i24, 1)
                i37 = int_add(i29, 8)
                i38 = int_ge(i36, i30)
                guard_false(i38, descr=...)
                jump(..., descr=...)
>               """ % {'align_check': align_check('i29')})

pypy/module/pypyjit/test_pypy_c/test_micronumpy.py:237: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pypy/module/pypyjit/test_pypy_c/model.py:186: in match
    return matcher.match(expected_src, **kwds)
pypy/module/pypyjit/test_pypy_c/model.py:527: in match
    self.match_loop(expected_ops, ignore_ops)
pypy/module/pypyjit/test_pypy_c/model.py:503: in match_loop
    self.match_op(op, exp_op)
pypy/module/pypyjit/test_pypy_c/model.py:412: in match_op
    self._assert(op.name == exp_opname, "operation mismatch")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pypy.module.pypyjit.test_pypy_c.model.OpMatcher object at 0x000000003c5da480>
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:405: InvalidMatch
builder: pypy-c-jit-linux-aarch64 build #2900+
test: pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_and