public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108816] New: ICE in operator[], at vec.h:889
@ 2023-02-16  2:44 asolokha at gmx dot com
  2023-02-17  7:58 ` [Bug tree-optimization/108816] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2023-02-16  2:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108816
           Summary: ICE in operator[], at vec.h:889
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: aarch64-linux-gnu

gcc 13.0.1 20230212 snapshot (g:06ca0c9abb260266b688e2c2154c72214bb47076) ICEs
when compiling the following testcase w/ -mcpu=cortex-x3 -O2
-fvect-cost-model=dynamic:

int m;

void
foo (int p[][16], unsigned int x)
{
  while (x < 4)
    {
      int j;

      for (j = x * 4; j < (x + 1) * 4 - 2; j++)
        p[0][j] = p[m][j];

      ++x;
    }
}

% aarch64-linux-gnu-gcc-13 -mcpu=cortex-x3 -O2 -fvect-cost-model=dynamic -c
ck0pb2mc.c
during GIMPLE pass: vect
ck0pb2mc.c: In function 'foo':
ck0pb2mc.c:4:1: internal compiler error: in operator[], at vec.h:889
    4 | foo (int p[][16], unsigned int x)
      | ^~~
0x77eef2 vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/vec.h:889
0x77eef8 vec<edge_def*, va_gc, vl_embed>::operator[](unsigned int)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-cfg.cc:9409
0x77eef8 extract_true_false_edges_from_block(basic_block_def*, edge_def**,
edge_def**)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-cfg.cc:9410
0x11e6cdb vect_loop_versioning(_loop_vec_info*, gimple*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-loop-manip.cc:3724
0x11da221 vect_transform_loop(_loop_vec_info*, gimple*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vect-loop.cc:10767
0x121f2cf vect_transform_loops
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1007
0x121f94c try_vectorize_loop_1
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1153
0x121f94c try_vectorize_loop
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1183
0x121fcf4 execute
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230212/work/gcc-13-20230212/gcc/tree-vectorizer.cc:1299

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

* [Bug tree-optimization/108816] ICE in operator[], at vec.h:889
  2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
@ 2023-02-17  7:58 ` rguenth at gcc dot gnu.org
  2023-02-20  9:59 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-17  7:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

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

* [Bug tree-optimization/108816] ICE in operator[], at vec.h:889
  2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
  2023-02-17  7:58 ` [Bug tree-optimization/108816] " rguenth at gcc dot gnu.org
@ 2023-02-20  9:59 ` rguenth at gcc dot gnu.org
  2023-02-20 10:56 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-20  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The odd thing is that scalar_loop_iters is

 <ssa_name 0x7ffff67c2c60
    type <boolean_type 0x7ffff68d9b28 _Bool public unsigned QI
        size <integer_cst 0x7ffff68c1f00 constant 8>
        unit-size <integer_cst 0x7ffff68c1f18 constant 1>
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff68d9b28 precision:1 min <integer_cst 0x7ffff68dd168 0> max <integer_cst
0x7ffff68dd198 1>>
    visited
    def_stmt _32 = _7 >= _20;
    version:32>

this then confuses the versioning condition split code.

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

* [Bug tree-optimization/108816] ICE in operator[], at vec.h:889
  2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
  2023-02-17  7:58 ` [Bug tree-optimization/108816] " rguenth at gcc dot gnu.org
  2023-02-20  9:59 ` rguenth at gcc dot gnu.org
@ 2023-02-20 10:56 ` cvs-commit at gcc dot gnu.org
  2023-02-20 10:57 ` [Bug tree-optimization/108816] [12 Regression] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-02-20 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS 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:63471c5008819bbf6ec32a6f4d8701fe57b96fa9

commit r13-6140-g63471c5008819bbf6ec32a6f4d8701fe57b96fa9
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Feb 20 10:59:15 2023 +0100

    tree-optimization/108816 - vect versioning check split confusion

    The split of the versioning condition assumes the definition is
    in the condition block which is ensured by the versioning code.
    But that only works when we actually have to insert any statements
    for the versioning condition.  The following adjusts the guard
    accordingly and asserts this condition.

            PR tree-optimization/108816
            * tree-vect-loop-manip.cc (vect_loop_versioning): Adjust
            versioning condition split prerequesite, assert required
            invariant.

            * gcc.dg/torture/pr108816.c: New testcase.

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

* [Bug tree-optimization/108816] [12 Regression] ICE in operator[], at vec.h:889
  2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2023-02-20 10:56 ` cvs-commit at gcc dot gnu.org
@ 2023-02-20 10:57 ` rguenth at gcc dot gnu.org
  2023-03-15  9:48 ` cvs-commit at gcc dot gnu.org
  2023-03-15 10:04 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-20 10:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |13.0
           Priority|P3                          |P2
            Summary|ICE in operator[], at       |[12 Regression] ICE in
                   |vec.h:889                   |operator[], at vec.h:889
   Target Milestone|---                         |12.3
      Known to fail|                            |12.2.0

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is latent at least.

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

* [Bug tree-optimization/108816] [12 Regression] ICE in operator[], at vec.h:889
  2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2023-02-20 10:57 ` [Bug tree-optimization/108816] [12 Regression] " rguenth at gcc dot gnu.org
@ 2023-03-15  9:48 ` cvs-commit at gcc dot gnu.org
  2023-03-15 10:04 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-15  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:02ff8c8ebcb7f9b0885946d17ff12523e7522b71

commit r12-9260-g02ff8c8ebcb7f9b0885946d17ff12523e7522b71
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Feb 20 10:59:15 2023 +0100

    tree-optimization/108816 - vect versioning check split confusion

    The split of the versioning condition assumes the definition is
    in the condition block which is ensured by the versioning code.
    But that only works when we actually have to insert any statements
    for the versioning condition.  The following adjusts the guard
    accordingly and asserts this condition.

            PR tree-optimization/108816
            * tree-vect-loop-manip.cc (vect_loop_versioning): Adjust
            versioning condition split prerequesite, assert required
            invariant.

            * gcc.dg/torture/pr108816.c: New testcase.

    (cherry picked from commit 63471c5008819bbf6ec32a6f4d8701fe57b96fa9)

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

* [Bug tree-optimization/108816] [12 Regression] ICE in operator[], at vec.h:889
  2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2023-03-15  9:48 ` cvs-commit at gcc dot gnu.org
@ 2023-03-15 10:04 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-15 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |12.2.1

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

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

end of thread, other threads:[~2023-03-15 10:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-16  2:44 [Bug target/108816] New: ICE in operator[], at vec.h:889 asolokha at gmx dot com
2023-02-17  7:58 ` [Bug tree-optimization/108816] " rguenth at gcc dot gnu.org
2023-02-20  9:59 ` rguenth at gcc dot gnu.org
2023-02-20 10:56 ` cvs-commit at gcc dot gnu.org
2023-02-20 10:57 ` [Bug tree-optimization/108816] [12 Regression] " rguenth at gcc dot gnu.org
2023-03-15  9:48 ` cvs-commit at gcc dot gnu.org
2023-03-15 10:04 ` 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).