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 tree-optimization/106099] [13 Regression] ICE in execute_todo, at passes.cc:2134 since r13-1204-gd68d366425369649
Date: Fri, 26 Aug 2022 07:29:51 +0000	[thread overview]
Message-ID: <bug-106099-4-ddOJAV86Wn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106099-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 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:530dc5aaaeb67c223fd0e3986d635408dcea4343

commit r13-2213-g530dc5aaaeb67c223fd0e3986d635408dcea4343
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Aug 26 09:28:48 2022 +0200

    internal-fn, tree-cfg: Fix .TRAP handling and another __builtin_trap vops
issue [PR106099]

    This patch fixes 2 __builtin_unreachable/__builtin_trap related issues.
    One (first hunk) is that CDDCE happily removes calls to .TRAP ()
    internal-fn as useless.  The problem is that the internal-fn is
    ECF_CONST | ECF_NORETURN, doesn't have lhs and so DCE thinks it doesn't
    have side-effects and removes it.  __builtin_unreachable which has
    the same ECF_* flags works fine, as since PR44485 we implicitly add
    ECF_LOOPING_CONST_OR_PURE to ECF_CONST | ECF_NORETURN builtins, but
    do it in flags_from_decl_or_type which isn't called for internal-fns.
    As IFN_TRAP is the only ifn with such flags, it seems easier to
    add it explicitly.

    The other issue (which on the testcase can be seen only with the
    first bug unfixed) is that execute_fixup_cfg can add a __builtin_trap
    which needs vops, but nothing adds it and it can appear in many passes
    which don't have corresponding TODO_update_ssa_only_virtuals etc.
    Fixed similarly as last time but emitting ifn there instead.

    2022-08-26  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/106099
            * internal-fn.def (TRAP): Add ECF_LOOPING_CONST_OR_PURE flag.
            * tree-cfg.cc (execute_fixup_cfg): Add IFN_TRAP instead of
            __builtin_trap to avoid the need of vops.

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

  parent reply	other threads:[~2022-08-26  7:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27  6:52 [Bug tree-optimization/106099] New: ICE in execute_todo, at passes.cc:2134 asolokha at gmx dot com
2022-06-27  9:04 ` [Bug tree-optimization/106099] " zsojka at seznam dot cz
2022-06-27  9:07 ` [Bug tree-optimization/106099] [13 Regression] ICE in execute_todo, at passes.cc:2134 since r13-1204-gd68d366425369649 marxin at gcc dot gnu.org
2022-06-27  9:18 ` pinskia at gcc dot gnu.org
2022-06-27 10:48 ` rguenth at gcc dot gnu.org
2022-07-04 10:10 ` marxin at gcc dot gnu.org
2022-07-04 10:12 ` marxin at gcc dot gnu.org
2022-07-04 11:35 ` jakub at gcc dot gnu.org
2022-07-04 11:38 ` jakub at gcc dot gnu.org
2022-07-26 10:25 ` jakub at gcc dot gnu.org
2022-07-28 10:43 ` cvs-commit at gcc dot gnu.org
2022-07-30  8:22 ` zsojka at seznam dot cz
2022-08-26  7:29 ` cvs-commit at gcc dot gnu.org [this message]
2022-10-18 13:02 ` jakub at gcc dot gnu.org
2023-01-03 11:23 ` jakub 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-106099-4-ddOJAV86Wn@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).