public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/115452] New: ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake
@ 2024-06-12  2:54 liuhongt at gcc dot gnu.org
  2024-06-12  8:11 ` [Bug target/115452] " ubizjak at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-06-12  2:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115452
           Summary: ICE when dump stv2 for gcc.target/i386/pr70322-2.c
                    with -march=cascadelake
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liuhongt at gcc dot gnu.org
  Target Milestone: ---

gcc -m32 -march=cascadelake ./gcc/testsuite/gcc.target/i386/pr70322-2.c -mstv
-mno-bmi -S -Os -fdump-rtl-stv2-details

./gcc/testsuite/gcc.target/i386/pr70322-2.c: In function ‘foo’:
./gcc/testsuite/gcc.target/i386/pr70322-2.c:12:1: internal compiler error: RTL
check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934
   12 | }
      | ^
0x88ef75 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
        ./gcc/rtl.cc:770
0x96be78 rhs_regno(rtx_def const*)
        ./gcc/rtl.h:1934
0x96cd8d rhs_regno(rtx_def const*)
        ./genrtl.h:38
0x96cd8d convert_op
        ./gcc/config/i386/i386-features.cc:1056
0x1af7711 convert_insn
        ./gcc/config/i386/i386-features.cc:1468
0x1af9808 convert
        ./gcc/config/i386/i386-features.cc:1987
0x1af9808 convert_scalars_to_vector
        ./gcc/config/i386/i386-features.cc:2536
0x1af9808 execute
       ./gcc/config/i386/i386-features.cc:2750


------------cut from i386-features.cc:1056---------------

      if (dump_file)
        fprintf (dump_file, "  Preloading operand for insn %d into r%d\n",
                 INSN_UID (insn), REGNO (tmp));
--------------cut end-------------------------------

Looks like tmp is SUBREG.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/115452] ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake
  2024-06-12  2:54 [Bug target/115452] New: ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake liuhongt at gcc dot gnu.org
@ 2024-06-12  8:11 ` ubizjak at gmail dot com
  2024-06-13  4:55 ` cvs-commit at gcc dot gnu.org
  2024-06-13  4:55 ` liuhongt at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2024-06-12  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Hongtao Liu from comment #0)
> ------------cut from i386-features.cc:1056---------------
> 
>       if (dump_file)
>         fprintf (dump_file, "  Preloading operand for insn %d into r%d\n",
>                  INSN_UID (insn), REGNO (tmp));
> --------------cut end-------------------------------
> 
> Looks like tmp is SUBREG.

reg_or_subregno should take care for this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/115452] ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake
  2024-06-12  2:54 [Bug target/115452] New: ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake liuhongt at gcc dot gnu.org
  2024-06-12  8:11 ` [Bug target/115452] " ubizjak at gmail dot com
@ 2024-06-13  4:55 ` cvs-commit at gcc dot gnu.org
  2024-06-13  4:55 ` liuhongt at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-06-13  4:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:f8bf80a4e1682b2238baad8c44939682f96b1fe0

commit r15-1234-gf8bf80a4e1682b2238baad8c44939682f96b1fe0
Author: liuhongt <hongtao.liu@intel.com>
Date:   Thu Jun 13 09:53:58 2024 +0800

    Fix ICE due to REGNO of a SUBREG.

    Use reg_or_subregno instead.

    gcc/ChangeLog:

            PR target/115452
            * config/i386/i386-features.cc (scalar_chain::convert_op): Use
            reg_or_subregno instead of REGNO to avoid ICE.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr115452.c: New test.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug target/115452] ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake
  2024-06-12  2:54 [Bug target/115452] New: ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake liuhongt at gcc dot gnu.org
  2024-06-12  8:11 ` [Bug target/115452] " ubizjak at gmail dot com
  2024-06-13  4:55 ` cvs-commit at gcc dot gnu.org
@ 2024-06-13  4:55 ` liuhongt at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-06-13  4:55 UTC (permalink / raw)
  To: gcc-bugs

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

Hongtao Liu <liuhongt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
Fixed in GCC15.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-13  4:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-12  2:54 [Bug target/115452] New: ICE when dump stv2 for gcc.target/i386/pr70322-2.c with -march=cascadelake liuhongt at gcc dot gnu.org
2024-06-12  8:11 ` [Bug target/115452] " ubizjak at gmail dot com
2024-06-13  4:55 ` cvs-commit at gcc dot gnu.org
2024-06-13  4:55 ` liuhongt at gcc dot gnu.org

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).