public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2022-08-25 15:39 asolokha at gmx dot com
  2022-08-26  2:08 ` [Bug target/106742] " crazylht at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2022-08-25 15:39 UTC (permalink / raw)
  To: gcc-bugs

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.

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

* [Bug target/106742] ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE in expand_vec_perm_broadcast_1, at config/i386/i386-expand.cc:21870
  2022-08-25 15:39 [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 asolokha at gmx dot com
@ 2022-08-26  2:08 ` crazylht at gmail dot com
  2022-08-26 12:41 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: crazylht at gmail dot com @ 2022-08-26  2:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
Should be caused by r13-2111-g6910cad55ffc33.

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

* [Bug target/106742] ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE in expand_vec_perm_broadcast_1, at config/i386/i386-expand.cc:21870
  2022-08-25 15:39 [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 asolokha at gmx dot com
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-08-26 12:41 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-08-26
     Ever confirmed|0                           |1
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

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

* [Bug target/106742] ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE in expand_vec_perm_broadcast_1, at config/i386/i386-expand.cc:21870
  2022-08-25 15:39 [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 asolokha at gmx dot com
  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
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-05  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kong Lingling <konglin1@gcc.gnu.org>:

https://gcc.gnu.org/g:092763fd0c069f3a7c05a65238d3815e8daab76b

commit r13-2400-g092763fd0c069f3a7c05a65238d3815e8daab76b
Author: konglin1 <lingling.kong@intel.com>
Date:   Mon Sep 5 14:38:03 2022 +0800

    x86: Handle V8BF in expand_vec_perm_broadcast_1

    gcc/ChangeLog:

            PR target/106742
            * config/i386/i386-expand.cc (ix86_expand_vector_init_duplicate):
            Handle V8BF mode.
            (expand_vec_perm_broadcast_1): Ditto.
            * config/i386/sse.md (avx512fmaskhalfmode): Add BF vector mode.
            (vec_set<mode>_0): Add @ to it.
            (@vec_set<mode>_0): Ditto.
            (vec_interleave_high<mode><mask_name>): Ditto.
            (@vec_interleave_high<mode><mask_name>): Ditto.
            (vec_interleave_low<mode><mask_name>): Ditto.
            (@vec_interleave_low<mode><mask_name>): Ditto.
            * config/i386/subst.md (SUBST_V): Add BF vector mode.

    gcc/testsuite/ChangeLog:

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

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

* [Bug target/106742] ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE in expand_vec_perm_broadcast_1, at config/i386/i386-expand.cc:21870
  2022-08-25 15:39 [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 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: lingling.kong7 at gmail dot com @ 2022-09-05  6:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from kong lingling <lingling.kong7 at gmail dot com> ---
Fixed in GCC13.

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

* [Bug target/106742] ICE in gen_lowpart_general, at rtlhooks.cc:57, or ICE in expand_vec_perm_broadcast_1, at config/i386/i386-expand.cc:21870
  2022-08-25 15:39 [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 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-09-05  6:45 ` lingling.kong7 at gmail dot com
@ 2022-10-21 16:40 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-21 16:40 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
           Keywords|ice-on-invalid-code         |ice-on-valid-code
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |13.0

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-10-21 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 15:39 [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 asolokha at gmx dot com
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

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