public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge
@ 2023-04-20 17:30 sjames at gcc dot gnu.org
  2023-04-20 19:18 ` [Bug tree-optimization/109573] " pinskia at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-04-20 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109573
           Summary: [12/13/14 regression] ICE in
                    vectorizable_live_operation, at tree-vect-loop.cc:9060
                    when building chromium's maglev-assembler-x64.cc with
                    -march=ivybridge
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu
             Build: x86_64-pc-linux-gnu

Occurs when building chromium. Originally reported in Gentoo at
https://bugs.gentoo.org/904455.

Needs -march=ivybridge. GCC 11 is OK, but 12/13 and presumably 14 are not.

(Unlike my recent reports, does not need checking.)

```
out/Release $ g++-13 -MMD -MF
obj/v8/v8_base_without_compiler/maglev-assembler-x64.o.d -DUSE_UDEV
-DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG
-DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -DV8_INTL_SUPPORT
-DV8_USE_EXTERNAL_STARTUP_DATA -DV8_ATOMIC_OBJECT_FIELD_WRITES
-DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_SHARED_RO_HEAP -DV8_WIN64_UNWINDING_INFO
-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH -DV8_SHORT_BUILTIN_CALLS
-DV8_EXTERNAL_CODE_SPACE -DV8_ENABLE_MAGLEV -DV8_ENABLE_TURBOFAN
-DV8_ENABLE_WEBASSEMBLY -DV8_ALLOCATION_FOLDING -DV8_ALLOCATION_SITE_TRACKING
-DV8_ADVANCED_BIGINT_ALGORITHMS -DV8_STATIC_ROOTS -DV8_USE_ZLIB
-DV8_USE_LIBM_TRIG_FUNCTIONS -DV8_ENABLE_WASM_SIMD256_REVEC
-DV8_COMPRESS_POINTERS -DV8_COMPRESS_POINTERS_IN_SHARED_CAGE
-DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_ENABLE_SANDBOX -DV8_DEPRECATION_WARNINGS
-DCPPGC_CAGED_HEAP -DCPPGC_YOUNG_GENERATION -DCPPGC_POINTER_COMPRESSION
-DCPPGC_SLIM_WRITE_BARRIER -DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS
-DV8_TARGET_OS_LINUX -DUSING_SYSTEM_ICU=1
-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DU_IMPORT=U_EXPORT
-DUSE_SYSTEM_ZLIB=1 -I../.. -Igen -I../../v8 -I../../v8/include -Igen/v8
-Igen/v8/include -Igen/shim_headers/icui18n_shim -Igen/shim_headers/icuuc_shim
-Igen/shim_headers/zlib_shim -Wno-unused-local-typedefs
-Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments
-Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter
-Wno-psabi -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4
-fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC
-pipe -pthread -fno-omit-frame-pointer -fvisibility=hidden -Wno-strict-overflow
-Wno-return-type -Wno-int-in-bool-context -Wno-deprecated -Wno-narrowing
-Wno-class-memaccess -std=gnu++2a -fno-exceptions -fno-rtti
-fvisibility-inlines-hidden -O2 -march=ivybridge -pipe -O2 -march=ivybridge
-pipe -c ../../v8/src/maglev/x64/maglev-assembler-x64.cc -o
obj/v8/v8_base_without_compiler/maglev-assembler-x64.o
during GIMPLE pass: slp
../../v8/src/maglev/x64/maglev-assembler-x64.cc: In member function ‘void
v8::internal::maglev::MaglevAssembler::Prologue(v8::internal::maglev::Graph*)’:
../../v8/src/maglev/x64/maglev-assembler-x64.cc:515:6: internal compiler error:
in vectorizable_live_operation, at tree-vect-loop.cc:10117
  515 | void MaglevAssembler::Prologue(Graph* graph) {
      |      ^~~~~~~~~~~~~~~
0x6a599b vectorizable_live_operation(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*, int, bool,
vec<stmt_info_for_cost, va_heap, vl_ptr>*)
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-loop.cc:10117
0x1cea7e0 can_vectorize_live_stmts
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-stmts.cc:11206
0x1d110b2 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-stmts.cc:11607
0x10925a0 vect_schedule_slp_node
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:8952
0x10a3198 vect_schedule_scc
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:9147
0x10a2e32 vect_schedule_scc
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:9128
0x10a36fc vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>
const&)
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:9287
0x10a60fe vect_slp_region
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:7496
0x10a6b89 vect_slp_bbs
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:7608
0x10a6e80 vect_slp_function(function*)
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vect-slp.cc:7709
0x10aef81 execute
       
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230419-r1/gcc-13.1.0-RC2-20230419/gcc/tree-vectorizer.cc:1532
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

---

Preprocessed source:
https://dev.gentoo.org/~sam/bugs/gcc/gcc-chromium-vectorize-x86/maglev-assembler-x64.ii.xz.
I'm sorry for the external link, but it's 1.1MB even when highly compressed
with e.g. xz -9e.

Reproducer:
```
$ g++ -S -O2 -std=gnu++2a -march=ivybridge -c maglev-assembler-x64.ii
[...]
```

I'm going to try reduce it now.

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

* [Bug tree-optimization/109573] [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
@ 2023-04-20 19:18 ` pinskia at gcc dot gnu.org
  2023-04-20 21:13 ` pinskia at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-20 19:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |12.3

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

* [Bug tree-optimization/109573] [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
  2023-04-20 19:18 ` [Bug tree-optimization/109573] " pinskia at gcc dot gnu.org
@ 2023-04-20 21:13 ` pinskia at gcc dot gnu.org
  2023-04-21  7:07 ` rguenth at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-04-20 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu.org
           Keywords|                            |needs-bisection,
                   |                            |needs-reduction

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing this too.

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

* [Bug tree-optimization/109573] [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
  2023-04-20 19:18 ` [Bug tree-optimization/109573] " pinskia at gcc dot gnu.org
  2023-04-20 21:13 ` pinskia at gcc dot gnu.org
@ 2023-04-21  7:07 ` rguenth at gcc dot gnu.org
  2023-04-21  7:35 ` sjames at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-21  7:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Priority|P3                          |P2
   Last reconfirmed|                            |2023-04-21
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The assert is just a bit overzealous.

(gdb) p debug_bb ($2)
<bb 47> [local count: 708959595]:
# prephitmp_152 = PHI <_276(45), pretmp_2(46)>
# prephitmp_205 = PHI <_85(45), pretmp_341(46)>
# prephitmp_556 = PHI <_86(45), pretmp_298(46)>
# prephitmp_353 = PHI <_275(45), pretmp_555(46)>
result_282 = (void *) prephitmp_152;
_283 = prephitmp_152 + 8;
MEM[(struct Zone *)_86].position_ = _283;
vectp.1975_450 = result_282;
MEM <vector(2) int> [(int *)vectp.1975_450] = { 0, 0 };

use_stmt is the last stmt so code is SSA_NAME.  But it's also an odd SLP graph
as we have two graphs we vectorize separately where parts of one graph
are used in address computes of another (the addresses we don't model in SLP
so we "fail" to merge the SLP graphs).

Going to be interesting to see whether a reduced testcase reproduces that.

Anyway, the easiest "fix" is to simply remove the assert.  The assert is
not technically necessary, it's just there trying to "prove" we understand
the situations this hack is necessary (I don't think we do ;)).

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

* [Bug tree-optimization/109573] [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-04-21  7:07 ` rguenth at gcc dot gnu.org
@ 2023-04-21  7:35 ` sjames at gcc dot gnu.org
  2023-04-21  7:53 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-04-21  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 54897
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54897&action=edit
reduced.ii

This reproducer builds with Clang OK and still ICEs with gcc. Bit worried it
may have lost some properties, but we'll see..

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

* [Bug tree-optimization/109573] [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-04-21  7:35 ` sjames at gcc dot gnu.org
@ 2023-04-21  7:53 ` rguenth at gcc dot gnu.org
  2023-04-21  7:57 ` [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge since r11-3025-g095d42feed09f8 marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-04-21  7:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Sam James from comment #3)
> Created attachment 54897 [details]
> reduced.ii
> 
> This reproducer builds with Clang OK and still ICEs with gcc. Bit worried it
> may have lost some properties, but we'll see..

From a quick look it still has the odd property I observed.

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

* [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-04-21  7:53 ` rguenth at gcc dot gnu.org
@ 2023-04-21  7:57 ` marxin at gcc dot gnu.org
  2023-04-21  8:07 ` [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 " marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-04-21  7:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13/14 regression] ICE   |[11/12/13/14 regression]
                   |in                          |ICE in
                   |vectorizable_live_operation |vectorizable_live_operation
                   |, at tree-vect-loop.cc:9060 |, at tree-vect-loop.cc:9060
                   |when building chromium's    |when building chromium's
                   |maglev-assembler-x64.cc     |maglev-assembler-x64.cc
                   |with -march=ivybridge       |with -march=ivybridge since
                   |                            |r11-3025-g095d42feed09f8
           Keywords|needs-bisection             |
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
With -O3 (as with -O2 it started with the revision where we enabled
vectorization at -O2), it started with r11-3025-g095d42feed09f8.

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

* [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-04-21  7:57 ` [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge since r11-3025-g095d42feed09f8 marxin at gcc dot gnu.org
@ 2023-04-21  8:07 ` marxin at gcc dot gnu.org
  2023-04-21 11:47 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-04-21  8:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |11.5
            Summary|[11/12/13/14 regression]    |[11/12/13/14 regression]
                   |ICE in                      |ICE in
                   |vectorizable_live_operation |vectorizable_live_operation
                   |, at tree-vect-loop.cc:9060 |, at tree-vect-loop.cc:9060
                   |when building chromium's    |with -march=ivybridge since
                   |maglev-assembler-x64.cc     |r11-3025-g095d42feed09f8
                   |with -march=ivybridge since |
                   |r11-3025-g095d42feed09f8    |

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

* [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-04-21  8:07 ` [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 " marxin at gcc dot gnu.org
@ 2023-04-21 11:47 ` cvs-commit at gcc dot gnu.org
  2023-04-26  9:33 ` [Bug tree-optimization/109573] [11/12/13 " cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-21 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 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:cddfe6bc40b3dc0806e260bbfb4cac82d609a258

commit r14-139-gcddfe6bc40b3dc0806e260bbfb4cac82d609a258
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Apr 21 12:57:17 2023 +0200

    tree-optimization/109573 - avoid ICEing on unexpected live def

    The following relaxes the assert in vectorizable_live_operation
    where we catch currently unhandled cases to also allow an
    intermediate copy as it happens here but also relax the assert
    to checking only.

            PR tree-optimization/109573
            * tree-vect-loop.cc (vectorizable_live_operation): Allow
            unhandled SSA copy as well.  Demote assert to checking only.

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

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

* [Bug tree-optimization/109573] [11/12/13 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-04-21 11:47 ` cvs-commit at gcc dot gnu.org
@ 2023-04-26  9:33 ` cvs-commit at gcc dot gnu.org
  2023-04-26 10:41 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-26  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:263d1ed0484fc81d3f93e39cdd2f9eb0ce4d3e88

commit r13-7250-g263d1ed0484fc81d3f93e39cdd2f9eb0ce4d3e88
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Apr 21 12:57:17 2023 +0200

    tree-optimization/109573 - avoid ICEing on unexpected live def

    The following relaxes the assert in vectorizable_live_operation
    where we catch currently unhandled cases to also allow an
    intermediate copy as it happens here but also relax the assert
    to checking only.

            PR tree-optimization/109573
            * tree-vect-loop.cc (vectorizable_live_operation): Allow
            unhandled SSA copy as well.  Demote assert to checking only.

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

    (cherry picked from commit cddfe6bc40b3dc0806e260bbfb4cac82d609a258)

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

* [Bug tree-optimization/109573] [11/12/13 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-04-26  9:33 ` [Bug tree-optimization/109573] [11/12/13 " cvs-commit at gcc dot gnu.org
@ 2023-04-26 10:41 ` cvs-commit at gcc dot gnu.org
  2023-05-02 12:40 ` [Bug tree-optimization/109573] [11 " cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-26 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 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:c7de861c609573b1f219fcdf6c683612c987621f

commit r12-9472-gc7de861c609573b1f219fcdf6c683612c987621f
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Apr 21 12:57:17 2023 +0200

    tree-optimization/109573 - avoid ICEing on unexpected live def

    The following relaxes the assert in vectorizable_live_operation
    where we catch currently unhandled cases to also allow an
    intermediate copy as it happens here but also relax the assert
    to checking only.

            PR tree-optimization/109573
            * tree-vect-loop.cc (vectorizable_live_operation): Allow
            unhandled SSA copy as well.  Demote assert to checking only.

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

    (cherry picked from commit cddfe6bc40b3dc0806e260bbfb4cac82d609a258)

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

* [Bug tree-optimization/109573] [11 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-04-26 10:41 ` cvs-commit at gcc dot gnu.org
@ 2023-05-02 12:40 ` cvs-commit at gcc dot gnu.org
  2023-05-02 12:40 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 12:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:8ee420c763add757bfb7c451f3ec986046644021

commit r11-10679-g8ee420c763add757bfb7c451f3ec986046644021
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Apr 21 12:57:17 2023 +0200

    tree-optimization/109573 - avoid ICEing on unexpected live def

    The following relaxes the assert in vectorizable_live_operation
    where we catch currently unhandled cases to also allow an
    intermediate copy as it happens here but also relax the assert
    to checking only.

            PR tree-optimization/109573
            * tree-vect-loop.c (vectorizable_live_operation): Allow
            unhandled SSA copy as well.  Demote assert to checking only.

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

    (cherry picked from commit cddfe6bc40b3dc0806e260bbfb4cac82d609a258)

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

* [Bug tree-optimization/109573] [11 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2023-05-02 12:40 ` [Bug tree-optimization/109573] [11 " cvs-commit at gcc dot gnu.org
@ 2023-05-02 12:40 ` rguenth at gcc dot gnu.org
  2023-05-03  8:46 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-02 12:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.5                        |11.4
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |11.3.0
      Known to work|                            |11.3.1

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

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

* [Bug tree-optimization/109573] [11 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2023-05-02 12:40 ` rguenth at gcc dot gnu.org
@ 2023-05-03  8:46 ` jakub at gcc dot gnu.org
  2023-05-03  9:28 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-03  8:46 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The testcase fails for me in gcc 11 on both x86_64-linux and i686-linux
(--enable-checking=yes,rtl,extra):
+FAIL: g++.dg/vect/pr109573.cc  -std=c++20 (internal compiler error)
+FAIL: g++.dg/vect/pr109573.cc  -std=c++20 (test for excess errors)
+FAIL: g++.dg/vect/pr109573.cc  -std=c++2b (internal compiler error)
+FAIL: g++.dg/vect/pr109573.cc  -std=c++2b (test for excess errors)
/usr/src/gcc-11/gcc/testsuite/g++.dg/vect/pr109573.cc:81:6: internal compiler
error: in vectorizable_live_operation, at tree-vect-loop.c:8876
0x89f86d vectorizable_live_operation(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*, int, bool,
vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        ../../gcc/tree-vect-loop.c:8876
0x1593097 can_vectorize_live_stmts
        ../../gcc/tree-vect-stmts.c:10663
0x15b86d8 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        ../../gcc/tree-vect-stmts.c:11047
0x15e92fd vect_schedule_slp_node
        ../../gcc/tree-vect-slp.c:6391
0x15f6441 vect_schedule_scc
        ../../gcc/tree-vect-slp.c:6553
0x15f61cf vect_schedule_scc
        ../../gcc/tree-vect-slp.c:6534
0x15f6a17 vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>)
        ../../gcc/tree-vect-slp.c:6669
0x15f80b4 vect_slp_region
        ../../gcc/tree-vect-slp.c:5074
0x15f92ba vect_slp_bbs
        ../../gcc/tree-vect-slp.c:5186
0x15f96c4 vect_slp_function(function*)
        ../../gcc/tree-vect-slp.c:5272
0x16000c2 execute
        ../../gcc/tree-vectorizer.c:1450

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

* [Bug tree-optimization/109573] [11 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2023-05-03  8:46 ` jakub at gcc dot gnu.org
@ 2023-05-03  9:28 ` rguenth at gcc dot gnu.org
  2023-05-08  6:20 ` rguenth at gcc dot gnu.org
  2023-05-29 10:08 ` jakub at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-03  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #11)
> The testcase fails for me in gcc 11 on both x86_64-linux and i686-linux
> (--enable-checking=yes,rtl,extra):
> +FAIL: g++.dg/vect/pr109573.cc  -std=c++20 (internal compiler error)
> +FAIL: g++.dg/vect/pr109573.cc  -std=c++20 (test for excess errors)
> +FAIL: g++.dg/vect/pr109573.cc  -std=c++2b (internal compiler error)
> +FAIL: g++.dg/vect/pr109573.cc  -std=c++2b (test for excess errors)
> /usr/src/gcc-11/gcc/testsuite/g++.dg/vect/pr109573.cc:81:6: internal
> compiler error: in vectorizable_live_operation, at tree-vect-loop.c:8876
> 0x89f86d vectorizable_live_operation(vec_info*, _stmt_vec_info*,
> gimple_stmt_iterator*, _slp_tree*, _slp_instance*, int, bool,
> vec<stmt_info_for_cost, va_heap, vl_ptr>*)
>         ../../gcc/tree-vect-loop.c:8876

Yep, I decided to backport the assert -> checking-assert change.  There's
no "good" way to handle the case we are running into.  On the branch we
run into an ADDR_EXPR.

As said with the original patch to trunk an option would be to remove the
assert alltogether, but not sure how important that would be.  It's still
interesting to see other cases we run into with this "FIXME" code path
(but as said, there's no good way to capture this particular case within
the assert).

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

* [Bug tree-optimization/109573] [11 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2023-05-03  9:28 ` rguenth at gcc dot gnu.org
@ 2023-05-08  6:20 ` rguenth at gcc dot gnu.org
  2023-05-29 10:08 ` jakub at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08  6:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
*** Bug 109749 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/109573] [11 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 with -march=ivybridge since r11-3025-g095d42feed09f8
  2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2023-05-08  6:20 ` rguenth at gcc dot gnu.org
@ 2023-05-29 10:08 ` jakub at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.4                        |11.5

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.

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

end of thread, other threads:[~2023-05-29 10:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-20 17:30 [Bug tree-optimization/109573] New: [12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge sjames at gcc dot gnu.org
2023-04-20 19:18 ` [Bug tree-optimization/109573] " pinskia at gcc dot gnu.org
2023-04-20 21:13 ` pinskia at gcc dot gnu.org
2023-04-21  7:07 ` rguenth at gcc dot gnu.org
2023-04-21  7:35 ` sjames at gcc dot gnu.org
2023-04-21  7:53 ` rguenth at gcc dot gnu.org
2023-04-21  7:57 ` [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 when building chromium's maglev-assembler-x64.cc with -march=ivybridge since r11-3025-g095d42feed09f8 marxin at gcc dot gnu.org
2023-04-21  8:07 ` [Bug tree-optimization/109573] [11/12/13/14 regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:9060 " marxin at gcc dot gnu.org
2023-04-21 11:47 ` cvs-commit at gcc dot gnu.org
2023-04-26  9:33 ` [Bug tree-optimization/109573] [11/12/13 " cvs-commit at gcc dot gnu.org
2023-04-26 10:41 ` cvs-commit at gcc dot gnu.org
2023-05-02 12:40 ` [Bug tree-optimization/109573] [11 " cvs-commit at gcc dot gnu.org
2023-05-02 12:40 ` rguenth at gcc dot gnu.org
2023-05-03  8:46 ` jakub at gcc dot gnu.org
2023-05-03  9:28 ` rguenth at gcc dot gnu.org
2023-05-08  6:20 ` rguenth at gcc dot gnu.org
2023-05-29 10:08 ` jakub 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).