public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
@ 2011-12-08 19:50 pinskia at gcc dot gnu.org
  2011-12-08 19:51 ` [Bug debug/51471] [4.7 Regression] " pinskia at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-08 19:50 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51471
           Summary: gcc.c-torture/execute/20040811-1.c and
                    gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g
                    on mips64-linux-gnu
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pinskia@gcc.gnu.org


/home/apinski/src/gcc-fsf/local/gcc/gcc/testsuite/gcc.c-torture/execute/20040811-1.c:
In function 'main':^M
/home/apinski/src/gcc-fsf/local/gcc/gcc/testsuite/gcc.c-torture/execute/20040811-1.c:19:1:
internal compiler error: in maybe_record_trace_start, at dwarf2cfi.c:2244^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
See <http://gcc.gnu.org/bugs.html> for instructions.^M

FAIL: gcc.c-torture/execute/20040811-1.c compilation,  -O3 -g  (internal
compiler error)
UNRESOLVED: gcc.c-torture/execute/20040811-1.c execution,  -O3 -g


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
@ 2011-12-08 19:51 ` pinskia at gcc dot gnu.org
  2011-12-08 19:54 ` pinskia at gcc dot gnu.org
                   ` (18 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-08 19:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |4.7.0
            Summary|gcc.c-torture/execute/20040 |[4.7 Regression]
                   |811-1.c and                 |gcc.c-torture/execute/20040
                   |gcc.c-torture/execute/vla-d |811-1.c and
                   |ealloc-1.c  fails at -O3 -g |gcc.c-torture/execute/vla-d
                   |on mips64-linux-gnu         |ealloc-1.c  fails at -O3 -g
                   |                            |on mips64-linux-gnu

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-08 19:50:26 UTC ---
This happens with either -mabi=64 or -mabi=n32.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
  2011-12-08 19:51 ` [Bug debug/51471] [4.7 Regression] " pinskia at gcc dot gnu.org
@ 2011-12-08 19:54 ` pinskia at gcc dot gnu.org
  2011-12-10  0:02 ` pinskia at gcc dot gnu.org
                   ` (17 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-08 19:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |mips64-linux

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-08 19:51:03 UTC ---
Compiler version: 4.7.0 20111208 (experimental) [trunk revision 182096] (GCC) 
Platform: mips64-unknown-linux-gnu
configure flags: --prefix=/home/apinski/local-gcc --target=mips64-linux-gnu
--host=mips64-linux-gnu --build=mips64-linux-gnu --enable-languages=c,c++
--with-mips-plt --with-arch=octeon+ --with-float=soft


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
  2011-12-08 19:51 ` [Bug debug/51471] [4.7 Regression] " pinskia at gcc dot gnu.org
  2011-12-08 19:54 ` pinskia at gcc dot gnu.org
@ 2011-12-10  0:02 ` pinskia at gcc dot gnu.org
  2011-12-10  3:18 ` pinskia at gcc dot gnu.org
                   ` (16 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-10  0:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-09 23:50:17 UTC ---
The scheduler after reload is what is causing dwarf2cfi to fail ...


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-10  0:02 ` pinskia at gcc dot gnu.org
@ 2011-12-10  3:18 ` pinskia at gcc dot gnu.org
  2011-12-12 12:48 ` vries at gcc dot gnu.org
                   ` (15 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-10  3:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-10 02:50:06 UTC ---
(insn 149 77 93 (sequence [
            (jump_insn:TI 82 77 121 (set (pc)
                    (if_then_else (ne (reg/v:SI 3 $3 [orig:210 n ] [210])
                            (reg:SI 7 $7 [255]))
                        (label_ref:SI 30)
                        (pc))) t.c:16 434 {*branch_equalitysi}
                 (expr_list:REG_BR_PRED (const_int 14 [0xe])
                    (expr_list:REG_EQUAL (if_then_else (ne (reg/v:SI 3 $3
[orig:210 n ] [210])
                                (const_int 1000000 [0xf4240]))
                            (label_ref:SI 30)
                            (pc))
                        (expr_list:REG_BR_PROB (const_int 9899 [0x26ab])
                            (nil))))
             -> 30)
            (insn/f:TI 121 82 93 (set (reg/f:SI 29 $sp)
                    (reg/f:SI 30 $fp)) 280 {*movsi_internal}
                 (expr_list:REG_CFA_DEF_CFA (plus:SI (reg/f:SI 29 $sp)
                        (const_int 32 [0x20]))
                    (nil)))
        ]) t.c:16 -1
     (nil))

Delay slot scheduling put the sp = fp in the delay slot of the branch.
It must have missed the following instruction:
(insn 33 32 34 (clobber (mem:BLK (reg/f:SI 29 $sp) [0 A8])) -1
     (nil))
Which should have caused it not to do that ...


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-12-10  3:18 ` pinskia at gcc dot gnu.org
@ 2011-12-12 12:48 ` vries at gcc dot gnu.org
  2011-12-12 13:12 ` mikpe at it dot uu.se
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2011-12-12 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

vries at gcc dot gnu.org changed:

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

--- Comment #5 from vries at gcc dot gnu.org 2011-12-12 12:45:53 UTC ---
I can reproduce this:

20040811-1.c.220r.vartrack:
...
(jump_insn:TI 82 77 93 3 (set (pc)
        (if_then_else (ne (reg/v:SI 3 $3 [orig:210 nD.1374 ] [210])
                (reg:SI 7 $7 [255]))
            (label_ref:SI 30)
            (pc))) 20040811-1.c:16 434 {*branch_equalitysi}
     (expr_list:REG_EQUAL (if_then_else (ne (reg/v:SI 3 $3 [orig:210 nD.1374 ]
[210])
                (const_int 1000000 [0xf4240]))
            (label_ref:SI 30)
            (pc))
        (expr_list:REG_BR_PROB (const_int 9899 [0x26ab])
            (nil)))
 -> 30)

(note 93 82 133 4 [bb 4] NOTE_INSN_BASIC_BLOCK)

(note 133 93 122 4 NOTE_INSN_EPILOGUE_BEG)

(insn 122 133 123 4 (clobber (mem/c:BLK (reg/f:SI 29 $sp) [4 A8]))
20040811-1.c:19 -1
     (nil))

(insn/f:TI 123 122 148 4 (set (reg/f:SI 29 $sp)
        (reg/f:SI 30 $fp)) 20040811-1.c:19 280 {*movsi_internal}
     (expr_list:REG_CFA_DEF_CFA (plus:SI (reg/f:SI 29 $sp)
            (const_int 32 [0x20]))
        (nil)))
...

20040811-1.c.221r.mach:
...
(insn 153 77 93 (sequence [
            (jump_insn:TI 82 77 123 (set (pc)
                    (if_then_else (ne (reg/v:SI 3 $3 [orig:210 nD.1374 ] [210])
                            (reg:SI 7 $7 [255]))
                        (label_ref:SI 30)
            (pc))) 20040811-1.c:16 434 {*branch_equalitysi}
                 (expr_list:REG_BR_PRED (const_int 14 [0xe])
                    (expr_list:REG_EQUAL (if_then_else (ne (reg/v:SI 3 $3
[orig:210 nD.1374 ] [210])
                (const_int 1000000 [0xf4240]))
                            (label_ref:SI 30)
                            (pc))
                        (expr_list:REG_BR_PROB (const_int 9899 [0x26ab])
                            (nil))))
             -> 30)
            (insn/f:TI 123 82 93 (set (reg/f:SI 29 $sp)
                    (reg/f:SI 30 $fp)) 280 {*movsi_internal}
                 (expr_list:REG_CFA_DEF_CFA (plus:SI (reg/f:SI 29 $sp)
                        (const_int 32 [0x20]))
                    (nil)))
        ]) 20040811-1.c:16 -1
     (nil))

(note 93 153 133 [bb 4] NOTE_INSN_BASIC_BLOCK)

(note 133 93 122 NOTE_INSN_EPILOGUE_BEG)

(insn 122 133 148 (clobber (mem/c:BLK (reg/f:SI 29 $sp) [4 A8]))
20040811-1.c:19 -1
     (nil))
...


This looks similar to PR51271.  In both cases, an insn from the epilogue is
moved to before the epilogue by delay slot scheduling during
pass_machine_reorg, which causes an inconsistent cfa state.

Indeed the clobber 122 reads $29 and the moved insn 123 sets $29, so if delay
slot scheduling would handle clobbers, that should have stopped it. But
resource.c:mark_referenced_resources seems to ignore standalone clobbers:
...
    case CLOBBER:
      return;
...

Furthermore, in PR51271 both insn 141 and insn 143 are moved before the
epilogue, but the insn causing the assert AFAIU is insn 141, which is both
before the clobber, and not interfering with the clobber:
...
(note 155 81 141 9 NOTE_INSN_EPILOGUE_BEG)

(insn 141 155 142 9 (set (reg:DI 28 $28)
        (mem/c:DI (plus:SI (reg/f:SI 29 $sp)
                (const_int 8 [0x8])) [4 S8 A64])) res_hconf.c:11 278
{*movdi_64bit}
     (nil))

(insn 142 141 143 9 (clobber (mem/c:BLK (reg/f:SI 29 $sp) [4 A8]))
res_hconf.c:11 -1
     (nil))

(insn/f 143 142 89 9 (set (reg/f:SI 29 $sp)
        (plus:SI (reg/f:SI 29 $sp)
            (const_int 16 [0x10]))) res_hconf.c:11 10 {*addsi3}
     (expr_list:REG_CFA_DEF_CFA (reg/f:SI 29 $sp)
        (expr_list:REG_CFA_RESTORE (reg:DI 28 $28)
            (nil))))
...

So my question is: what is the mechanism that should prevent epilogue insns
from being moved to before the epilogue?


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-12-12 12:48 ` vries at gcc dot gnu.org
@ 2011-12-12 13:12 ` mikpe at it dot uu.se
  2011-12-14 17:27 ` vries at gcc dot gnu.org
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: mikpe at it dot uu.se @ 2011-12-12 13:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Mikael Pettersson <mikpe at it dot uu.se> 2011-12-12 13:10:33 UTC ---
(In reply to comment #5)
> So my question is: what is the mechanism that should prevent epilogue insns
> from being moved to before the epilogue?

A full compiler barrier?  See PR38644 for an epilogue scheduling bug on ARM
Thumb-1 that got fixed by prefixing the epilogue with a barrier.  That PR also
refers to an older PowerPC bug that was fixed in a similar way.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-12-12 13:12 ` mikpe at it dot uu.se
@ 2011-12-14 17:27 ` vries at gcc dot gnu.org
  2011-12-14 18:19 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2011-12-14 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

vries at gcc dot gnu.org changed:

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

--- Comment #7 from vries at gcc dot gnu.org 2011-12-14 17:04:46 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > So my question is: what is the mechanism that should prevent epilogue insns
> > from being moved to before the epilogue?
> 
> A full compiler barrier?  See PR38644 for an epilogue scheduling bug on ARM
> Thumb-1 that got fixed by prefixing the epilogue with a barrier.  That PR also
> refers to an older PowerPC bug that was fixed in a similar way.

Richard,

this tentative patch fixes both PR51471 and PR51271:
...
Index: src/gcc-mainline/gcc/config/mips/mips.c
===================================================================
--- src/gcc-mainline/gcc/config/mips/mips.c (revision 181878)
+++ src/gcc-mainline/gcc/config/mips/mips.c (working copy)
@@ -10400,6 +10400,9 @@ mips_expand_epilogue (bool sibcall_p)
       return;
     }

+  if (dwarf2out_do_frame ())
+    emit_insn (gen_blockage ());
+
   /* In MIPS16 mode, if the return value should go into a floating-point
      register, we need to call a helper routine to copy it over.  */
   if (mips16_cfun_returns_in_fpr_p ())
...

Is the proper way to fix these PRs?

Thanks,
- Tom


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-12-14 17:27 ` vries at gcc dot gnu.org
@ 2011-12-14 18:19 ` jakub at gcc dot gnu.org
  2011-12-14 20:28 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-14 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-14 17:26:34 UTC ---
I don't think so, dwarf2out_do_frame () depends on (or may depend on) whether
compiling with -g or -g0.  So, doing code generation decisions based on it is
wrong, -fcompare-debug will then fail and generated code will be different
between -g and -g0.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-12-14 18:19 ` jakub at gcc dot gnu.org
@ 2011-12-14 20:28 ` pinskia at gcc dot gnu.org
  2011-12-14 20:29 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-14 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-12-14
         AssignedTo|unassigned at gcc dot       |pinskia at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-14 20:27:14 UTC ---
I am working on this, Using http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50283
as a base and expending it to be generic.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-12-14 20:28 ` pinskia at gcc dot gnu.org
@ 2011-12-14 20:29 ` pinskia at gcc dot gnu.org
  2011-12-14 23:09 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-14 20:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-14 20:28:34 UTC ---
*** Bug 51536 has been marked as a duplicate of this bug. ***


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2011-12-14 20:29 ` pinskia at gcc dot gnu.org
@ 2011-12-14 23:09 ` pinskia at gcc dot gnu.org
  2011-12-16 20:12 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-14 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-14 22:58:55 UTC ---
This is the patch which I am testing:
Index: genattrtab.c
===================================================================
--- genattrtab.c        (revision 182342)
+++ genattrtab.c        (working copy)
@@ -4280,6 +4280,11 @@ write_eligible_delay (const char *kind)
   printf ("  if (!INSN_P (candidate_insn))\n");
   printf ("    return 0;\n");
   printf ("\n");
+  /* Frame related instructions are hard to put in the delay slot for
+     debugging info reasons. */
+  printf ("  if (RTX_FRAME_RELATED_P (candidate_insn))\n");
+  printf ("    return 0;\n");
+  printf ("\n");

   /* If more than one delay type, find out which type the delay insn is.  */


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2011-12-14 23:09 ` pinskia at gcc dot gnu.org
@ 2011-12-16 20:12 ` pinskia at gcc dot gnu.org
  2011-12-19 13:35 ` vries at gcc dot gnu.org
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-16 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-16 20:07:23 UTC ---
(In reply to comment #11)
> This is the patch which I am testing:

I ran into a bootstrap miscompare which is caused by an assembler bug
(http://sourceware.org/bugzilla/show_bug.cgi?id=13509).


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2011-12-16 20:12 ` pinskia at gcc dot gnu.org
@ 2011-12-19 13:35 ` vries at gcc dot gnu.org
  2012-01-04 13:40 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2011-12-19 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from vries at gcc dot gnu.org 2011-12-19 13:23:41 UTC ---
(In reply to comment #11)
> This is the patch which I am testing:
> Index: genattrtab.c
> ===================================================================
> --- genattrtab.c        (revision 182342)
> +++ genattrtab.c        (working copy)
> @@ -4280,6 +4280,11 @@ write_eligible_delay (const char *kind)
>    printf ("  if (!INSN_P (candidate_insn))\n");
>    printf ("    return 0;\n");
>    printf ("\n");
> +  /* Frame related instructions are hard to put in the delay slot for
> +     debugging info reasons. */
> +  printf ("  if (RTX_FRAME_RELATED_P (candidate_insn))\n");
> +  printf ("    return 0;\n");
> +  printf ("\n");
> 
>    /* If more than one delay type, find out which type the delay insn is.  */

What is the exact reason we're completely avoiding scheduling frame-related
insns in delay slots? Why don't we try to fix it like this?:
...
Index: src/gcc-mainline/gcc/reorg.c
===================================================================
--- src/gcc-mainline/gcc/reorg.c (revision 182341)
+++ src/gcc-mainline/gcc/reorg.c (working copy)
@@ -2716,7 +2716,7 @@ fill_slots_from_thread (rtx insn, rtx co
       if (!must_annul
           && (condition == const_true_rtx
               || (! insn_sets_resource_p (trial, &opposite_needed, true)
-              && ! may_trap_or_fault_p (pat))))
+              && ! may_trap_or_fault_p (pat) && !RTX_FRAME_RELATED_P
(trial))))
         {
           old_trial = trial;
           trial = try_split (pat, trial, 0);
...
AFAIU, the only thing causing problems is frame-related insns being speculated.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2011-12-19 13:35 ` vries at gcc dot gnu.org
@ 2012-01-04 13:40 ` rguenth at gcc dot gnu.org
  2012-01-04 20:01 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-04 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2012-01-04 13:40 ` rguenth at gcc dot gnu.org
@ 2012-01-04 20:01 ` pinskia at gcc dot gnu.org
  2012-01-04 21:43 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-04 20:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-04 20:00:06 UTC ---
(In reply to comment #13)
> AFAIU, the only thing causing problems is frame-related insns being speculated.

Yes this patch seems more correct.  I will submit it after a bootstrap/test on
mips64-linux-gnu.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2012-01-04 20:01 ` pinskia at gcc dot gnu.org
@ 2012-01-04 21:43 ` vries at gcc dot gnu.org
  2012-01-04 22:25 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2012-01-04 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from vries at gcc dot gnu.org 2012-01-04 21:43:29 UTC ---
(In reply to comment #14)
> (In reply to comment #13)
> > AFAIU, the only thing causing problems is frame-related insns being speculated.
> 
> Yes this patch seems more correct.  I will submit it after a bootstrap/test on
> mips64-linux-gnu.

I still wonder though why Richard Henderson says in PR50283 comment 9: We're
supposed to prevent frame-related insns from appearing in branch delay slots.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2012-01-04 21:43 ` vries at gcc dot gnu.org
@ 2012-01-04 22:25 ` pinskia at gcc dot gnu.org
  2012-01-08 14:13 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  19 siblings, 0 replies; 21+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-04 22:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-04 22:24:34 UTC ---
(In reply to comment #15)
> I still wonder though why Richard Henderson says in PR50283 comment 9: We're
> supposed to prevent frame-related insns from appearing in branch delay slots.

I think the main reason is it is hard to describe it in cfi's in a branch delay
slot.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2012-01-04 22:25 ` pinskia at gcc dot gnu.org
@ 2012-01-08 14:13 ` vries at gcc dot gnu.org
  2012-01-10  8:50 ` vries at gcc dot gnu.org
  2012-01-10  8:55 ` vries at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2012-01-08 14:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from vries at gcc dot gnu.org 2012-01-08 14:13:19 UTC ---
Submitted http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00363.html


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2012-01-08 14:13 ` vries at gcc dot gnu.org
@ 2012-01-10  8:50 ` vries at gcc dot gnu.org
  2012-01-10  8:55 ` vries at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2012-01-10  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from vries at gcc dot gnu.org 2012-01-10 08:49:50 UTC ---
Author: vries
Revision: 183038
Modified property: svn:log

Modified: svn:log at Tue Jan 10 08:49:45 2012
------------------------------------------------------------------------------
--- svn:log (original)
+++ svn:log Tue Jan 10 08:49:45 2012
@@ -1,4 +1,5 @@
 2012-01-09  Tom de Vries  <tom@codesourcery.com>
         Andrew Pinski  <apinski@cavium.com>

+    PR debug/51471
     * reorg.c (fill_slots_from_thread): Don't speculate frame-related insns.


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

* [Bug debug/51471] [4.7 Regression] gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c  fails at -O3 -g on mips64-linux-gnu
  2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2012-01-10  8:50 ` vries at gcc dot gnu.org
@ 2012-01-10  8:55 ` vries at gcc dot gnu.org
  19 siblings, 0 replies; 21+ messages in thread
From: vries at gcc dot gnu.org @ 2012-01-10  8:55 UTC (permalink / raw)
  To: gcc-bugs

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

vries at gcc dot gnu.org changed:

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

--- Comment #19 from vries at gcc dot gnu.org 2012-01-10 08:54:45 UTC ---
Patch committed in r183038.


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

end of thread, other threads:[~2012-01-10  8:55 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-08 19:50 [Bug debug/51471] New: gcc.c-torture/execute/20040811-1.c and gcc.c-torture/execute/vla-dealloc-1.c fails at -O3 -g on mips64-linux-gnu pinskia at gcc dot gnu.org
2011-12-08 19:51 ` [Bug debug/51471] [4.7 Regression] " pinskia at gcc dot gnu.org
2011-12-08 19:54 ` pinskia at gcc dot gnu.org
2011-12-10  0:02 ` pinskia at gcc dot gnu.org
2011-12-10  3:18 ` pinskia at gcc dot gnu.org
2011-12-12 12:48 ` vries at gcc dot gnu.org
2011-12-12 13:12 ` mikpe at it dot uu.se
2011-12-14 17:27 ` vries at gcc dot gnu.org
2011-12-14 18:19 ` jakub at gcc dot gnu.org
2011-12-14 20:28 ` pinskia at gcc dot gnu.org
2011-12-14 20:29 ` pinskia at gcc dot gnu.org
2011-12-14 23:09 ` pinskia at gcc dot gnu.org
2011-12-16 20:12 ` pinskia at gcc dot gnu.org
2011-12-19 13:35 ` vries at gcc dot gnu.org
2012-01-04 13:40 ` rguenth at gcc dot gnu.org
2012-01-04 20:01 ` pinskia at gcc dot gnu.org
2012-01-04 21:43 ` vries at gcc dot gnu.org
2012-01-04 22:25 ` pinskia at gcc dot gnu.org
2012-01-08 14:13 ` vries at gcc dot gnu.org
2012-01-10  8:50 ` vries at gcc dot gnu.org
2012-01-10  8:55 ` vries 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).