From: Andrea Corallo <akrl@sdf.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 62537@debbugs.gnu.org, Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Subject: bug#62537: Error compiling emacs master with native compilation activated
Date: Fri, 31 Mar 2023 10:26:20 +0000 [thread overview]
Message-ID: <xjfbkk9cj3n.fsf@ma.sdf.org> (raw)
In-Reply-To: <xjf7cuye50g.fsf@ma.sdf.org> (Andrea Corallo's message of "Thu, 30 Mar 2023 13:35:27 +0000")
Andrea Corallo <akrl@sdf.org> writes:
> Mattias Engdegård <mattiase@acm.org> writes:
>
>> 30 mars 2023 kl. 11.28 skrev Andrea Corallo <akrl@sdf.org>:
>>
>>> bisecting this should be due to:
>>> "
>>> 52b67740d10df8ca539fdc2c7d50283997683141
>>
>>> Generalise a LAP optimisation rule
>>
>> That change should be entirely safe. Perhaps it just somehow triggers an unexpected path in nativecomp?
>
> That's entirely possible :)
>
> Will look at and report.
>
> Andrea
I haven't had time to complete the investigation/fix but as data
point...
This is the most reduced reproducer I could produce:
;;; -*- lexical-binding: t; -*-
(defun test ()
(when (let
((val
(foo)))
(cond
((eq val 'x)
t)
((eq val 'y)
'y)))
(foo))
t)
This is the old LAP:
(byte-constant foo . 0)
(byte-call . 0)
(byte-dup)
(byte-constant #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (x 8 y 12)) . 1)
(byte-switch)
(byte-goto TAG 16 . 1)
(TAG 8 . 1)
(byte-constant t . 2)
(byte-goto TAG 17 . 2)
(TAG 12 . 1)
(byte-constant t . 2)
(byte-goto TAG 17 . 2)
(TAG 16 . 1)
(byte-constant nil . 3)
(TAG 17 . 2)
(byte-stack-set . 1)
(byte-goto-if-nil TAG 25 . 0)
(byte-constant foo . 0)
(byte-call . 0)
(byte-discard)
(TAG 25 . 0)
(byte-constant t . 2)
(byte-return . 0)
This is the new one:
(byte-constant foo . 0)
(byte-call . 0)
(byte-dup)
(byte-constant #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (x 9 y 9)) . 1)
(byte-switch)
(byte-discard)
(byte-goto TAG 13 . 0)
(TAG 9 . 1)
(byte-discard)
(byte-constant foo . 0)
(byte-call . 0)
(byte-discard)
(TAG 13 . 0)
(byte-constant t . 2)
(byte-return . 0)
At a very quick look I don't see anything wrong with it so as
anticipated most lickly is just a bug in the native compiler limplify
pass.
Best Regards
Andrea
next prev parent reply other threads:[~2023-03-31 10:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 7:18 bug#62537: Error compiling emacs master with native compilation activated Pedro Andres Aranda Gutierrez
2023-03-30 8:50 ` Eli Zaretskii
2023-03-30 9:28 ` Andrea Corallo
2023-03-30 9:59 ` Pedro Andres Aranda Gutierrez
2023-03-30 10:37 ` Mattias Engdegård
2023-03-30 13:35 ` Andrea Corallo
2023-03-31 10:26 ` Andrea Corallo [this message]
2023-03-31 15:14 ` Mattias Engdegård
2023-04-05 17:19 ` Andrea Corallo
2023-04-05 20:51 ` Mattias Engdegård
2023-04-05 21:12 ` Andrea Corallo
2023-04-05 21:46 ` Mattias Engdegård
2023-04-06 10:42 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xjfbkk9cj3n.fsf@ma.sdf.org \
--to=akrl@sdf.org \
--cc=62537@debbugs.gnu.org \
--cc=mattiase@acm.org \
--cc=paaguti@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).