public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
@ 2021-07-12  4:59 marxin at gcc dot gnu.org
  2021-07-12  5:00 ` [Bug tree-optimization/101423] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-07-12  4:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101423
           Summary: [12 Regression] ICE in vect_schedule_slp_node, at
                    tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---

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

Happens only with PGO:

$ gfortran -shared  -ISPOOLES -Ofast -march=znver1 -g -flto=auto -std=legacy
umat_aniso_plas.f -fprofile-use -c && gcc umat_aniso_plas.o -shared
f951: Warning: Nonexistent include directory 'SPOOLES' [-Wmissing-include-dirs]
umat_aniso_plas.f:99:13:

   99 |      &     +beta(6)
      |             1
Warning: Extension: Unary operator following arithmetic operator (use
parentheses) at (1)
umat_aniso_plas.f:215:19:

  215 |      &           +beta(6)
      |                   1
Warning: Extension: Unary operator following arithmetic operator (use
parentheses) at (1)
during GIMPLE pass: slp
umat_aniso_plas.f: In function 'umat_aniso_plas':
umat_aniso_plas.f:19:32: internal compiler error: in vect_schedule_slp_node, at
tree-vect-slp.c:7115
   19 |       subroutine umat_aniso_plas(amat,iel,iint,kode,elconloc,eloc,
      |                                ^
0x743003 vect_schedule_slp_node
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:7115
0x10342f3 vect_schedule_scc
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:7342
0x1034071 vect_schedule_scc
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:7323
0x103493c vect_schedule_slp(vec_info*, vec<_slp_instance*, va_heap, vl_ptr>)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:7459
0x10362e8 vect_slp_region
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5822
0x1036f78 vect_slp_bbs
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:5932
0x1037384 vect_slp_function(function*)
        /home/marxin/Programming/gcc/gcc/tree-vect-slp.c:6018
0x103e26a execute
        /home/marxin/Programming/gcc/gcc/tree-vectorizer.c:1445
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.
make: *** [/tmp/ccmyk9YH.mk:2: /tmp/cchwfZCC.ltrans0.ltrans.o] Error 1
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
@ 2021-07-12  5:00 ` marxin at gcc dot gnu.org
  2021-07-12  8:00 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-07-12  5:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 51134
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51134&action=edit
GCDA profile

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
  2021-07-12  5:00 ` [Bug tree-optimization/101423] " marxin at gcc dot gnu.org
@ 2021-07-12  8:00 ` rguenth at gcc dot gnu.org
  2021-07-12  8:24 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-12  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-07-12
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |12.0
             Status|UNCONFIRMED                 |ASSIGNED

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

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
  2021-07-12  5:00 ` [Bug tree-optimization/101423] " marxin at gcc dot gnu.org
  2021-07-12  8:00 ` rguenth at gcc dot gnu.org
@ 2021-07-12  8:24 ` rguenth at gcc dot gnu.org
  2021-07-12  8:32 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-12  8:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so the issue is that there's no scalar trapping operation but
gimple_could_trap_p returns true for the internal function calls used by
SLP pattern recog, in this case .VEC_ADDSUB.  gimple_could_trap_p_1 just has

    case GIMPLE_CALL:
      t = gimple_call_fndecl (s);
      /* Assume that calls to weak functions may trap.  */
      if (!t || !DECL_P (t) || DECL_WEAK (t))
        return true;
      return false;

but internal functions do not have a decl.  I suppose this wants to test for
indirect calls in addition to calls to weak functions which means it's
off for internal functions.

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-07-12  8:24 ` rguenth at gcc dot gnu.org
@ 2021-07-12  8:32 ` rguenth at gcc dot gnu.org
  2021-07-12 10:18 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-12  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 51137
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51137&action=edit
patch

I am testing this patch which fixes the ICE.

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-07-12  8:32 ` rguenth at gcc dot gnu.org
@ 2021-07-12 10:18 ` cvs-commit at gcc dot gnu.org
  2021-07-12 10:19 ` rguenth at gcc dot gnu.org
  2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-12 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:123d0a597beb6d9865f808bf15b0d67f2a8fd5b2

commit r12-2243-g123d0a597beb6d9865f808bf15b0d67f2a8fd5b2
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jul 12 10:26:25 2021 +0200

    middle-end/101423 - internal calls do not trap

    This adjusts gimple_could_trap_p to not consider internal function
    calls to trap compared to indirect calls or calls to weak functions.

    2021-07-12  Richard Biener  <rguenther@suse.de>

            PR middle-end/101423
            * gimple.c (gimple_could_trap_p_1): Internal function calls
            do not trap.
            * tree-eh.c (tree_could_trap_p): Likewise.

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-07-12 10:18 ` cvs-commit at gcc dot gnu.org
@ 2021-07-12 10:19 ` rguenth at gcc dot gnu.org
  2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-12 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug tree-optimization/101423] [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba
  2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-07-12 10:19 ` rguenth at gcc dot gnu.org
@ 2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-13 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 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:2d90f3ed9c63926cb6f150aa0dcad4d16a4c16c7

commit r11-8723-g2d90f3ed9c63926cb6f150aa0dcad4d16a4c16c7
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jul 12 10:26:25 2021 +0200

    middle-end/101423 - internal calls do not trap

    This adjusts gimple_could_trap_p to not consider internal function
    calls to trap compared to indirect calls or calls to weak functions.

    2021-07-12  Richard Biener  <rguenther@suse.de>

            PR middle-end/101423
            * gimple.c (gimple_could_trap_p_1): Internal function calls
            do not trap.
            * tree-eh.c (tree_could_trap_p): Likewise.

    (cherry picked from commit 123d0a597beb6d9865f808bf15b0d67f2a8fd5b2)

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

end of thread, other threads:[~2021-07-13 10:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12  4:59 [Bug tree-optimization/101423] New: [12 Regression] ICE in vect_schedule_slp_node, at tree-vect-slp.c:7113 since r12-1951-ga3aaba68405751ba marxin at gcc dot gnu.org
2021-07-12  5:00 ` [Bug tree-optimization/101423] " marxin at gcc dot gnu.org
2021-07-12  8:00 ` rguenth at gcc dot gnu.org
2021-07-12  8:24 ` rguenth at gcc dot gnu.org
2021-07-12  8:32 ` rguenth at gcc dot gnu.org
2021-07-12 10:18 ` cvs-commit at gcc dot gnu.org
2021-07-12 10:19 ` rguenth at gcc dot gnu.org
2021-07-13 10:59 ` cvs-commit 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).