aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-11-23 11:45:57 +0100
committerArmin Rigo <arigo@tunes.org>2016-11-23 11:45:57 +0100
commite8362fa270c9f32c034ec6b019f019f118c9200c (patch)
tree7c8fbfce3253f8b824344484fe8e4e22096fce89 /rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
parentPass tests (diff)
downloadpypy-e8362fa270c9f32c034ec6b019f019f118c9200c.tar.gz
pypy-e8362fa270c9f32c034ec6b019f019f118c9200c.tar.bz2
pypy-e8362fa270c9f32c034ec6b019f019f118c9200c.zip
progress
Diffstat (limited to 'rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py')
-rw-r--r--rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
index ed02ead94f..7f87a18aa1 100644
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -4,6 +4,7 @@ from rpython.rlib.rarithmetic import intmask
from rpython.rtyper.lltypesystem import lltype
from rpython.jit.metainterp import compile, resume
from rpython.jit.metainterp.history import AbstractDescr, ConstInt, TreeLoop
+from rpython.jit.metainterp.history import ConstPtr
from rpython.jit.metainterp.optimize import InvalidLoop
from rpython.jit.metainterp.optimizeopt import build_opt_chain
from rpython.jit.metainterp.optimizeopt.test.test_util import (
@@ -8727,6 +8728,22 @@ class OptimizeOptTest(BaseTestWithUnroll):
"""
self.optimize_loop(ops, expected)
+ def test_cond_call_r3(self):
+ arg_consts = [ConstInt(i) for i in (123, 4, 5, 6)]
+ call_pure_results = {tuple(arg_consts): ConstPtr(self.myptr)}
+ ops = """
+ [p1]
+ p2 = cond_call_value_r(p1, 123, 4, 5, 6, descr=plain_r_calldescr)
+ p3 = escape_r(p2)
+ jump(p3)
+ """
+ expected = """
+ [p1]
+ p3 = escape_r(ConstPtr(myptr))
+ jump(p3)
+ """
+ self.optimize_loop(ops, expected, call_pure_results=call_pure_results)
+
def test_hippyvm_unroll_bug(self):
ops = """
[p0, i1, i2]