X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fconstraint.lisp;h=823a16324d2edcc3d22fe133b0a18d05cad21c4c;hb=9c7b8638313069c25a9718985720d69c9f4a1cda;hp=e2be0938884ce119eebd89a76d83cb03487cb74a;hpb=2d199c38017184ff74aedef2aa9c4320d596f46e;p=sbcl.git diff --git a/src/compiler/constraint.lisp b/src/compiler/constraint.lisp index e2be093..823a163 100644 --- a/src/compiler/constraint.lisp +++ b/src/compiler/constraint.lisp @@ -110,9 +110,14 @@ ;;; Add complementary constraints to the consequent and alternative ;;; blocks of IF. We do nothing if X is NIL. -#!-sb-fluid (declaim (inline add-complement-constraints)) (defun add-complement-constraints (if fun x y not-p) - (when x + (when (and x + ;; Note: Even if we do (IF test exp exp) => (PROGN test exp) + ;; optimization, the *MAX-OPTIMIZE-ITERATIONS* cutoff means + ;; that we can't guarantee that the optimization will be + ;; done, so we still need to avoid barfing on this case. + (not (eq (if-consequent if) + (if-alternative if)))) (add-test-constraint (if-consequent if) fun x y not-p) (add-test-constraint (if-alternative if) fun x y (not not-p))) (values))