From: Andrea Corallo Date: Sun, 15 Sep 2019 08:50:33 +0000 (+0200) Subject: fix ssa renaming X-Git-Tag: emacs-28.0.90~2727^2~1167 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c74f30c8e0f1799ebca7eb144c56506a53290243;p=emacs.git fix ssa renaming --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 08a6d59ff9c..0ad8b1a310a 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1169,13 +1169,13 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non nil." (setf (cadr insn) mvar)))) (pcase insn (`(,(pred comp-assign-op-p) ,(pred target-p) . ,_) - (new-lvalue)) - (`(phi . ,_) - (new-lvalue)) + (cl-nsubst-if (new-lvalue) #'target-p (cddr insn))) + (`(phi ,n) + (when (equal n slot-n) + (new-lvalue))) (_ (let ((mvar (aref (comp-ssa-frame comp-pass) slot-n))) - ;; Should we have to recur for nested args? - (cl-nsubstitute-if mvar #'target-p (cdr insn))))))) + (cl-nsubst-if mvar #'target-p (cdr insn))))))) (defun comp-ssa-rename-in-blocks (n) "Given slot number N rename in the blocks."