* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a
rule previously overlooked. This is usually beneficial in code size
and almost always shortens dynamic paths.
(or (memq (caar tmp) '(byte-discard byte-discardN))
;; Make sure we don't hoist a discardN-preserve-tos
;; that really should be merged or deleted instead.
- (and (eq (caar tmp) 'byte-discardN-preserve-tos)
+ (and (or (eq (caar tmp) 'byte-discardN-preserve-tos)
+ (and (eq (caar tmp) 'byte-stack-set)
+ (eql (cdar tmp) 1)))
(let ((next (cadr tmp)))
(not (or (memq (car next)
'(byte-discardN-preserve-tos