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/106278] [13 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: in ix86_output_ssemov, at config/i386/i386.cc:5555 since r13-1607-gc3ed9e0d6e96d869
Date: Mon, 01 Aug 2022 22:09:25 +0000	[thread overview]
Message-ID: <bug-106278-4-y0EVQ8GkTC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106278-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 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:96e5f6696a1fa90493c464884984e9f1de86d817

commit r13-1920-g96e5f6696a1fa90493c464884984e9f1de86d817
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Mon Aug 1 23:08:23 2022 +0100

    PR target/106481: Handle CONST_WIDE_INT in REG_EQUAL during STV on x86_64.

    This patch resolves PR target/106481, and is an oversight in my recent
    battles with REG_EQUAL notes during TImode STV (see PR target/106278
    https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598416.html).

    The patch above's/current behaviour is that we check that the mode of
    the REG_EQUAL note is TImode before using PUT_MODE to set it to V1TImode.
    However, the new test case reveals that this doesn't consider REG_EQUAL
    notes that are CONST_INT or CONST_WIDE_INT, i.e. that are VOIDmode,
    and so STV produces:

    (insn 85 84 86 2 (set (reg:V1TI 113)
            (reg:V1TI 84)) "pr106481.c":13:3 1766 {movv1ti_internal}
         (expr_list:REG_EQUAL (const_wide_int 0x0ffffffff00000004)
            (nil)))

    which causes problems as the const_wide_int isn't a valid immediate
    constant for V1TImode.  With this patch, we now generate the correct:

    (insn 85 84 86 2 (set (reg:V1TI 113)
            (reg:V1TI 84)) "pr106481.c":13:3 1766 {movv1ti_internal}
         (expr_list:REG_EQUAL (const_vector:V1TI [
                    (const_wide_int 0x0ffffffff00000004)
                ])
            (nil)))

    2022-08-01  Roger Sayle  <roger@nextmovesoftware.com>
                Uroš Bizjak  <ubizjak@gmail.com>

    gcc/ChangeLog
            PR target/106481
            * config/i386/i386-features.cc (timode_scalar_chain::convert_insn):
            Convert a CONST_SCALAR_INT_P in a REG_EQUAL note into a V1TImode
            CONST_VECTOR.

    gcc/testsuite/ChangeLog
            PR target/106481
            * gcc.target/i386/pr106481.c: New test case.

      parent reply	other threads:[~2022-08-01 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  7:25 [Bug target/106278] New: ICE on valid code at -Os and above on x86_64-linux-gnu: in ix86_output_ssemov, at config/i386/i386.cc:5555 zhendong.su at inf dot ethz.ch
2022-07-13  7:27 ` [Bug target/106278] [13 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: in ix86_output_ssemov, at config/i386/i386.cc:5555 since r13-1607-gc3ed9e0d6e96d869 marxin at gcc dot gnu.org
2022-07-13  8:49 ` roger at nextmovesoftware dot com
2022-07-15 13:42 ` cvs-commit at gcc dot gnu.org
2022-07-17  8:23 ` roger at nextmovesoftware dot com
2022-08-01 22:09 ` cvs-commit at gcc dot gnu.org [this message]

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-106278-4-y0EVQ8GkTC@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).