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 0x0000000030ce2528>

    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 0x0000000030ce3f68>
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
---------- Captured stdout call ----------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Loops don't match
=================
loop id = None
('operation mismatch',)
<could not determine information>

Ignore ops: []
Got:

	===== HERE =====
    guard_not_invalidated(descr=<Guard0xfffcc45960b0>)
    i39 = int_and(i35, 7)
    i40 = int_is_zero(i39)
    guard_true(i40, descr=<Guard0xfffcc4590b60>)
    f41 = raw_load_f(i9, i35, descr=<ArrayF 8>)
    i43 = float_ne(f41, 0.000000)
    guard_true(i43, descr=<Guard0xfffcc4590b90>)
    i45 = int_add(i28, 1)
    i47 = int_add(i35, 8)
    i48 = int_ge(i45, i36)
    guard_false(i48, descr=<Guard0xfffcc4590bc0>)
    jump(p29, i45, p1, i47, p4, p6, i9, i36, descr=TargetToken(281461091024992))

Expected:
    
    
    i10096 = int_and(i29, 7)
    i10097 = int_is_zero(i10096)
    guard_true(i10097, descr=...)
    
            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=...)
builder: pypy-c-jit-linux-aarch64 build #2903+
test: pypy/module/pypyjit/test_pypy_c/test_micronumpy.py::TestMicroNumPy::()::test_reduce_logical_and