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/113690] [13/14 Regression] ICE: in as_a, at machmode.h:381 with -O2 -fno-dce -fno-forward-propagate -fno-split-wide-types -funroll-loops
Date: Wed, 07 Feb 2024 14:22:22 +0000	[thread overview]
Message-ID: <bug-113690-4-UiWZDHsbwW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113690-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from GCC 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:99200573096c03120c8d4514383951acecdd5ab1

commit r14-8868-g99200573096c03120c8d4514383951acecdd5ab1
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Wed Feb 7 14:21:34 2024 +0000

    PR target/113690: Remove TImode REG_EQUAL notes in STV.

    This patch fixes PR target/113690, an ICE-on-valid regression on x86_64
    that exhibits with a specific combination of command line options.  The
    cause is that x86's scalar-to-vector pass converts a chain of instructions
    from TImode to V1TImode, but fails to appropriately update or delete the
    attached REG_EQUAL note.  This implements Uros' recommendation of removing
    these notes.  For convenience, this code (re)factors the logic to convert
    a TImode constant into a V1TImode constant vector into a subroutine and
    reuses it.

    For the record, STV is actually doing something useful in this strange
    testcase,  GCC with -O2 -fno-dce -fno-forward-propagate
-fno-split-wide-types
    -funroll-loops generates:

    foo:    movl    $v, %eax
            pxor    %xmm0, %xmm0
            movaps  %xmm0, 48(%rax)
            movaps  %xmm0, (%rax)
            movaps  %xmm0, 16(%rax)
            movaps  %xmm0, 32(%rax)
            ret

    With the addition of -mno-stv (to disable the patched code) it gives:

    foo:    movl    $v, %eax
            movq    $0, 48(%rax)
            movq    $0, 56(%rax)
            movq    $0, (%rax)
            movq    $0, 8(%rax)
            movq    $0, 16(%rax)
            movq    $0, 24(%rax)
            movq    $0, 32(%rax)
            movq    $0, 40(%rax)
            ret

    2024-02-07  Roger Sayle  <roger@nextmovesoftware.com>
                Uros Bizjak  <ubizjak@gmail.com>

    gcc/ChangeLog
            PR target/113690
            * config/i386/i386-features.cc (timode_convert_cst): New helper
            function to convert a TImode CONST_SCALAR_INT_P to a V1TImode
            CONST_VECTOR.
            (timode_scalar_chain::convert_op): Use timode_convert_cst.
            (timode_scalar_chain::convert_insn): Delete REG_EQUAL notes.
            Use timode_convert_cst.

    gcc/testsuite/ChangeLog
            PR target/113690
            * gcc.target/i386/pr113690.c: New test case.

  parent reply	other threads:[~2024-02-07 14:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 20:40 [Bug rtl-optimization/113690] New: " zsojka at seznam dot cz
2024-02-01  1:02 ` [Bug rtl-optimization/113690] " pinskia at gcc dot gnu.org
2024-02-01  1:09 ` [Bug target/113690] " pinskia at gcc dot gnu.org
2024-02-01  7:45 ` rguenth at gcc dot gnu.org
2024-02-01 14:28 ` hjl.tools at gmail dot com
2024-02-01 22:21 ` roger at nextmovesoftware dot com
2024-02-07 14:22 ` cvs-commit at gcc dot gnu.org [this message]
2024-02-16  9:07 ` [Bug target/113690] [13 " roger at nextmovesoftware dot com
2024-05-08 12:23 ` rguenth at gcc dot gnu.org
2024-05-21  9:18 ` 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-113690-4-UiWZDHsbwW@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).