From aa22f1f677194a96ea8708387417477eeeb4ec31 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 23 Nov 2017 18:13:37 +0100 Subject: [PATCH] Fix unboxed immediate range comparison type inference * module/language/cps/types.scm (imm-u64-<, imm-s64-<): Fix minimum computations. --- module/language/cps/types.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm index e83683e37..21181b96f 100644 --- a/module/language/cps/types.scm +++ b/module/language/cps/types.scm @@ -1043,7 +1043,7 @@ minimum, and maximum." (restrict! a &u64 (max (&min a) b) (&max a)))) (define-predicate-inferrer/param (imm-u64-< b a true?) (if true? - (restrict! a &u64 (max (1+ (&min a)) b) (&max a)) + (restrict! a &u64 (max (&min a) (1+ b)) (&max a)) (restrict! a &u64 (&min a) (min (&max a) b)))) (define-predicate-inferrer/param (s64-imm-= b a true?) @@ -1055,7 +1055,7 @@ minimum, and maximum." (restrict! a &s64 (max (&min a) b) (&max a)))) (define-predicate-inferrer/param (imm-s64-< b a true?) (if true? - (restrict! a &s64 (max (1+ (&min a)) b) (&max a)) + (restrict! a &s64 (max (&min a) (1+ b)) (&max a)) (restrict! a &s64 (&min a) (min (&max a) b))))