<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 0ef56cd6a27b96784a0f1389d48dfd0d4883e99b Mon Sep 17 00:00:00 2001
From: Andy Wingo &lt;wingo@pobox.com&gt;
Date: Mon, 23 Sep 2024 15:32:45 +0200
Subject: Remove needless constraints in type/range analysis

* module/language/cps/types.scm
(ulogand, ulogand/immediate, ulogsub, ulogior, ulogxor): Where we have
u64 inputs, there's no need to `restrict!`; the range will come from the
definition.

Origin: upstream, commit d6af34c0e085d785e89a64089de9779282874a2f
---
 module/language/cps/types.scm | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm
index abfca4794..512be4bb2 100644
--- a/module/language/cps/types.scm
+++ b/module/language/cps/types.scm
@@ -1,5 +1,5 @@
 ;;; Type analysis on CPS
-;;; Copyright (C) 2014-2021, 2023 Free Software Foundation, Inc.
+;;; Copyright (C) 2014-2021,2023-2024 Free Software Foundation, Inc.
 ;;;
 ;;; This library is free software: you can redistribute it and/or modify
 ;;; it under the terms of the GNU Lesser General Public License as
@@ -1653,11 +1653,8 @@ where (A0 &lt;= A &lt;= A1) and (B0 &lt;= B &lt;= B1)."
       (define-exact-integer! result min max))))
 
 (define-type-inferrer (ulogand a b result)
-  (restrict! a &amp;u64 0 &amp;u64-max)
-  (restrict! b &amp;u64 0 &amp;u64-max)
   (define! result &amp;u64 0 (min (&amp;max/u64 a) (&amp;max/u64 b))))
 (define-type-inferrer/param (ulogand/immediate param a result)
-  (restrict! a &amp;u64 0 &amp;u64-max)
   (call-with-values (lambda ()
                       (logand-bounds (&amp;min a) (&amp;max a) param param))
     (lambda (min max)
@@ -1682,8 +1679,6 @@ i.e. (logand A (lognot B)), where (A0 &lt;= A &lt;= A1) and (B0 &lt;= B &lt;= B1)."
       (define-exact-integer! result min max))))
 
 (define-type-inferrer (ulogsub a b result)
-  (restrict! a &amp;u64 0 &amp;u64-max)
-  (restrict! b &amp;u64 0 &amp;u64-max)
   (define! result &amp;u64 0 (&amp;max/u64 a)))
 
 (define (logior-bounds a0 a1 b0 b1)
@@ -1729,8 +1724,6 @@ where (A0 &lt;= A &lt;= A1) and (B0 &lt;= B &lt;= B1)."
       (define-exact-integer! result min max))))
 
 (define-type-inferrer (ulogior a b result)
-  (restrict! a &amp;u64 0 &amp;u64-max)
-  (restrict! b &amp;u64 0 &amp;u64-max)
   (define! result &amp;u64
     (max (&amp;min/0 a) (&amp;min/0 b))
     (saturate+ (&amp;max/u64 a) (&amp;max/u64 b))))
@@ -1786,8 +1779,6 @@ where (A0 &lt;= A &lt;= A1) and (B0 &lt;= B &lt;= B1)."
       (define! result &amp;exact-integer min max))))
 
 (define-type-inferrer (ulogxor a b result)
-  (restrict! a &amp;u64 0 &amp;u64-max)
-  (restrict! b &amp;u64 0 &amp;u64-max)
   (define! result &amp;u64 0 (saturate+ (&amp;max/u64 a) (&amp;max/u64 b))))
 
 (define-simple-type-checker (lognot &amp;exact-integer))
</pre></body></html>