+ (replace (make-array (length x) :element-type 'character) x)))
+ ;; Handle specialized element types.
+ ((csubtypep tspec (specifier-type '(simple-array * (*))))
+ (dolist (etype sb!kernel::*specialized-array-element-types*
+ (give-up-ir1-transform))
+ (when etype
+ (let ((spec `(simple-array ,etype (*))))
+ (when (and (csubtypep tspec (specifier-type spec))
+ ;; Can we avoid checking for dimension issues like (COERCE FOO
+ ;; '(SIMPLE-VECTOR 5)) returning a vector of length 6?
+ (or (policy node (< safety 3)) ; no need in unsafe code
+ (and (array-type-p tspec) ; no need when no dimensions
+ (equal (array-type-dimensions tspec) '(*)))))
+ (return
+ `(if (typep x ',spec)
+ x
+ (replace (make-array (length x) :element-type ',etype) x))))
+ (give-up-ir1-transform)))))