public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e
@ 2023-12-12 20:54 mjires at suse dot cz
  2023-12-12 21:51 ` [Bug target/112990] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mjires at suse dot cz @ 2023-12-12 20:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112990
           Summary: [14 Regression][s390x] ICE in related_vector_mode, at
                    stor-layout.cc:539 since r14-3381-g27de9aa152141e
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mjires at suse dot cz
                CC: rguenther at suse dot de
  Target Milestone: ---
            Target: s390x

Compiling reduced testcase gcc.target/s390/vector/reverse-elements-6.c with
s390x cross compiler results in ICE since r14-3381-g27de9aa152141e.


$ cat reverse-elements-6.c
typedef long __attribute__((vector_size(16))) V2DI;
V2DI v2di_x;
void v2di() {
  V2DI y, z;
  for (int i = 0; i < 2; ++i)
    z[i] = y[1];
  v2di_x = z;
}


$ s390x-linux-gnu-gcc reverse-elements-6.c -O1
during RTL pass: expand
reverse-elements-6.c: In function ‘v2di’:
reverse-elements-6.c:7:10: internal compiler error: in related_vector_mode, at
stor-layout.cc:539
    7 |   v2di_x = z;
      |   ~~~~~~~^~~
0x15dd230 related_vector_mode(machine_mode, scalar_mode, poly_int<1u, unsigned
long>)
        /home/mjires/git/GCC/master/gcc/stor-layout.cc:539
0x1428a35 qimode_for_vec_perm(machine_mode)
        /home/mjires/git/GCC/master/gcc/optabs-query.cc:358
0x141db61 expand_vec_perm_const(machine_mode, rtx_def*, rtx_def*,
int_vector_builder<poly_int<1u, long> > const&, machine_mode, rtx_def*)
        /home/mjires/git/GCC/master/gcc/optabs.cc:6445
0x106f66f expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/mjires/git/GCC/master/gcc/expr.cc:10844
0x1070df4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:11216
0x1068fa1 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:9407
0x105debf store_expr(tree_node*, rtx_def*, int, bool, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:6709
0x105c5ff expand_assignment(tree_node*, tree_node*, bool)
        /home/mjires/git/GCC/master/gcc/expr.cc:6430
0xec1ec7 expand_gimple_stmt_1
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:3960
0xec22b5 expand_gimple_stmt
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:4058
0xeca6e0 expand_gimple_basic_block
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:6114
0xecca96 execute
        /home/mjires/git/GCC/master/gcc/cfgexpand.cc:6849
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


$ s390x-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=s390x-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/s390x-linux-gnu/14.0.0/lto-wrapper
Target: s390x-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=s390x-linux-gnu --disable-bootstrap
--enable-languages=c,c++ --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --target=s390x-linux-gnu --disable-bootstrap
--enable-languages=c,c++ --disable-multilib --disable-libsanitizer
--enable-checking
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231212 (experimental) (GCC)

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

* [Bug target/112990] [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e
  2023-12-12 20:54 [Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e mjires at suse dot cz
@ 2023-12-12 21:51 ` pinskia at gcc dot gnu.org
  2023-12-13  8:40 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-12 21:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

* [Bug target/112990] [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e
  2023-12-12 20:54 [Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e mjires at suse dot cz
  2023-12-12 21:51 ` [Bug target/112990] " pinskia at gcc dot gnu.org
@ 2023-12-13  8:40 ` rguenth at gcc dot gnu.org
  2023-12-13  8:43 ` cvs-commit at gcc dot gnu.org
  2023-12-13 11:50 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-13  8:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Last reconfirmed|                            |2023-12-13
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we're getting TImode vectors here for some reason (uninit?).
The VEC_PERM is

    def_stmt z_14 = VEC_PERM_EXPR <y_7(D), y_7(D), { 1, 1 }>;

with

 <ssa_name 0x7ffff7016c18
    type <vector_type 0x7ffff7148bd0 V2DI
        type <integer_type 0x7ffff701f738 long int DI
            size <integer_cst 0x7ffff700bab0 constant 64>
            unit-size <integer_cst 0x7ffff700bac8 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set 1 canonical-type
0x7ffff701f738 precision:64 min <integer_cst 0x7ffff700bd38
-9223372036854775808> max <integer_cst 0x7ffff700bd50 9223372036854775807>
            pointer_to_this <pointer_type 0x7ffff702d7e0>>
        sizes-gimplified TI
        size <integer_cst 0x7ffff700baf8 constant 128>
        unit-size <integer_cst 0x7ffff700bb10 constant 16>
        align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff7148b28 nunits:2
        pointer_to_this <pointer_type 0x7ffff71bd540>>
    visited var <var_decl 0x7ffff7017480 y>
    def_stmt GIMPLE_NOP
    version:7>

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

* [Bug target/112990] [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e
  2023-12-12 20:54 [Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e mjires at suse dot cz
  2023-12-12 21:51 ` [Bug target/112990] " pinskia at gcc dot gnu.org
  2023-12-13  8:40 ` rguenth at gcc dot gnu.org
@ 2023-12-13  8:43 ` cvs-commit at gcc dot gnu.org
  2023-12-13 11:50 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-13  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r14-6482-gb9baead90d74e9211fc94d655ecd5d3af3858158
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Dec 13 09:38:59 2023 +0100

    tree-optimization/112990 - unsupported VEC_PERM from match pattern

    The following avoids creating an unsupported VEC_PERM after vector
    lowering from the pattern merging a bit-insert from a bit-field-ref
    to a VEC_PERM.  For the already existing s390 testcase we get
    TImode vectors which later ICE during attempted expansion of
    a vec_perm_const.

            PR tree-optimization/112990
            * match.pd (bit_insert @0 (BIT_FIELD_REF @1 ..) ..):
            Restrict to vector modes after lowering.

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

* [Bug target/112990] [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e
  2023-12-12 20:54 [Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e mjires at suse dot cz
                   ` (2 preceding siblings ...)
  2023-12-13  8:43 ` cvs-commit at gcc dot gnu.org
@ 2023-12-13 11:50 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-12-13 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2023-12-13 11:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-12 20:54 [Bug target/112990] New: [14 Regression][s390x] ICE in related_vector_mode, at stor-layout.cc:539 since r14-3381-g27de9aa152141e mjires at suse dot cz
2023-12-12 21:51 ` [Bug target/112990] " pinskia at gcc dot gnu.org
2023-12-13  8:40 ` rguenth at gcc dot gnu.org
2023-12-13  8:43 ` cvs-commit at gcc dot gnu.org
2023-12-13 11:50 ` rguenth 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).