public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106914] New: [13 Regression] ICE in operator[], at vec.h:889
@ 2022-09-12 17:26 gscfq@t-online.de
  2022-09-12 19:43 ` [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2022-09-12 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106914
           Summary: [13 Regression] ICE in operator[], at vec.h:889
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20220828 and 20220904, at -O2+,
with file gcc.target/aarch64/sve/mask_load_slp_1.c :
(-mavx512vl or option -mavx2 etc.)


$ gcc-13-20220911 -c mask_load_slp_1.c -O2 -mavx512vl -fprofile-generate
during GIMPLE pass: vect
mask_load_slp_1.c: In function 'mask_slp_int64_t_8_2':
mask_load_slp_1.c:34:1: internal compiler error: in operator[], at vec.h:889
   34 | mask_slp_##TYPE_COND##_8_##ALT_VAL (int *restrict x, int *restrict y,  
\
      | ^~~~~~~~~
mask_load_slp_1.c:81:1: note: in expansion of macro 'MASK_SLP_8'
   81 | MASK_SLP_8(int64_t, 2)
      | ^~~~~~~~~~
0x11cce67 vec<unsigned int, va_heap, vl_embed>::operator[](unsigned int)
        ../../gcc/vec.h:889
0x11cce67 vec<unsigned int, va_heap, vl_ptr>::operator[](unsigned int)
        ../../gcc/vec.h:1498
0x11cce67 vect_transform_slp_perm_load_1
        ../../gcc/tree-vect-slp.cc:8144
0x11d1eb2 vect_optimize_slp_pass::internal_node_cost(_slp_tree*, int, unsigned
int)
        ../../gcc/tree-vect-slp.cc:4508
0x11d2cc1 vect_optimize_slp_pass::forward_pass()
        ../../gcc/tree-vect-slp.cc:4999
0x11e261c vect_optimize_slp_pass::run()
        ../../gcc/tree-vect-slp.cc:5548
0x11e26f7 vect_optimize_slp(vec_info*)
        ../../gcc/tree-vect-slp.cc:5568
0x11b4840 vect_analyze_loop_2
        ../../gcc/tree-vect-loop.cc:2477
0x11b558b vect_analyze_loop_1
        ../../gcc/tree-vect-loop.cc:2980
0x11b5d4f vect_analyze_loop(loop*, vec_info_shared*)
        ../../gcc/tree-vect-loop.cc:3134
0x11f8177 try_vectorize_loop_1
        ../../gcc/tree-vectorizer.cc:1067
0x11f8177 try_vectorize_loop
        ../../gcc/tree-vectorizer.cc:1185
0x11f8a94 execute
        ../../gcc/tree-vectorizer.cc:1299

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

* [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4
  2022-09-12 17:26 [Bug c/106914] New: [13 Regression] ICE in operator[], at vec.h:889 gscfq@t-online.de
@ 2022-09-12 19:43 ` marxin at gcc dot gnu.org
  2022-09-13  6:48 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-09-12 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |richard.sandiford at arm dot com
            Summary|[13 Regression] ICE in      |[13 Regression] ICE in
                   |operator[], at vec.h:889    |operator[], at vec.h:889
                   |                            |since
                   |                            |r13-2288-g61c4c989034548f4
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-09-12
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced to:

$ cat mask.i
int *mask_slp_int64_t_8_2_x, *mask_slp_int64_t_8_2_y, *mask_slp_int64_t_8_2_z;

void
__attribute__mask_slp_int64_t_8_2() {
  for (int i; i; i += 8) {
    mask_slp_int64_t_8_2_x[i + 6] =
        mask_slp_int64_t_8_2_y[i + 6] ? mask_slp_int64_t_8_2_z[i] : 1;
    mask_slp_int64_t_8_2_x[i + 7] =
        mask_slp_int64_t_8_2_y[i + 7] ? mask_slp_int64_t_8_2_z[i + 7] : 2;
  }
}

$ gcc mask.i -c -O2 -mavx512vl -fprofile-generate
during GIMPLE pass: vect
mask.i: In function ‘__attribute__mask_slp_int64_t_8_2’:
mask.i:4:1: internal compiler error: in operator[], at vec.h:889
    4 | __attribute__mask_slp_int64_t_8_2() {
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0x7fafce vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
        /home/marxin/Programming/gcc/gcc/vec.h:889
0x7fbab5 vec<unsigned int, va_heap, vl_embed>::operator[](unsigned int)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:8144
0x7fbab5 vec<unsigned int, va_heap, vl_ptr>::operator[](unsigned int)
        /home/marxin/Programming/gcc/gcc/vec.h:1498
0x7fbab5 vect_transform_slp_perm_load_1
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:8144
0x121ba09 vect_optimize_slp_pass::internal_node_cost(_slp_tree*, int, unsigned
int)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:4508
0x121c811 vect_optimize_slp_pass::forward_pass()
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:4998
0x122af4c vect_optimize_slp_pass::run()
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:5548
0x122b013 vect_optimize_slp(vec_info*)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:5568
0x122b013 vect_optimize_slp(vec_info*)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.cc:5564
0x1203fde vect_analyze_loop_2
        /home/marxin/Programming/gcc/gcc/tree-vect-loop.cc:2477
0x1204e4f vect_analyze_loop_1
        /home/marxin/Programming/gcc/gcc/tree-vect-loop.cc:2978
0x1205691 vect_analyze_loop(loop*, vec_info_shared*)
        /home/marxin/Programming/gcc/gcc/tree-vect-loop.cc:3132
0x1240d3c try_vectorize_loop_1
        /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1067
0x1240d3c try_vectorize_loop
        /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1183
0x12412e4 execute
        /home/marxin/Programming/gcc/gcc/tree-vectorizer.cc:1299
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.

Started with r13-2288-g61c4c989034548f4.

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

* [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4
  2022-09-12 17:26 [Bug c/106914] New: [13 Regression] ICE in operator[], at vec.h:889 gscfq@t-online.de
  2022-09-12 19:43 ` [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
@ 2022-09-13  6:48 ` rguenth at gcc dot gnu.org
  2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
  2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-09-13  6:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
           Priority|P3                          |P1

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

* [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4
  2022-09-12 17:26 [Bug c/106914] New: [13 Regression] ICE in operator[], at vec.h:889 gscfq@t-online.de
  2022-09-12 19:43 ` [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
  2022-09-13  6:48 ` rguenth at gcc dot gnu.org
@ 2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
  2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2022-09-14 12:24 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
                 CC|                            |rsandifo at gcc dot gnu.org
             Status|NEW                         |RESOLVED

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Dup of PR106794.  I'll add this testcase to the patch.

*** This bug has been marked as a duplicate of bug 106794 ***

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

* [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4
  2022-09-12 17:26 [Bug c/106914] New: [13 Regression] ICE in operator[], at vec.h:889 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
@ 2022-09-20 14:28 ` cvs-commit at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-20 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:1005c89431cc78a68762643e1bc7249c3959927e

commit r13-2738-g1005c89431cc78a68762643e1bc7249c3959927e
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Tue Sep 20 15:27:47 2022 +0100

    vect: Fix SLP layout handling of masked loads [PR106794]

    PR106794 shows that I'd forgotten about masked loads when
    doing the SLP layout changes.  These loads can't currently
    be permuted independently of their mask input, so during
    construction they never get a load permutation.

    (If we did support permuting masked loads in future, the mask
    would need to be in the right order for the load, rather than in
    the order implied by the result of the permutation.  Since masked
    loads can't be partly or fully scalarised in the way that normal
    permuted loads can be, there's probably no benefit to fusing the
    permutation and the load.  Permutation after the fact is probably
    good enough.)

    gcc/
            PR tree-optimization/106794
            PR tree-optimization/106914
            * tree-vect-slp.cc (vect_optimize_slp_pass::internal_node_cost):
            Only consider loads that already have a permutation.
            (vect_optimize_slp_pass::start_choosing_layouts): Assert that
            loads with permutations are leaf nodes.  Prevent any kind of
grouped
            access from changing layout if it doesn't have a load permutation.

    gcc/testsuite/
            * gcc.dg/vect/pr106914.c: New test.
            * g++.dg/vect/pr106794.cc: Likewise.

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

end of thread, other threads:[~2022-09-20 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-12 17:26 [Bug c/106914] New: [13 Regression] ICE in operator[], at vec.h:889 gscfq@t-online.de
2022-09-12 19:43 ` [Bug tree-optimization/106914] [13 Regression] ICE in operator[], at vec.h:889 since r13-2288-g61c4c989034548f4 marxin at gcc dot gnu.org
2022-09-13  6:48 ` rguenth at gcc dot gnu.org
2022-09-14 12:24 ` rsandifo at gcc dot gnu.org
2022-09-20 14:28 ` cvs-commit 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).