public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amonakov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/108117] Wrong instruction scheduling on value coming from abnormal SSA
Date: Thu, 15 Dec 2022 08:30:49 +0000	[thread overview]
Message-ID: <bug-108117-4-jkmk6PIpeA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108117-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108117

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
On further thought, this is really an invalid transform, because the value
becomes "clobbered" only if it was changed between setjmp and longjmp:

(C11 7.13.2.1 "The longjmp function")
>  All accessible objects have values, and all other components of the abstract
> machine have state, as of the time the longjmp function was called, except that
> the values of objects of automatic storage duration that are local to the
> function containing the invocation of the corresponding setjmp macro that
> do not have volatile-qualified type and have been changed between the setjmp
> invocation and longjmp call are indeterminate.

In the testcase, the assignment 'vb = 1' did not happen in the abstract
machine.

Moving back to UNCONFIRMED, both because the transform is invalid, and because
lifting assignments to pseudos across calls in sched1 seems useless if not
harmful to performance and code size.

(that said, the -Wclobbered diagnostic still points to a potential issue, so it
shouldn't be ignored)

  parent reply	other threads:[~2022-12-15  8:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  5:36 [Bug rtl-optimization/108117] New: " fxue at os dot amperecomputing.com
2022-12-15  5:42 ` [Bug rtl-optimization/108117] " pinskia at gcc dot gnu.org
2022-12-15  5:44 ` pinskia at gcc dot gnu.org
2022-12-15  5:46 ` pinskia at gcc dot gnu.org
2022-12-15  7:15 ` amonakov at gcc dot gnu.org
2022-12-15  8:30 ` amonakov at gcc dot gnu.org [this message]
2022-12-15  8:54 ` fxue at os dot amperecomputing.com
2022-12-15  9:01 ` pinskia at gcc dot gnu.org
2022-12-15 11:38 ` fxue at os dot amperecomputing.com
2022-12-15 12:44 ` amonakov at gcc dot gnu.org
2022-12-15 18:04 ` pinskia at gcc dot gnu.org
2022-12-15 18:06 ` pinskia at gcc dot gnu.org
2022-12-15 18:17 ` amonakov at gcc dot gnu.org
2022-12-15 18:19 ` pinskia at gcc dot gnu.org
2022-12-15 18:26 ` amonakov at gcc dot gnu.org
2022-12-15 18:33 ` amonakov at gcc dot gnu.org
2022-12-23  7:37 ` amonakov at gcc dot gnu.org
2023-01-13 18:33 ` cvs-commit at gcc dot gnu.org

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108117-4-jkmk6PIpeA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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.
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).