public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
@ 2012-10-31 20:25 zsojka at seznam dot cz
  2012-10-31 21:59 ` [Bug rtl-optimization/55153] " mpolacek at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2012-10-31 20:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

             Bug #: 55153
           Summary: [4.8 Regression] ICE: in begin_move_insn, at
                    sched-ebb.c:205 with -fsched2-use-superblocks and
                    __builtin_prefetch
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 28583
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28583
reduced testcase

Compiler output:
$ gcc -O -fsched2-use-superblocks -fschedule-insns2 testcase.c         
testcase.c: In function 'foo':
testcase.c:7:1: internal compiler error: in begin_move_insn, at sched-ebb.c:205
 }
 ^
0x110a092 begin_move_insn
        /mnt/svn/gcc-trunk/gcc/sched-ebb.c:205
0x10cc59c commit_schedule
        /mnt/svn/gcc-trunk/gcc/haifa-sched.c:5647
0x10cc59c schedule_block(basic_block_def**, void*)
        /mnt/svn/gcc-trunk/gcc/haifa-sched.c:6429
0x110a4f3 schedule_ebb(rtx_def*, rtx_def*, bool)
        /mnt/svn/gcc-trunk/gcc/sched-ebb.c:547
0x110b1f4 schedule_ebbs()
        /mnt/svn/gcc-trunk/gcc/sched-ebb.c:666
0x9b414c rest_of_handle_sched2
        /mnt/svn/gcc-trunk/gcc/sched-rgn.c:3565
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
@ 2012-10-31 21:59 ` mpolacek at gcc dot gnu.org
  2012-11-07 11:28 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-31 21:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-31
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-31 21:59:38 UTC ---
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=192719


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
  2012-10-31 21:59 ` [Bug rtl-optimization/55153] " mpolacek at gcc dot gnu.org
@ 2012-11-07 11:28 ` jakub at gcc dot gnu.org
  2012-11-08 13:13 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-07 11:28 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-07 11:28:13 UTC ---
I've tried to "fix" this similarly to PR48721:
--- sched-deps.c.jj2    2012-10-17 17:18:21.000000000 +0200
+++ sched-deps.c    2012-11-07 12:15:05.246124552 +0100
@@ -2907,7 +2907,10 @@ sched_analyze_insn (struct deps_desc *de
     {
       rtx next;
       next = next_nonnote_nondebug_insn (insn);
-      if (next && BARRIER_P (next))
+      /* Don't schedule anything after an unconditional return jump.  */
+      if (returnjump_p (insn) && ! condjump_p (insn))
+    reg_pending_barrier = TRUE_BARRIER;
+      else if (next && BARRIER_P (next))
     reg_pending_barrier = MOVE_BARRIER;
       else
     {
but that didn't help.  The difference between reload and LRA seems to be just
in that old reload emitted a deleted note after the prefetch for some reason,
and after adding simple_return jump and barrier after it that note was still
following the barrier, while with LRA there is no such deleted note at the end.
Still the scheduler seems to attempt to do DCE of the prefetch (why?  Isn't the
prefetch meaningful on its own?).  Vlad, can you please have a look?  Thanks.


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
  2012-10-31 21:59 ` [Bug rtl-optimization/55153] " mpolacek at gcc dot gnu.org
  2012-11-07 11:28 ` jakub at gcc dot gnu.org
@ 2012-11-08 13:13 ` jakub at gcc dot gnu.org
  2012-12-07 13:48 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-08 13:13 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2012-11-08 13:13 ` jakub at gcc dot gnu.org
@ 2012-12-07 13:48 ` rguenth at gcc dot gnu.org
  2013-01-14 19:45 ` vmakarov at redhat dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-07 13:48 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2012-12-07 13:48 ` rguenth at gcc dot gnu.org
@ 2013-01-14 19:45 ` vmakarov at redhat dot com
  2013-01-15 21:52 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: vmakarov at redhat dot com @ 2013-01-14 19:45 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #3 from Vladimir Makarov <vmakarov at redhat dot com> 2013-01-14 19:44:36 UTC ---
(In reply to comment #2)
>  Vlad, can you please have a look?  Thanks.
Ok, I started to work on this.


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2013-01-14 19:45 ` vmakarov at redhat dot com
@ 2013-01-15 21:52 ` jakub at gcc dot gnu.org
  2013-01-16 11:32 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-15 21:52 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-15 21:51:36 UTC ---
Thanks for working on this.  Unfortunately it seems the
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195211
change (commit message didn't make it into this PR because of an extra pr after
/ ) regressed i386/pr45352.c testcase on i?86.
./cc1 -m32 -O3 -march=amdfam10 -fselective-scheduling2 -fsel-sched-pipelining
-funroll-all-loops gcc.target/i386/pr45352.c
ICEs now with:
internal compiler error: in add_insn_mem_dependence, at sched-deps.c:1717


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2013-01-15 21:52 ` jakub at gcc dot gnu.org
@ 2013-01-16 11:32 ` jakub at gcc dot gnu.org
  2013-01-16 15:42 ` jakub at gcc dot gnu.org
  2021-08-27  6:46 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-16 11:32 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-16 11:31:51 UTC ---
Author: vmakarov
Date: Tue Jan 15 16:47:36 2013
New Revision: 195211

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195211
Log:
2013-01-15  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/pr55153
    * sched-deps.c (sched_analyze_2): Add pending reads for prefetch.

2013-01-15  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/pr55153
    * gcc.dg/pr55153.c: New.


Added:
    trunk/gcc/testsuite/gcc.dg/pr55153.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sched-deps.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2013-01-16 11:32 ` jakub at gcc dot gnu.org
@ 2013-01-16 15:42 ` jakub at gcc dot gnu.org
  2021-08-27  6:46 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-16 15:42 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55153

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-16 15:41:46 UTC ---
Fixed, the regression caused by the fix is tracked now as PR56005.


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

* [Bug rtl-optimization/55153] [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch
  2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2013-01-16 15:42 ` jakub at gcc dot gnu.org
@ 2021-08-27  6:46 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27  6:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 43056 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2021-08-27  6:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 20:25 [Bug rtl-optimization/55153] New: [4.8 Regression] ICE: in begin_move_insn, at sched-ebb.c:205 with -fsched2-use-superblocks and __builtin_prefetch zsojka at seznam dot cz
2012-10-31 21:59 ` [Bug rtl-optimization/55153] " mpolacek at gcc dot gnu.org
2012-11-07 11:28 ` jakub at gcc dot gnu.org
2012-11-08 13:13 ` jakub at gcc dot gnu.org
2012-12-07 13:48 ` rguenth at gcc dot gnu.org
2013-01-14 19:45 ` vmakarov at redhat dot com
2013-01-15 21:52 ` jakub at gcc dot gnu.org
2013-01-16 11:32 ` jakub at gcc dot gnu.org
2013-01-16 15:42 ` jakub at gcc dot gnu.org
2021-08-27  6:46 ` pinskia 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).