public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
@ 2022-07-22  3:24 asolokha at gmx dot com
  2022-07-22  7:13 ` [Bug tree-optimization/106397] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: asolokha at gmx dot com @ 2022-07-22  3:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106397
           Summary: [13 Regression] ICE in check_loop_closed_ssa_def, at
                    tree-ssa-loop-manip.cc:645
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: x86_64-pc-linux-gnu

gcc 13.0.0 20220717 snapshot (g:7bcd7f47359b903bf7a193b95d4450d9d69c60ba) ICEs
when compiling the following testcase w/ -O3 -march=k8-sse3 --param
l2-cache-size=0 --param prefetch-latency=3:

int
bar (void)
{
  /* No return statement. */
}

__attribute__ ((simd)) int
foo (void)
{
  if (bar ())
    return 0;

  __builtin_unreachable ();
}

% x86_64-pc-linux-gnu-gcc-13.0.0 -O3 -march=k8-sse3 --param l2-cache-size=0
--param prefetch-latency=3 -c q9jpcpot.c
during GIMPLE pass: aprefetch
q9jpcpot.c: In function 'foo.simdclone.7':
q9jpcpot.c:8:1: internal compiler error: in check_loop_closed_ssa_def, at
tree-ssa-loop-manip.cc:645
    8 | foo (void)
      | ^~~
0x773567 check_loop_closed_ssa_def
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220717/work/gcc-13-20220717/gcc/tree-ssa-loop-manip.cc:645
0x1063824 check_loop_closed_ssa_bb
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220717/work/gcc-13-20220717/gcc/tree-ssa-loop-manip.cc:659
0x1064b86 verify_loop_closed_ssa(bool, loop*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220717/work/gcc-13-20220717/gcc/tree-ssa-loop-manip.cc:695
0x1064b86 verify_loop_closed_ssa(bool, loop*)
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220717/work/gcc-13-20220717/gcc/tree-ssa-loop-manip.cc:679
0xdf2b34 execute_function_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220717/work/gcc-13-20220717/gcc/passes.cc:2109
0xdf2f0c execute_todo
       
/var/tmp/portage/sys-devel/gcc-13.0.0_p20220717/work/gcc-13-20220717/gcc/passes.cc:2145

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

* [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645
  2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
@ 2022-07-22  7:13 ` rguenth at gcc dot gnu.org
  2022-07-22  7:38 ` [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-22  7:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
   Last reconfirmed|                            |2022-07-22
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1
             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/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e
  2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
  2022-07-22  7:13 ` [Bug tree-optimization/106397] " rguenth at gcc dot gnu.org
@ 2022-07-22  7:38 ` marxin at gcc dot gnu.org
  2022-07-22  7:58 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-07-22  7:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
            Summary|[13 Regression] ICE in      |[13 Regression] ICE in
                   |check_loop_closed_ssa_def,  |check_loop_closed_ssa_def,
                   |at                          |at
                   |tree-ssa-loop-manip.cc:645  |tree-ssa-loop-manip.cc:645
                   |                            |since
                   |                            |r13-1450-gd2a898666609452e

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Btw. started with r13-1450-gd2a898666609452e.

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

* [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e
  2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
  2022-07-22  7:13 ` [Bug tree-optimization/106397] " rguenth at gcc dot gnu.org
  2022-07-22  7:38 ` [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e marxin at gcc dot gnu.org
@ 2022-07-22  7:58 ` rguenth at gcc dot gnu.org
  2022-07-22  9:26 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-22  7:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
The prefetching pass puts a __builtin_ia32_mfence () before the
__builtin_unreachable () at the loop exit.  IIRC there's a related bug that
while return statements have a VUSE alternate "function returns" may lack them
(that includes some EH related returns as well).

Since the function eventually splits loop exit edges it breaks LC SSA anyway
(that's a latent issue I think).

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

* [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e
  2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-07-22  7:58 ` rguenth at gcc dot gnu.org
@ 2022-07-22  9:26 ` cvs-commit at gcc dot gnu.org
  2022-07-22  9:27 ` rguenth at gcc dot gnu.org
  2022-07-27 10:01 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-22  9:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:b2e99bb6900f33f46a0f4ca6ae94b8a39b0b9bb1

commit r13-1794-gb2e99bb6900f33f46a0f4ca6ae94b8a39b0b9bb1
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jul 22 09:57:38 2022 +0200

    tree-optimization/106397 - array prefetch and LC SSA

    The following fixes maintaining LC SSA when array prefetch inserts
    mfence instructions on loop exits that do not use memory.  It also
    fixes the latent issue that it might split exit edges for this
    which will break LC SSA for non-virtuals as well.  It should also
    make the process cheaper by accumulating the required (LC) SSA
    update until the end of the pass.

            PR tree-optimization/106397
            * tree-ssa-loop-prefetch.cc (emit_mfence_after_loop): Do
            not update SSA form here.
            (mark_nontemporal_stores): Return whether we marked any
            non-temporal stores and inserted mfence.
            (loop_prefetch_arrays): Note when we need to update SSA.
            (tree_ssa_prefetch_arrays): Perform required (LC) SSA update
            at the end of the pass.

            * gcc.dg/pr106397.c: New testcase.

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

* [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e
  2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-07-22  9:26 ` cvs-commit at gcc dot gnu.org
@ 2022-07-22  9:27 ` rguenth at gcc dot gnu.org
  2022-07-27 10:01 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-22  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e
  2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-07-22  9:27 ` rguenth at gcc dot gnu.org
@ 2022-07-27 10:01 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-07-27 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:3044a7a824981496875acc6debf467fb904c55f2

commit r13-1853-g3044a7a824981496875acc6debf467fb904c55f2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jul 27 12:00:36 2022 +0200

    testsuite: Add extra ia32 options so that -fprefetch-loop-arrays works
[PR106397]

    -fprefetch-loop-arrays isn't supported on ia32 with just -march=i386 and
    similar, the following patch adds extra options similar testcases use.

    2022-07-27  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/106397
            * gcc.dg/pr106397.c: For ia32, add dg-additional-options
            -march=i686 -msse.

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

end of thread, other threads:[~2022-07-27 10:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22  3:24 [Bug tree-optimization/106397] New: [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 asolokha at gmx dot com
2022-07-22  7:13 ` [Bug tree-optimization/106397] " rguenth at gcc dot gnu.org
2022-07-22  7:38 ` [Bug tree-optimization/106397] [13 Regression] ICE in check_loop_closed_ssa_def, at tree-ssa-loop-manip.cc:645 since r13-1450-gd2a898666609452e marxin at gcc dot gnu.org
2022-07-22  7:58 ` rguenth at gcc dot gnu.org
2022-07-22  9:26 ` cvs-commit at gcc dot gnu.org
2022-07-22  9:27 ` rguenth at gcc dot gnu.org
2022-07-27 10:01 ` 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).