Author: Richard Plangger <planri...@gmail.com> Branch: ppc-vsx-support Changeset: r86002:57316f5af6ff Date: 2016-08-03 14:00 +0200 http://bitbucket.org/pypy/pypy/changeset/57316f5af6ff/
Log: enforce that a successful vectorization in the pypy_c tests (micronumpy) diff --git a/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py b/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py --- a/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py +++ b/pypy/module/pypyjit/test_pypy_c/test_micronumpy.py @@ -51,6 +51,10 @@ log = self.run(main, [], vec=0) assert log.result == vlog.result assert log.result == result + assert log.jit_summary.vecopt_tried == 0 + assert log.jit_summary.vecopt_success == 0 + assert vlog.jit_summary.vecopt_tried > 0 + assert vlog.jit_summary.vecopt_success > 0 arith_comb = [ @@ -88,6 +92,10 @@ log = self.run(main, [], vec=0) assert log.result == vlog.result assert log.result == result + assert log.jit_summary.vecopt_tried == 0 + assert log.jit_summary.vecopt_success == 0 + assert vlog.jit_summary.vecopt_tried > 0 + assert vlog.jit_summary.vecopt_success > 0 def test_reduce_logical_xor(self): def main(): diff --git a/rpython/jit/metainterp/optimizeopt/vector.py b/rpython/jit/metainterp/optimizeopt/vector.py --- a/rpython/jit/metainterp/optimizeopt/vector.py +++ b/rpython/jit/metainterp/optimizeopt/vector.py @@ -148,7 +148,7 @@ return info, loop.finaloplist(jitcell_token=jitcell_token, reset_label_token=False) except NotAVectorizeableLoop as e: debug_stop("vec-opt-loop") - debug_print("failed to vectorize loop. reason: %s" % str(e)) + debug_print("failed to vectorize loop. reason: %s" % e.msg) # vectorization is not possible return loop_info, version.loop.finaloplist() except NotAProfitableLoop: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit