From cc9cd51bcf249474217c5741145f7f780a04fb54 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 24 Sep 2024 09:24:15 +0200 Subject: Partially revert d579848cb5d65440af5afd9c8968628665554c22 * module/language/cps/specialize-numbers.scm (specialize-operations): Accept any operand to logand/immediate, provided the result is a u64 in the right range. Origin: upstream, commit b04071cc579e7b9d38d0c999e731bdd94b7f7a78 --- module/language/cps/specialize-numbers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/language/cps/specialize-numbers.scm b/module/language/cps/specialize-numbers.scm index f93250756..cd884533c 100644 --- a/module/language/cps/specialize-numbers.scm +++ b/module/language/cps/specialize-numbers.scm @@ -561,13 +561,13 @@ BITS indicating the significant bits needed for a variable. BITS may be (specialize-unop cps k src op param a (unbox-u64 a) (box-u64 result)))) - (('logand/immediate (? u64-result?) param (? u64-operand? a)) + (('logand/immediate (? u64-result?) param a) (specialize-unop cps k src 'ulogand/immediate (logand param (or (intmap-ref sigbits result) -1) (1- (ash 1 64))) a - (unbox-u64 a) (box-u64 result))) + (unbox-u64/truncate a) (box-u64 result))) (((or 'add/immediate 'sub/immediate 'mul/immediate) (? s64-result?) (? s64-parameter?) (? s64-operand? a))