Author: Richard Plangger <planri...@gmail.com> Branch: vecopt-merge Changeset: r79742:abfd8bc5e489 Date: 2015-09-21 20:02 +0200 http://bitbucket.org/pypy/pypy/changeset/abfd8bc5e489/
Log: all optimizeopt tests pass again 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 @@ -120,7 +120,7 @@ return self.all_fielddescrs def is_object(self): - self.S = S + return self._is_object def get_vtable(self): assert self._vtable is not None diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py --- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py +++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py @@ -158,6 +158,8 @@ continue if 'FLOAT' in op: continue + if 'VEC' in op: + continue args = [] for _ in range(oparity[opnum]): args.append(random.randrange(1, 20)) diff --git a/rpython/jit/metainterp/optimizeopt/test/test_vecopt.py b/rpython/jit/metainterp/optimizeopt/test/test_vecopt.py --- a/rpython/jit/metainterp/optimizeopt/test/test_vecopt.py +++ b/rpython/jit/metainterp/optimizeopt/test/test_vecopt.py @@ -143,7 +143,7 @@ def schedule(self, loop, unroll_factor = -1, with_guard_opt=False): info = FakeLoopInfo(loop) - info.snapshot(loop.operations + [loop.jump], loop.label) + info.snapshot(loop) opt, graph = self.vectoroptimizer_unrolled(loop, unroll_factor) opt.find_adjacent_memory_refs(graph) opt.extend_packset() @@ -158,7 +158,7 @@ def vectorize(self, loop, unroll_factor = -1): info = FakeLoopInfo(loop) - info.snapshot(loop.operations + [loop.jump], loop.label) + info.snapshot(loop) opt, graph = self.vectoroptimizer_unrolled(loop, unroll_factor) opt.find_adjacent_memory_refs(graph) opt.extend_packset() @@ -671,7 +671,7 @@ """ loop = self.parse_loop(ops) vopt, graph = self.init_packset(loop,1) - self.assert_independent(4,8) + self.assert_independent(graph, 4,8) assert vopt.packset is not None assert len(graph.memory_refs) == 2 assert len(vopt.packset.packs) == 1 @@ -699,7 +699,7 @@ for i in range(3): x = (i+1)*2 y = x + 2 - self.assert_independent(x,y) + self.assert_independent(graph, x,y) self.assert_packset_contains_pair(vopt.packset, x,y) def test_packset_init_2(self): @@ -732,7 +732,7 @@ for i in range(15): x = (i+1)*4 y = x + 4 - self.assert_independent(x,y) + self.assert_independent(graph, x,y) self.assert_packset_contains_pair(vopt.packset, x, y) def test_isomorphic_operations(self): @@ -766,7 +766,7 @@ loop = self.parse_loop(ops) vopt, graph = self.extend_packset(loop,1) assert len(graph.memory_refs) == 2 - self.assert_independent(5,10) + self.assert_independent(graph, 5,10) assert len(vopt.packset.packs) == 2 self.assert_packset_empty(vopt.packset, len(loop.operations), @@ -786,9 +786,9 @@ loop = self.parse_loop(ops) vopt, graph = self.extend_packset(loop,1) assert len(graph.memory_refs) == 4 - self.assert_independent(4,10) - self.assert_independent(5,11) - self.assert_independent(6,12) + self.assert_independent(graph, 4,10) + self.assert_independent(graph, 5,11) + self.assert_independent(graph, 6,12) assert len(vopt.packset.packs) == 3 self.assert_packset_empty(vopt.packset, len(loop.operations), [(6,12), (5,11), (4,10)]) diff --git a/rpython/jit/metainterp/resoperation.py b/rpython/jit/metainterp/resoperation.py --- a/rpython/jit/metainterp/resoperation.py +++ b/rpython/jit/metainterp/resoperation.py @@ -133,7 +133,10 @@ elif self.opnum == rop.INT_SIGNEXT: arg0 = self.getarg(0) arg1 = self.getarg(1) - self.setdatatype('i', arg1.value, arg0.signed) + signed = True + if not arg0.is_constant(): + signed = arg0.signed + self.setdatatype('i', arg1.value, True) elif self.is_typecast(): ft,tt = self.cast_types() self.setdatatype(tt, self.cast_to_bytesize(), tt == 'i') _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit