From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 46540@debbugs.gnu.org
Cc: qythium@gmail.com
Subject: bug#46540: 28.0.50; Native-comp optimization bug
Date: Tue, 16 Feb 2021 21:43:29 +0000 [thread overview]
Message-ID: <xjfzh03r8n2.fsf@sdf.org> (raw)
In-Reply-To: <xjfv9atrt49.fsf@sdf.org> (Andrea Corallo via's message of "Mon, 15 Feb 2021 20:08:54 +0000")
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> Yu Han Quek <qythium@gmail.com> writes:
>
>> The following function gives an incorrect result when compiled natively
>> with comp-speed >= 2.
>>
>> ;; -*- lexical-binding: t; -*-
>>
>> (defun native-comp-bug (body)
>> (let ((x (car body))
>> (y (cadr body)))
>> (unless (and
>> (natnump x)
>> (natnump y)
>> (<= x y))
>> (error ""))
>> x))
>
> Cool thanks for the reduced reproducer!
>
> I'll have a in the coming days.
>
> Andrea
Ok here a slightly simplified reproducer:
;; -*- lexical-binding: t; -*-
(defun native-comp-bug (x y)
(if (and (natnump x)
(natnump y)
(<= x y))
x
(error "")))
The following constrain insn clearly resolves in the wrong way:
(assume #(mvar 79140560 0 (integer 0 0)) (<= #(mvar 79118120 0 (integer 0 *)) #(mvar 79118988 3 (integer 0 *))))
Will come-up with a fix.
Andrea
next prev parent reply other threads:[~2021-02-16 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 19:19 bug#46540: 28.0.50; Native-comp optimization bug Yu Han Quek
2021-02-15 20:08 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-16 21:43 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-02-17 7:50 ` Pip Cet
2021-02-17 21:11 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <CAGCUw0iUhX4xJK=2LYYVDECV7qo7RtS_Z2JewyFLu3dLXD_tYg@mail.gmail.com>
2021-02-18 8:01 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=xjfzh03r8n2.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=46540@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=qythium@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).