public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476
@ 2021-11-30 11:23 dcb314 at hotmail dot com
  2021-11-30 11:27 ` [Bug c++/103494] " dcb314 at hotmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2021-11-30 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103494
           Summary: ice in vect_get_vec_defs_for_operand, at
                    tree-vect-stmts.c:1476
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 51906
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51906&action=edit
gzipped C++ source code

For the attached C++ code, with compiler flag -O3, does this:

/home/dcb35/rpmbuild/BUILD/libvdpau-va-gl-0.4.2/src/api-output-surface.cc:448:1:
internal compiler error: in vect_get_vec_defs_for_operand, at
tree-vect-stmts.c:1476
  448 | PutBitsIndexedImpl(VdpOutputSurface surface_id, VdpIndexedFormat
source_indexed_format,
      | ^~~~~~~~~~~~~~~~~~
0x1ff5137 vect_get_vec_defs_for_operand(vec_info*, _stmt_vec_info*, unsigned
int, tree_node*, vec<tree_node*, va_heap, vl_ptr>*, tree_node*)
        ../../trunk.git/gcc/tree-vect-stmts.c:1476
0x2014db1 vect_get_gather_scatter_ops(_loop_vec_info*, loop*, _stmt_vec_info*,
_slp_tree*, unsigned int, gather_scatter_info*, tree_node**, vec<tree_node*,
va_heap, vl_ptr>*)
        ../../trunk.git/gcc/tree-vect-stmts.c:2981

The bug first seems to occur sometime between git hash 5e5f880d0452ef2c
and 8af3f53d325fe4a6, a distance of 43 commits.

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

* [Bug c++/103494] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
@ 2021-11-30 11:27 ` dcb314 at hotmail dot com
  2021-11-30 11:47 ` [Bug tree-optimization/103494] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2021-11-30 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
I have a cvise reduction running right now. The code is
C++, so it will take some time.

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
  2021-11-30 11:27 ` [Bug c++/103494] " dcb314 at hotmail dot com
@ 2021-11-30 11:47 ` pinskia at gcc dot gnu.org
  2021-11-30 12:39 ` dcb314 at hotmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-30 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |tree-optimization
            Summary|ice in                      |[12 Regression] ice in
                   |vect_get_vec_defs_for_opera |vect_get_vec_defs_for_opera
                   |nd, at                      |nd, at
                   |tree-vect-stmts.c:1476      |tree-vect-stmts.c:1476
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |12.0

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
  2021-11-30 11:27 ` [Bug c++/103494] " dcb314 at hotmail dot com
  2021-11-30 11:47 ` [Bug tree-optimization/103494] [12 Regression] " pinskia at gcc dot gnu.org
@ 2021-11-30 12:39 ` dcb314 at hotmail dot com
  2021-11-30 13:38 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dcb314 at hotmail dot com @ 2021-11-30 12:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
$ more bug777.cc
void glFinish();
struct _Vector_base {
  struct {
    unsigned _M_start;
  } _M_impl;
};
class vector : _Vector_base {
public:
  vector(long) {}
  unsigned *data() { return &_M_impl._M_start; }
};
void *PutBitsIndexedImpl_color_table;
int PutBitsIndexedImpl_dstRectHeight;
char *PutBitsIndexedImpl_src_ptr;
void PutBitsIndexedImpl() {
  vector unpacked_buf(PutBitsIndexedImpl_dstRectHeight);
  unsigned *dst_ptr = unpacked_buf.data();
  for (int x; x; x++) {
    char i = *PutBitsIndexedImpl_src_ptr++;
    dst_ptr[x] = static_cast<int *>(PutBitsIndexedImpl_color_table)[i];
  }
  glFinish();
}
$

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2021-11-30 12:39 ` dcb314 at hotmail dot com
@ 2021-11-30 13:38 ` rguenth at gcc dot gnu.org
  2021-11-30 14:23 ` rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-30 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-11-30
     Ever confirmed|0                           |1
           Priority|P3                          |P1
                 CC|                            |rsandifo at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  Likely caused by Richards SLP support patch though we get here
w/o a SLP node.  ncopies is "wrong" (or unsupported, the offset type is
'char').
I didn't implement widening for offset, maybe the change unleashed that
somehow.

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2021-11-30 13:38 ` rguenth at gcc dot gnu.org
@ 2021-11-30 14:23 ` rsandifo at gcc dot gnu.org
  2021-11-30 14:34 ` [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-11-30 14:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2021-11-30 14:23 ` rsandifo at gcc dot gnu.org
@ 2021-11-30 14:34 ` marxin at gcc dot gnu.org
  2021-11-30 17:32 ` cvs-commit at gcc dot gnu.org
  2021-11-30 17:35 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-30 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12 Regression] ice in      |[12 Regression] ice in
                   |vect_get_vec_defs_for_opera |vect_get_vec_defs_for_opera
                   |nd, at                      |nd, at
                   |tree-vect-stmts.c:1476      |tree-vect-stmts.c:1476
                   |                            |since
                   |                            |r12-5612-g10833849b55401a52
                   |                            |f2334eb032a70beb688e9fc
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc.

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2021-11-30 14:34 ` [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc marxin at gcc dot gnu.org
@ 2021-11-30 17:32 ` cvs-commit at gcc dot gnu.org
  2021-11-30 17:35 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-30 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:7057b8f8c2fbb7a2112705c2962d92b8ccef7c30

commit r12-5632-g7057b8f8c2fbb7a2112705c2962d92b8ccef7c30
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Tue Nov 30 17:32:36 2021 +0000

    vect: Fix ncopies calculation for emulated gather/scatter [PR103494]

    I was too eager about removing ncopies calculations in g:10833849b55.
    When emulating gather/scatter, the offset ncopies can be different from
    the data ncopies.  This patch restores the original calculation.

    gcc/
            PR tree-optimization/103494
            * tree-vect-stmts.c (vect_get_gather_scatter_ops): Remove ncopies
            argument and calculate ncopies from gs_info->offset_vectype
            where necessary.
            (vectorizable_store, vectorizable_load): Update accordingly.

    gcc/testsuite/
            PR tree-optimization/103494
            * gcc.dg/vect/pr103494.c: New test.
            * g++.dg/vect/pr103494.cc: Likewise.

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

* [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc
  2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2021-11-30 17:32 ` cvs-commit at gcc dot gnu.org
@ 2021-11-30 17:35 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-11-30 17:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-11-30 17:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 11:23 [Bug c++/103494] New: ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 dcb314 at hotmail dot com
2021-11-30 11:27 ` [Bug c++/103494] " dcb314 at hotmail dot com
2021-11-30 11:47 ` [Bug tree-optimization/103494] [12 Regression] " pinskia at gcc dot gnu.org
2021-11-30 12:39 ` dcb314 at hotmail dot com
2021-11-30 13:38 ` rguenth at gcc dot gnu.org
2021-11-30 14:23 ` rsandifo at gcc dot gnu.org
2021-11-30 14:34 ` [Bug tree-optimization/103494] [12 Regression] ice in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1476 since r12-5612-g10833849b55401a52f2334eb032a70beb688e9fc marxin at gcc dot gnu.org
2021-11-30 17:32 ` cvs-commit at gcc dot gnu.org
2021-11-30 17:35 ` rsandifo 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).