1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Partially revert d579848cb5

* module/language/cps/specialize-numbers.scm (specialize-operations):
Accept any operand to logand/immediate, provided the result is a u64 in
the right range.
This commit is contained in:
Andy Wingo 2024-09-24 09:24:15 +02:00
parent 5e6288c930
commit b04071cc57

View file

@ -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))