public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
@ 2024-09-11  9:17 liuhongt at gcc dot gnu.org
  2024-09-11  9:18 ` [Bug tree-optimization/116674] " liuhongt at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-09-11  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 116674
           Summary: [15 regression] ICE in vectorizable_simd_clone_call
                    bisected to r15-3509-gd34cda72098867
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liuhongt at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Created attachment 59093
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59093&action=edit
test.i

during GIMPLE pass: vect
test.i: In function ‘void b(int)’:
test.i:71:6: internal compiler error: in vectorizable_simd_clone_call, at
tree-vect-stmts.cc:4039
   71 | void b(int bc) {
      |      ^
0x27f90f5 internal_error(char const*, ...)
        /home/liuhongt/work/gcc/master/gcc/diagnostic-global-context.cc:517
0xa836ce fancy_abort(char const*, int, char const*)
        /home/liuhongt/work/gcc/master/gcc/diagnostic.cc:1657
0x987e86 vectorizable_simd_clone_call
        /home/liuhongt/work/gcc/master/gcc/tree-vect-stmts.cc:4039
0x16a8628 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        /home/liuhongt/work/gcc/master/gcc/tree-vect-stmts.cc:13362
0x1706999 vect_slp_analyze_node_operations_1
        /home/liuhongt/work/gcc/master/gcc/tree-vect-slp.cc:7364
0x1706999 vect_slp_analyze_node_operations
        /home/liuhongt/work/gcc/master/gcc/tree-vect-slp.cc:7567
0x17068d0 vect_slp_analyze_node_operations
        /home/liuhongt/work/gcc/master/gcc/tree-vect-slp.cc:7546
0x17085ed vect_slp_analyze_operations(vec_info*)
        /home/liuhongt/work/gcc/master/gcc/tree-vect-slp.cc:7962
0x16d3fc6 vect_analyze_loop_2
        /home/liuhongt/work/gcc/master/gcc/tree-vect-loop.cc:2954
0x16d6010 vect_analyze_loop_1
        /home/liuhongt/work/gcc/master/gcc/tree-vect-loop.cc:3409
0x16d676b vect_analyze_loop(loop*, vec_info_shared*)
        /home/liuhongt/work/gcc/master/gcc/tree-vect-loop.cc:3567
0x171e1b4 try_vectorize_loop_1
        /home/liuhongt/work/gcc/master/gcc/tree-vectorizer.cc:1068
0x171e1b4 try_vectorize_loop
        /home/liuhongt/work/gcc/master/gcc/tree-vectorizer.cc:1184
0x171eadc execute
        /home/liuhongt/work/gcc/master/gcc/tree-vectorizer.cc:1300
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.


gcc -Ofast -march=x86-64-v3 -S

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

* [Bug tree-optimization/116674] [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
  2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
@ 2024-09-11  9:18 ` liuhongt at gcc dot gnu.org
  2024-09-11 10:07 ` acoplan at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-09-11  9:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
Created attachment 59094
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59094&action=edit
test.i

A more reduced case.

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

* [Bug tree-optimization/116674] [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
  2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
  2024-09-11  9:18 ` [Bug tree-optimization/116674] " liuhongt at gcc dot gnu.org
@ 2024-09-11 10:07 ` acoplan at gcc dot gnu.org
  2024-09-11 11:23 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-09-11 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-linux-gnu,
                   |                            |aarch64-linux-gnu
   Last reconfirmed|                            |2024-09-11
                 CC|                            |acoplan at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Confirmed, also ICEs on aarch64 with -Ofast -march=armv9-a.

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

* [Bug tree-optimization/116674] [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
  2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
  2024-09-11  9:18 ` [Bug tree-optimization/116674] " liuhongt at gcc dot gnu.org
  2024-09-11 10:07 ` acoplan at gcc dot gnu.org
@ 2024-09-11 11:23 ` rguenth at gcc dot gnu.org
  2024-09-11 11:50 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-09-11 11:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |15.0

--- Comment #3 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/116674] [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
  2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-09-11 11:23 ` rguenth at gcc dot gnu.org
@ 2024-09-11 11:50 ` rguenth at gcc dot gnu.org
  2024-09-11 12:56 ` cvs-commit at gcc dot gnu.org
  2024-09-11 12:56 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-09-11 11:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that when we're analyzing SLP instances sharing a node as in this
case a SIMD call but we fail an instance we're scrapping it and marking the
nodes we analyzed as part of that instance as not analyzed.  But
vectorizable_simd_clone_call isn't really set up to be called multiple
times for analysis only.

For loop vect it's easy to simply not continue analyzing instances since
we have to give up anyway but of course with BB vectorization dropping
instances is a feature and thus we can run into the very same issue there.

The issue is latent thus.

I have a patch that should make vectorizable_simd_clone_call more resilent.

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

* [Bug tree-optimization/116674] [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
  2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-09-11 11:50 ` rguenth at gcc dot gnu.org
@ 2024-09-11 12:56 ` cvs-commit at gcc dot gnu.org
  2024-09-11 12:56 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-09-11 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC 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:09a514fbb67caf7e33a6ceddf524ee21024c33c5

commit r15-3587-g09a514fbb67caf7e33a6ceddf524ee21024c33c5
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Sep 11 13:54:33 2024 +0200

    tree-optimization/116674 - vectorizable_simd_clone_call and re-analysis

    When SLP analysis scraps an instance because it fails to analyze we
    can end up calling vectorizable_* in analysis mode on a node that
    was analyzed during the analysis of that instance again.
    vectorizable_simd_clone_call wasn't expecting that and instead
    guarded analysis/transform code on populated data structures.
    The following changes it so it survives re-analysis.

            PR tree-optimization/116674
            * tree-vect-stmts.cc (vectorizable_simd_clone_call): Support
            re-analysis.

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

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

* [Bug tree-optimization/116674] [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867
  2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-09-11 12:56 ` cvs-commit at gcc dot gnu.org
@ 2024-09-11 12:56 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-09-11 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk but possibly latent with BB vectorization as said.

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

end of thread, other threads:[~2024-09-11 12:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-11  9:17 [Bug tree-optimization/116674] New: [15 regression] ICE in vectorizable_simd_clone_call bisected to r15-3509-gd34cda72098867 liuhongt at gcc dot gnu.org
2024-09-11  9:18 ` [Bug tree-optimization/116674] " liuhongt at gcc dot gnu.org
2024-09-11 10:07 ` acoplan at gcc dot gnu.org
2024-09-11 11:23 ` rguenth at gcc dot gnu.org
2024-09-11 11:50 ` rguenth at gcc dot gnu.org
2024-09-11 12:56 ` cvs-commit at gcc dot gnu.org
2024-09-11 12:56 ` 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).