[pypy-commit] pypy default: Remove a corner case where lower == MININT/2 or upper = MAXINT/2,
arigo
pypy.commits at gmail.com
Tue Apr 4 14:48:54 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r90948:144118957d4a
Date: 2017-04-04 20:29 +0200
http://bitbucket.org/pypy/pypy/changeset/144118957d4a/
Log: Remove a corner case where lower == MININT/2 or upper = MAXINT/2,
which is recorded as if "not too big", but actually not used as "too
big"
diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py b/rpython/jit/metainterp/optimizeopt/unroll.py
--- a/rpython/jit/metainterp/optimizeopt/unroll.py
+++ b/rpython/jit/metainterp/optimizeopt/unroll.py
@@ -86,12 +86,14 @@
if preamble_info.is_nonnull():
self.make_nonnull(op)
elif isinstance(preamble_info, intutils.IntBound):
- if preamble_info.lower > MININT/2 or preamble_info.upper < MAXINT/2:
+ fix_lo = preamble_info.has_lower and preamble_info.lower >= MININT/2
+ fix_up = preamble_info.has_upper and preamble_info.upper <= MAXINT/2
+ if fix_lo or fix_up:
intbound = self.getintbound(op)
- if preamble_info.has_lower and preamble_info.lower > MININT/2:
+ if fix_lo:
intbound.has_lower = True
intbound.lower = preamble_info.lower
- if preamble_info.has_upper and preamble_info.upper < MAXINT/2:
+ if fix_up:
intbound.has_upper = True
intbound.upper = preamble_info.upper
elif isinstance(preamble_info, info.FloatConstInfo):
More information about the pypy-commit
mailing list