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 target/106303] [13 Regression] ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 since r13-1607-gc3ed9e0d6e96d869
Date: Sun, 24 Jul 2022 11:24:24 +0000	[thread overview]
Message-ID: <bug-106303-4-jo7ZH15z3E@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106303-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:76d6224b944e1a66bfb1195fb7d35d9726f1aed8

commit r13-1811-g76d6224b944e1a66bfb1195fb7d35d9726f1aed8
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Sun Jul 24 12:22:22 2022 +0100

    PR target/106303: Fix TImode STV related failures on x86.

    This patch resolves PR target/106303 (and the related PRs 106347,
    106404, 106407) which are ICEs caused by my improvements to x86_64's
    128-bit TImode to V1TImode Scalar to Vector (STV) pass.  My apologies
    for the breakage.  The issue is that data flow analysis is used to
    partition usage of each TImode pseudo into "chains", where each
    chain is analyzed and if suitable converted to vector operations.
    The problems appears when some chains for a pseudo are converted,
    and others aren't as RTL sharing can result in some mode changes
    leaking into other instructions that aren't/shouldn't/can't be
    converted, which eventually leads to an ICE for mismatched modes.

    My first approach to a fix was to unify more of the STV infrastructure,
    reasoning that if TImode STV was exhibiting these problems, but DImode
    and SImode STV weren't, the issue was likely to be caused/resolved by
    these remaining differences.  This appeared to fix some but not all of
    the reported PRs.  A better solution was then proposed by H.J. Lu in
    Bugzilla, that we need to iterate the removal of candidates in the
    function timode_remove_non_convertible_regs until there are no further
    changes.  As each chain is removed from consideration, it in turn may
    affect whether other insns/chains can safely be converted.

    2022-07-24  Roger Sayle  <roger@nextmovesoftware.com>
                H.J. Lu  <hjl.tools@gmail.com>

    gcc/ChangeLog
            PR target/106303
            PR target/106347
            * config/i386/i386-features.cc (make_vector_copies): Move from
            general_scalar_chain to scalar_chain.
            (convert_reg): Likewise.
            (convert_insn_common): New scalar_chain method split out from
            general_scalar_chain convert_insn.
            (convert_registers): Move from general_scalar_chain to
            scalar_chain.
            (scalar_chain::convert): Call convert_insn_common before calling
            convert_insn.
            (timode_remove_non_convertible_regs): Iterate until there are
            no further changes to the candidates.
            * config/i386/i386-features.h (scalar_chain::hash_map): Move
            from general_scalar_chain.
            (scalar_chain::convert_reg): Likewise.
            (scalar_chain::convert_insn_common): New shared method.
            (scalar_chain::make_vector_copies): Move from general_scalar_chain.
            (scalar_chain::convert_registers): Likewise.  No longer virtual.
            (general_scalar_chain::hash_map): Delete.  Moved to scalar_chain.
            (general_scalar_chain::convert_reg): Likewise.
            (general_scalar_chain::make_vector_copies): Likewise.
            (general_scalar_chain::convert_registers): Delete virtual method.
            (timode_scalar_chain::convert_registers): Likewise.

    gcc/testsuite/ChangeLog
            PR target/106303
            PR target/106347
            * gcc.target/i386/pr106303.c: New test case.
            * gcc.target/i386/pr106347.c: New test case.

  parent reply	other threads:[~2022-07-24 11:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 16:34 [Bug rtl-optimization/106303] New: ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 zhendong.su at inf dot ethz.ch
2022-07-14 16:42 ` [Bug target/106303] [13 Regression] " pinskia at gcc dot gnu.org
2022-07-15  7:43 ` [Bug target/106303] [13 Regression] ICE on valid code at -O3 with -fno-inline-small-functions on x86_64-linux-gnu: in extract_insn, at recog.cc:2791 since r13-1607-gc3ed9e0d6e96d869 marxin at gcc dot gnu.org
2022-07-15 14:47 ` roger at nextmovesoftware dot com
2022-07-15 15:20 ` roger at nextmovesoftware dot com
2022-07-17 21:49 ` zhendong.su at inf dot ethz.ch
2022-07-20 16:31 ` roger at nextmovesoftware dot com
2022-07-20 17:41 ` hjl.tools at gmail dot com
2022-07-20 17:44 ` hjl.tools at gmail dot com
2022-07-22  8:23 ` roger at nextmovesoftware dot com
2022-07-22 13:27 ` roger at nextmovesoftware dot com
2022-07-24 11:24 ` cvs-commit at gcc dot gnu.org [this message]
2022-07-25 16:58 ` roger at nextmovesoftware dot com

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-106303-4-jo7ZH15z3E@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).