public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/98689] [11 Regression] FAIL: gcc.dg/torture/stackalign/builtin-return-1.c   -O1  execution test
Date: Fri, 16 Apr 2021 11:38:24 +0000	[thread overview]
Message-ID: <bug-98689-4-ahZfeNQx4x@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98689-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:49e651990a6966936a0273138dd56ac394e57b16

commit r11-8214-g49e651990a6966936a0273138dd56ac394e57b16
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Apr 16 12:38:02 2021 +0100

    Mark untyped calls and handle them specially [PR98689]

    This patch fixes a regression introduced by the rtl-ssa patches.
    It was seen on HPPA but it might be latent elsewhere.

    The problem is that the traditional way of expanding an untyped_call
    is to emit sequences like:

       (call (mem (symbol_ref "foo")))
       (set (reg pseudo1) (reg result1))
       ...
       (set (reg pseudon) (reg resultn))

    The ABI specifies that result1..resultn are clobbered by the call but
    nothing in the RTL indicates that result1..resultn are the results
    of the call.  Normally, using a clobbered value gives undefined results,
    but in this case the results are well-defined and matter for correctness.

    This seems like a niche case, so I think it would be better to mark
    it explicitly rather than try to detect it heuristically.

    Note that in expand_builtin_apply we already have an rtx_insn *,
    so it doesn't matter whether we call emit_call_insn or emit_insn.
    Calling emit_insn seems more natural now that the gen_* call
    has been split out.  It also matches later code in the function.

    gcc/
            PR rtl-optimization/98689
            * reg-notes.def (UNTYPED_CALL): New note.
            * combine.c (distribute_notes): Handle it.
            * emit-rtl.c (try_split): Likewise.
            * rtlanal.c (rtx_properties::try_to_add_insn): Likewise.  Assume
            that calls with the note implicitly set all return value registers.
            * builtins.c (expand_builtin_apply): Add a REG_UNTYPED_CALL
            to untyped_calls.

  parent reply	other threads:[~2021-04-16 11:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 19:25 [Bug other/98689] New: " danglin at gcc dot gnu.org
2021-01-21 15:21 ` [Bug other/98689] [11 Regression] " danglin at gcc dot gnu.org
2021-01-23 23:28 ` [Bug middle-end/98689] " danglin at gcc dot gnu.org
2021-01-25 13:27 ` rguenth at gcc dot gnu.org
2021-02-11 10:49 ` jakub at gcc dot gnu.org
2021-03-06 21:41 ` danglin at gcc dot gnu.org
2021-03-30 12:10 ` rsandifo at gcc dot gnu.org
2021-04-16 11:38 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-16 11:41 ` rsandifo 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-98689-4-ahZfeNQx4x@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).