+
+(macrolet
+ ((def (name width)
+ `(progn
+ (defknown ,name (integer (integer 0)) (unsigned-byte ,width)
+ (foldable flushable movable))
+ (define-modular-fun-optimizer ash ((integer count) :width width)
+ (when (and (<= width 32)
+ (constant-lvar-p count) ;?
+ (plusp (lvar-value count)))
+ (cut-to-width integer width)
+ ',name))
+ (setf (gethash ',name *modular-versions*) `(ash ,',width)))))
+ #!-alpha (def sb!vm::ash-left-mod32 32)
+ #!+alpha (def sb!vm::ash-left-mod64 64))