public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867
@ 2020-07-01 17:16 vsevolod.livinskij at frtk dot ru
  2020-07-02  6:41 ` [Bug tree-optimization/96022] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2020-07-01 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96022
           Summary: ICE during GIMPLE pass: slp in operator[], at
                    vec.h:867
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskij at frtk dot ru
  Target Milestone: ---

>$ g++ -c -O3 func.cpp
during GIMPLE pass: slp
func.cpp: In function ‘void test(short int, bool, int)’:
func.cpp:3:6: internal compiler error: in operator[], at vec.h:867
    3 | void test(short a, bool, int p8) {
      |      ^~~~
0x850b10 vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
        gcc/vec.h:867
0x850b10 vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
        gcc/vec.h:1433
0x852d71 vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
        gcc/tree.h:3424
0x852d71 vectorizable_shift
        gcc/tree-vect-stmts.c:5492
0x1385aa0 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        gcc/tree-vect-stmts.c:10640
0x13b08e3 vect_schedule_slp_instance
        gcc/tree-vect-slp.c:4350
0x13b0904 vect_schedule_slp_instance
        gcc/tree-vect-slp.c:4229
0x13b0904 vect_schedule_slp_instance
        gcc/tree-vect-slp.c:4229
0x13b72a6 vect_schedule_slp(vec_info*)
        gcc/tree-vect-slp.c:4465
0x13b9af0 vect_slp_bb_region
        gcc/tree-vect-slp.c:3303
0x13b9af0 vect_slp_bb(basic_block_def*)
        gcc/tree-vect-slp.c:3433
0x13bb466 execute
        gcc/tree-vectorizer.c:1384


Reproducer:
extern int arr_6[];
extern char arr_7[] __attribute__((aligned));
void test(short a, bool, int p8) {
  for (bool b = 0; b < (bool)p8; b = 1)
    for (short c = 0; c < 5; c++) {
      arr_6[c] = (long)2 << a - 30574;
      arr_7[c] = 0;
    }
}

GCC version:
11.0.0 20200630 (67ef8cfc1c1d440eafa89a26710bced934a485dc) (GCC)

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

* [Bug tree-optimization/96022] ICE during GIMPLE pass: slp in operator[], at vec.h:867
  2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
@ 2020-07-02  6:41 ` rguenth at gcc dot gnu.org
  2020-07-02  8:22 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02  6:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/96022] ICE during GIMPLE pass: slp in operator[], at vec.h:867
  2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
  2020-07-02  6:41 ` [Bug tree-optimization/96022] " rguenth at gcc dot gnu.org
@ 2020-07-02  8:22 ` marxin at gcc dot gnu.org
  2020-07-02  9:18 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-07-02  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Just for the record, started with r11-1647-g86ce59b4f05d8f68.

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

* [Bug tree-optimization/96022] ICE during GIMPLE pass: slp in operator[], at vec.h:867
  2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
  2020-07-02  6:41 ` [Bug tree-optimization/96022] " rguenth at gcc dot gnu.org
  2020-07-02  8:22 ` marxin at gcc dot gnu.org
@ 2020-07-02  9:18 ` cvs-commit at gcc dot gnu.org
  2020-07-02  9:18 ` 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 @ 2020-07-02  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:d5d9f7834ab809841c4ccc90bca74808b4bcaf8d

commit r11-1782-gd5d9f7834ab809841c4ccc90bca74808b4bcaf8d
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jul 2 11:12:51 2020 +0200

    tree-optimization/96022 - fix ICE with vectorized shift

    This fixes lane extraction for internal def vectorized shifts
    with an effective scalar shift operand by always using lane zero
    of the first vector stmt.

    It also fixes a SLP build issue noticed on the testcase where
    we end up building unary vector ops with the only operand built
    form scalars which isn't profitable by itself.  The exception
    is for stores.

    2020-07-02  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/96022
            * tree-vect-stmts.c (vectorizable_shift): Only use the
            first vector stmt when extracting the scalar shift amount.
            * tree-vect-slp.c (vect_build_slp_tree_2): Also build unary
            nodes with all-scalar children from scalars but not stores.
            (vect_analyze_slp_instance): Mark the node not failed.

            * g++.dg/vect/pr96022.cc: New testcase.

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

* [Bug tree-optimization/96022] ICE during GIMPLE pass: slp in operator[], at vec.h:867
  2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
                   ` (2 preceding siblings ...)
  2020-07-02  9:18 ` cvs-commit at gcc dot gnu.org
@ 2020-07-02  9:18 ` rguenth at gcc dot gnu.org
  2020-07-08 15:16 ` mkuvyrkov at gcc dot gnu.org
  2020-07-08 15:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-02  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug tree-optimization/96022] ICE during GIMPLE pass: slp in operator[], at vec.h:867
  2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
                   ` (3 preceding siblings ...)
  2020-07-02  9:18 ` rguenth at gcc dot gnu.org
@ 2020-07-08 15:16 ` mkuvyrkov at gcc dot gnu.org
  2020-07-08 15:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2020-07-08 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |mkuvyrkov at gcc dot gnu.org
         Resolution|FIXED                       |---

--- Comment #5 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
Hi Richard,

This causes ICEs on many vectorization testcases for arm-linux-gnueabihf.  Full
list of regressions is at [1].  Sum and log files are at [2].

[1]
https://ci.linaro.org/view/tcwg_cross/job/tcwg_cross-bisect-gnu-master-arm-check_cross/7/artifact/artifacts/build-first_bad/results/*view*/
[2]
https://ci.linaro.org/view/tcwg_cross/job/tcwg_cross-bisect-gnu-master-arm-check_cross/7/artifact/artifacts/build-first_bad/sumfiles/ 

Typical error log:
<cut>
spawn -ignore SIGHUP
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-unknown-linux-gnu/bin/arm-linux-gnueabihf-gcc
--sysroot=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/sysroots/arm-linux-gnueabihf
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/vect/pr55857-1.c
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never
--sysroot=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/sysroots/arm-linux-gnueabihf
-mfpu=neon -ffast-math -ftree-vectorize -fno-tree-loop-distribute-patterns
-fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details -S -o pr55857-1.s
during GIMPLE pass: vect
dump file: pr55857-1.c.163t.vect
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/vect/pr55857-1.c:
In function 'foo':
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/testsuite/gcc.dg/vect/pr55857-1.c:4:1:
internal compiler error: Segmentation fault
0xcd933f crash_signal
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/toplev.c:328
0xf889ee get_vectype_for_scalar_type(vec_info*, tree_node*, _slp_tree*)
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vect-stmts.c:10999
0xf889ee vectorizable_shift
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vect-stmts.c:5404
0xfa3dbf vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vect-stmts.c:10555
0xfbc5b9 vect_analyze_loop_operations
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vect-loop.c:1613
0xfbeb14 vect_analyze_loop_2
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vect-loop.c:2164
0xfbeb14 vect_analyze_loop(loop*, vec_info_shared*)
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vect-loop.c:2612
0xfe206c try_vectorize_loop_1
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vectorizer.c:955
0xfe2f09 vectorize_loops()
       
/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/gcc/tree-vectorizer.c:1189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
compiler exited with status 1
FAIL: gcc.dg/vect/pr55857-1.c (internal compiler error)
FAIL: gcc.dg/vect/pr55857-1.c (test for excess errors)
</cut>

GCC was configured as a typical armhf cross-compiler:
 --disable-multilib --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb
--with-tune=cortex-a9 --with-arch=armv7-a --enable-threads=posix
--enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function
--enable-checking=yes --disable-bootstrap --enable-languages=c,c++,fortran,lto
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=arm-linux-gnueabihf

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

* [Bug tree-optimization/96022] ICE during GIMPLE pass: slp in operator[], at vec.h:867
  2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
                   ` (4 preceding siblings ...)
  2020-07-08 15:16 ` mkuvyrkov at gcc dot gnu.org
@ 2020-07-08 15:25 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-08 15:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Wasn't this already fixed?  See PR96037.  Please do not re-open bugs for bugs
with obviously different cause.

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

end of thread, other threads:[~2020-07-08 15:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 17:16 [Bug tree-optimization/96022] New: ICE during GIMPLE pass: slp in operator[], at vec.h:867 vsevolod.livinskij at frtk dot ru
2020-07-02  6:41 ` [Bug tree-optimization/96022] " rguenth at gcc dot gnu.org
2020-07-02  8:22 ` marxin at gcc dot gnu.org
2020-07-02  9:18 ` cvs-commit at gcc dot gnu.org
2020-07-02  9:18 ` rguenth at gcc dot gnu.org
2020-07-08 15:16 ` mkuvyrkov at gcc dot gnu.org
2020-07-08 15:25 ` 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).