public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106742] New: ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE in expand_vec_perm_broadcast_1, at config/i386/i386-expand.cc:21870
Date: Thu, 25 Aug 2022 15:39:40 +0000	[thread overview]
Message-ID: <bug-106742-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 106742
           Summary: ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE
                    in expand_vec_perm_broadcast_1, at
                    config/i386/i386-expand.cc:21870
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-unknown-linux-gnu

1. gcc 13.0.0 20220821 snapshot (g:d6a39c25c05c6ed5df8ce49eda719d17e40e29bb)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.target/i386/vect-bfloat16-2a.c, w/ -O1:

typedef __bf16 v8bf __attribute__ ((__vector_size__ (16)));

v8bf
vec_init_dup_v8bf (__bf16 a1)
{
  return __extension__ (v8bf) { a1, a1, a1, a1, a1, a1, a1, a1 };
}

% x86_64-unknown-linux-gnu-gcc-13.0.0 -O1 -c miuyjavi.c
during RTL pass: expand
miuyjavi.c: In function 'vec_init_dup_v8bf':
miuyjavi.c:6:10: internal compiler error: in gen_lowpart_general, at
rtlhooks.cc:57
    6 |   return __extension__ (v8bf) { a1, a1, a1, a1, a1, a1, a1, a1 };
      |          ^~~~~~~~~~~~~
0x72fbae gen_lowpart_general(machine_mode, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/rtlhooks.cc:57
0x136df8b ix86_expand_vector_init_duplicate(bool, machine_mode, rtx_def*,
rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/i386-expand.cc:15044
0x1371b6b ix86_expand_vector_init(bool, rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/i386-expand.cc:16090
0x1a3c5ad ???
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/sse.md:26600
0xb347a8 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/recog.h:407
0xb347a8 store_constructor(tree_node*, rtx_def*, int, poly_int<1u, long>, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:7407
0xb3760d expand_constructor
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:8745
0xb23daa expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:10990
0xb24d66 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:10629
0x9f0bac expand_expr
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.h:310
0x9f0bac expand_return
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:3809
0x9f0bac expand_gimple_stmt_1
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:3918
0x9f0bac expand_gimple_stmt
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:4044
0x9f67b7 expand_gimple_basic_block
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:6096
0x9f8357 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:6822

2. W/ -O0, it yields the following instead:

% x86_64-unknown-linux-gnu-gcc-13.0.0 -O0 -c miuyjavi.c
during RTL pass: expand
miuyjavi.c: In function 'vec_init_dup_v8bf':
miuyjavi.c:6:10: internal compiler error: in expand_vec_perm_broadcast_1, at
config/i386/i386-expand.cc:21870
    6 |   return __extension__ (v8bf) { a1, a1, a1, a1, a1, a1, a1, a1 };
      |          ^~~~~~~~~~~~~
0x7d0713 expand_vec_perm_broadcast_1
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/i386-expand.cc:21870
0x136dd01 ix86_expand_vector_init_duplicate(bool, machine_mode, rtx_def*,
rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/i386-expand.cc:15055
0x1371b6b ix86_expand_vector_init(bool, rtx_def*, rtx_def*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/i386-expand.cc:16090
0x1a3c5ad ???
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/config/i386/sse.md:26600
0xb347a8 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/recog.h:407
0xb347a8 store_constructor(tree_node*, rtx_def*, int, poly_int<1u, long>, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:7407
0xb3760d expand_constructor
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:8745
0xb23daa expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:10990
0xb30bdd store_expr(tree_node*, rtx_def*, int, bool, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:6155
0xb32433 expand_assignment(tree_node*, tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/expr.cc:5876
0x9efdac expand_gimple_stmt_1
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:3946
0x9efdac expand_gimple_stmt
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:4044
0x9f67b7 expand_gimple_basic_block
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:6096
0x9f8357 execute
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220821/work/gcc-13-20220821/gcc/cfgexpand.cc:6822

Note the command line lacks -mavx512fp16 in both cases.

             reply	other threads:[~2022-08-25 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 15:39 asolokha at gmx dot com [this message]
2022-08-26  2:08 ` [Bug target/106742] " crazylht at gmail dot com
2022-08-26 12:41 ` marxin at gcc dot gnu.org
2022-09-05  6:40 ` cvs-commit at gcc dot gnu.org
2022-09-05  6:45 ` lingling.kong7 at gmail dot com
2022-10-21 16:40 ` pinskia 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-106742-4@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).