X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fir1final.lisp;h=7fa816eb6827c32c4c59b9df2ae6a09911983f76;hb=ec066d84dd46611428943d152749b3891a3f4b7c;hp=c78d83a49fba024337960adc6d457806c4df0d6d;hpb=61c18727668ff0c3263a3d363e609d4522d545cc;p=sbcl.git diff --git a/src/compiler/ir1final.lisp b/src/compiler/ir1final.lisp index c78d83a..7fa816e 100644 --- a/src/compiler/ir1final.lisp +++ b/src/compiler/ir1final.lisp @@ -20,7 +20,7 @@ (defun note-failed-optimization (node failures) (declare (type combination node) (list failures)) (unless (or (node-deleted node) - (not (fun-info-p (combination-kind node)))) + (not (eq :known (combination-kind node)))) (let ((*compiler-error-context* node)) (dolist (failure failures) (let ((what (cdr failure)) @@ -123,7 +123,14 @@ (cond ((and (cast-p dest) (not (cast-type-check dest)) (immediately-used-p lvar node)) - (derive-node-type node (cast-asserted-type dest))) + (when (values-types-equal-or-intersect + (node-derived-type node) + (cast-asserted-type dest)) + ;; FIXME: We do not perform pathwise CAST->type-error + ;; conversion, and type errors can later cause + ;; backend failures. On the other hand, this version + ;; produces less efficient code. + (derive-node-type node (cast-asserted-type dest)))) ((and (cast-p node) (eq (cast-type-check node) :external)) (aver (basic-combination-p dest))