[pypy-commit] pypy default: do not call intmask on float parameters (as pointed out by armin)

plan_rich pypy.commits at gmail.com
Tue Nov 8 10:37:49 EST 2016


Author: Richard Plangger <planrichi at gmail.com>
Branch: 
Changeset: r88220:b82fe3f0417e
Date: 2016-11-08 14:21 +0100
http://bitbucket.org/pypy/pypy/changeset/b82fe3f0417e/

Log:	do not call intmask on float parameters (as pointed out by armin)

diff --git a/rpython/jit/backend/llgraph/runner.py b/rpython/jit/backend/llgraph/runner.py
--- a/rpython/jit/backend/llgraph/runner.py
+++ b/rpython/jit/backend/llgraph/runner.py
@@ -842,16 +842,22 @@
         assert len(vx) == len(vy) == count
         return [intmask(_vx {2} _vy) for _vx,_vy in zip(vx,vy)]
     """
+    vector_float_arith_code = """
+    def bh_vec_{0}_{1}(self, vx, vy, count):
+        assert len(vx) == len(vy) == count
+        return [_vx {2} _vy for _vx,_vy in zip(vx,vy)]
+    """
     exec py.code.Source(vector_arith_code.format('int','add','+')).compile()
     exec py.code.Source(vector_arith_code.format('int','sub','-')).compile()
     exec py.code.Source(vector_arith_code.format('int','mul','*')).compile()
     exec py.code.Source(vector_arith_code.format('int','and','&')).compile()
     exec py.code.Source(vector_arith_code.format('int','or','|')).compile()
-    exec py.code.Source(vector_arith_code.format('float','add','+')).compile()
-    exec py.code.Source(vector_arith_code.format('float','sub','-')).compile()
-    exec py.code.Source(vector_arith_code.format('float','mul','*')).compile()
-    exec py.code.Source(vector_arith_code.format('float','truediv','/')).compile()
-    exec py.code.Source(vector_arith_code.format('float','eq','==')).compile()
+
+    exec py.code.Source(vector_float_arith_code.format('float','add','+')).compile()
+    exec py.code.Source(vector_float_arith_code.format('float','sub','-')).compile()
+    exec py.code.Source(vector_float_arith_code.format('float','mul','*')).compile()
+    exec py.code.Source(vector_float_arith_code.format('float','truediv','/')).compile()
+    exec py.code.Source(vector_float_arith_code.format('float','eq','==')).compile()
 
     def bh_vec_float_neg(self, vx, count):
         return [e * -1 for e in vx]


More information about the pypy-commit mailing list