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/108657] [13 Regression] csmith: possible wrong checksum with -O3 and -ftrivial-auto-var-init=zero
Date: Thu, 16 Feb 2023 14:35:46 +0000	[thread overview]
Message-ID: <bug-108657-4-I9TxcAoLzt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108657-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #22 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:866555b170016c49beb869a78cbecdeb07c63135

commit r13-6083-g866555b170016c49beb869a78cbecdeb07c63135
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Feb 16 15:35:05 2023 +0100

    tree-ssa-dse: Fix up handling of lhs of internal calls [PR108657]

    The r13-1778 PR106378 tree-ssa-dse change didn't just add special support
    for IFN_LEN_STORE and IFN_MASK_STORE internal function calls as I believe
    was intended, but given that the function was
    if (is builtin) { ... }
    else if (lhs present and non-SSA_NAME) { ... }
    return false;
    and it added a new
    else if (is internal builtin) { ... }
    in between the two, the last if used to be done before on all stmts
    with non-SSA_NAME lhs except for calls to builtin functions, but newly
    isn't done also for calls to internal functions.  In the testcase
    the important internal function is .DEFERRED_INIT, which often has
    non-SSA_NAME lhs, and the change resulted in them no longer being DSEd,
    so a block with nothing in it left but var = .DEFERRED_INIT () and
    var = {CLOBBER} was unrolled several times.

    The following patch does the lhs handling for all stmts with non-SSA_NAME
lhs
    unless initialize_ao_ref_for_dse handled those specially already and
    returned (which is the case for various mem* builtins which don't have
    such lhs, for some cases of calloc which again is fine,and since r13-1778
    also for IFN_LEN_STORE call and some IFN_MASK_STORE calls.
    As IFN_MASK_STORE doesn't have a lhs, the break for the !may_def_ok case
    doesn't seem to change anything, and because we've handled internal fns
    that way in the past, I think it is the right thing to do that again.
    That said, if it is inappropriate for some new ifn, I guess it could
    be added to the switch and just return false; for it instead of break;.

    2023-02-16  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/108657
            * tree-ssa-dse.cc (initialize_ao_ref_for_dse): If lhs of stmt
            exists and is not a SSA_NAME, call ao_ref_init even if the stmt
            is a call to internal or builtin function.

            * gcc.dg/pr108657.c: New test.

  parent reply	other threads:[~2023-02-16 14:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-03 13:59 [Bug c/108657] New: " dcb314 at hotmail dot com
2023-02-03 16:27 ` [Bug c/108657] " dcb314 at hotmail dot com
2023-02-03 18:15 ` [Bug middle-end/108657] " pinskia at gcc dot gnu.org
2023-02-03 18:41 ` dcb314 at hotmail dot com
2023-02-03 18:47 ` pinskia at gcc dot gnu.org
2023-02-04 12:01 ` dcb314 at hotmail dot com
2023-02-04 12:17 ` dcb314 at hotmail dot com
2023-02-04 12:31 ` dcb314 at hotmail dot com
2023-02-06 13:37 ` dcb314 at hotmail dot com
2023-02-06 16:59 ` dcb314 at hotmail dot com
2023-02-06 17:32 ` dcb314 at hotmail dot com
2023-02-06 20:28 ` [Bug middle-end/108657] [13 Regression] " pinskia at gcc dot gnu.org
2023-02-07 18:01 ` mikpelinux at gmail dot com
2023-02-08  8:42 ` dcb314 at hotmail dot com
2023-02-14 14:53 ` dcb314 at hotmail dot com
2023-02-14 21:09 ` dcb314 at hotmail dot com
2023-02-15 18:22 ` jakub at gcc dot gnu.org
2023-02-15 18:29 ` jakub at gcc dot gnu.org
2023-02-15 18:43 ` jakub at gcc dot gnu.org
2023-02-15 18:48 ` pinskia at gcc dot gnu.org
2023-02-15 18:56 ` jakub at gcc dot gnu.org
2023-02-15 19:04 ` jakub at gcc dot gnu.org
2023-02-15 19:15 ` jakub at gcc dot gnu.org
2023-02-15 19:32 ` jakub at gcc dot gnu.org
2023-02-16 14:35 ` cvs-commit at gcc dot gnu.org [this message]
2023-02-27 10:17 ` rguenth 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-108657-4-I9TxcAoLzt@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).