[pypy-commit] pypy vecopt: problem with float abs (expanded variable but did not remove second use), andps constant pointed to neg constant
plan_rich
noreply at buildbot.pypy.org
Fri Jun 5 08:56:02 CEST 2015
Author: Richard Plangger <rich at pasra.at>
Branch: vecopt
Changeset: r77876:062f2c00c3f0
Date: 2015-06-05 08:56 +0200
http://bitbucket.org/pypy/pypy/changeset/062f2c00c3f0/
Log: problem with float abs (expanded variable but did not remove second
use), andps constant pointed to neg constant added a test for int32
expand
diff --git a/pypy/module/micronumpy/test/test_zjit.py b/pypy/module/micronumpy/test/test_zjit.py
--- a/pypy/module/micronumpy/test/test_zjit.py
+++ b/pypy/module/micronumpy/test/test_zjit.py
@@ -211,6 +211,21 @@
assert int(result) == 7+16+8+16
self.check_vectorized(2, 2)
+ def define_int32_expand():
+ return """
+ a = astype(|30|, int32)
+ c = astype(|1|, int32)
+ c[0] = 16i
+ b = a + c
+ x1 = b -> 7
+ x2 = b -> 8
+ x1 + x2
+ """
+ def test_int32_expand(self):
+ result = self.run("int32_expand")
+ assert int(result) == 7+16+8+16
+ self.check_vectorized(2, 2)
+
def define_int32_add_const():
return """
a = astype(|30|, int32)
diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -103,7 +103,7 @@
# 0x80000000800000008000000080000000
single_neg_const = '\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x80'
#
- data = neg_const + neg_const + abs_const + abs_const + \
+ data = neg_const + abs_const + \
single_neg_const + single_abs_const
datablockwrapper = MachineDataBlockWrapper(self.cpu.asmmemmgr, [])
float_constants = datablockwrapper.malloc_aligned(len(data), alignment=16)
More information about the pypy-commit
mailing list