summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2024-09-24 09:24:15 +0200
committerAndy Wingo <wingo@pobox.com>2024-09-24 09:24:15 +0200
commitb04071cc579e7b9d38d0c999e731bdd94b7f7a78 (patch)
treee618071a3ebccc812a4f93f6f9367a5c1b67143c
parent5e6288c9304b60f1875a44808ee3858e3d6efc83 (diff)
downloadguile-b04071cc579e7b9d38d0c999e731bdd94b7f7a78.tar.gz
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.
-rw-r--r--module/language/cps/specialize-numbers.scm4
1 files 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))