public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/26087]  New: [4.2 Regression] ICE in df_find_use
@ 2006-02-03  3:44 pinskia at gcc dot gnu dot org
  2006-02-03  3:44 ` [Bug rtl-optimization/26087] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-03  3:44 UTC (permalink / raw)
  To: gcc-bugs

I was going to do a --enable-checking=release buil to test some compile time
preformance but I ran into an ICE.  This does not happen on a
----enable-checking=yes build because the source is different
but the testcase is reproduce there.

The last time the reduced testcase (and full source, ifcvt.c) is known to work
is rev 110452.
I am testing with rev 110522.

Any trying to reduce this further causes the ICE to go away as the order of the
BBs have change but that seem wrong in general.   This is a real blocker as it
means when we branch the bootstrap starts to fail.

Reduced testcase:
extern void fancy_abort (void) __attribute__ ((__noreturn__));
typedef struct edge_def {
  int dest;
  int flags;
}*edge;
typedef struct {
  int **container;
}edge_iterator;
static __inline__ unsigned char ei_cond (edge_iterator ei3, edge *p)
{
  if (!ei_end_p (ei3))
    return 1;
  *p = 0;
  return 0;
}
int block_fallthru (edge_iterator ei1, edge e)
{
  while (ei_cond ((ei1), &(e)))
    {
      if (e->flags & 1)
        break;
      edge_iterator ei2 = ei1;
      if (!(ei2.container))
        fancy_abort ();
    }
  return (e) ? e->dest : 0;
}


-- 
           Summary: [4.2 Regression] ICE in df_find_use
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, build
          Severity: blocker
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc-darwin


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
@ 2006-02-03  3:44 ` pinskia at gcc dot gnu dot org
  2006-02-03  3:48 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-03  3:44 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
   Target Milestone|---                         |4.2.0


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
  2006-02-03  3:44 ` [Bug rtl-optimization/26087] " pinskia at gcc dot gnu dot org
@ 2006-02-03  3:48 ` pinskia at gcc dot gnu dot org
  2006-02-03 13:57 ` rakdver at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-03  3:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-02-03 03:48 -------
Here is the backtrace:
#0  0x00664238 in df_find_use (df=0x41a06a70, insn=0x4281c4b0, reg=0x428a9780)
at /Users/pinskia/src/gcc/local/gcc/gcc/df-core.c:1030
#1  0x004a0418 in iv_analyze (insn=0x4281c4b0, val=0x428a9780, iv=0xbffff310)
at /Users/pinskia/src/gcc/local/gcc/gcc/loop-iv.c:1149
#2  0x004a2b5c in iv_number_of_iterations (loop=0x41a065c0, insn=0x4281c4b0,
condition=0x428b9588, desc=0xbffff500) at
/Users/pinskia/src/gcc/local/gcc/gcc/loop-iv.c:2034
#3  0x004a43d4 in check_simple_exit (loop=0x41a065c0, e=0x4281c320,
desc=0xbffff500) at /Users/pinskia/src/gcc/local/gcc/gcc/loop-iv.c:2582
#4  0x004a44d0 in find_simple_exit (loop=0x41a065c0, desc=0x41a071f0) at
/Users/pinskia/src/gcc/local/gcc/gcc/loop-iv.c:2607
#5  0x004a4898 in get_simple_loop_desc (loop=0x41a065c0) at
/Users/pinskia/src/gcc/local/gcc/gcc/loop-iv.c:2685
#6  0x006a86ec in doloop_optimize (loop=0x41a065c0) at
/Users/pinskia/src/gcc/local/gcc/gcc/loop-doloop.c:462
#7  0x006a8d00 in doloop_optimize_loops (loops=0x41a05f70) at
/Users/pinskia/src/gcc/local/gcc/gcc/loop-doloop.c:583
#8  0x005ea630 in rtl_doloop () at
/Users/pinskia/src/gcc/local/gcc/gcc/loop-init.c:357


-- 


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
  2006-02-03  3:44 ` [Bug rtl-optimization/26087] " pinskia at gcc dot gnu dot org
  2006-02-03  3:48 ` pinskia at gcc dot gnu dot org
@ 2006-02-03 13:57 ` rakdver at gcc dot gnu dot org
  2006-02-03 14:14 ` rakdver at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-03 13:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rakdver at gcc dot gnu dot org  2006-02-03 13:57 -------
The code looks like

(insn 86 85 77 2 (set (reg:CC 127)
        (compare:CC (reg/v:SI 125 [ ei1 ])
            (const_int 0 [0x0]))) -1 (nil)
    (nil))

(note 77 86 18 2 NOTE_INSN_LOOP_BEG)
...
a lot of insns
...
(jump_insn 21 18 88 3 (set (pc)
        (if_then_else (ne (reg:CC 127)
                (const_int 0 [0x0]))
            (label_ref:SI 88)
            (pc))) 405 {*rs6000.md:13340} (nil)
    (expr_list:REG_BR_PROB (const_int 9900 [0x26ac])
        (nil)))

The exit is invariant and insn is outside of the loop. But,
get_condition will identify it as the source of the reg:CC 127
value, which causes the ice as we did not scan insns outside
of the loop for df information.

What get_condition does seems wrong to me -- it does not check cfg
at all, in particular it ignores the backedge of the loop.  I think
the proper fix is to stop get_condition at the start of a basic block
in case it has more than one predecessor.


-- 


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-02-03 13:57 ` rakdver at gcc dot gnu dot org
@ 2006-02-03 14:14 ` rakdver at gcc dot gnu dot org
  2006-02-03 19:14 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-03 14:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rakdver at gcc dot gnu dot org  2006-02-03 14:14 -------
The things are a bit more complicated -- get_condition would be correct,
but in cfglayout mode, some labels and jumps are omitted, and the order of
blocks is arbitrary.


-- 


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-02-03 14:14 ` rakdver at gcc dot gnu dot org
@ 2006-02-03 19:14 ` pinskia at gcc dot gnu dot org
  2006-02-04 21:30 ` rakdver at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-03 19:14 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-03 19:14:40
               date|                            |


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-02-03 19:14 ` pinskia at gcc dot gnu dot org
@ 2006-02-04 21:30 ` rakdver at gcc dot gnu dot org
  2006-02-05 14:58 ` rakdver at gcc dot gnu dot org
  2006-02-05 15:29 ` rakdver at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-04 21:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rakdver at gcc dot gnu dot org  2006-02-04 21:30 -------
Patch:

http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00333.html


-- 

rakdver at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2006-
                   |                            |02/msg00333.html
           Keywords|                            |patch


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-02-04 21:30 ` rakdver at gcc dot gnu dot org
@ 2006-02-05 14:58 ` rakdver at gcc dot gnu dot org
  2006-02-05 15:29 ` rakdver at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-05 14:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rakdver at gcc dot gnu dot org  2006-02-05 14:58 -------
Subject: Bug 26087

Author: rakdver
Date: Sun Feb  5 14:58:07 2006
New Revision: 110614

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110614
Log:
        PR rtl-optimization/26087
        * rtlanal.c (canonicalize_condition): Do not cross basic block
        boundaries.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/rtlanal.c


-- 


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


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

* [Bug rtl-optimization/26087] [4.2 Regression] ICE in df_find_use
  2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-02-05 14:58 ` rakdver at gcc dot gnu dot org
@ 2006-02-05 15:29 ` rakdver at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-02-05 15:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rakdver at gcc dot gnu dot org  2006-02-05 15:29 -------
Fixed.


-- 

rakdver at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-02-05 15:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03  3:44 [Bug rtl-optimization/26087] New: [4.2 Regression] ICE in df_find_use pinskia at gcc dot gnu dot org
2006-02-03  3:44 ` [Bug rtl-optimization/26087] " pinskia at gcc dot gnu dot org
2006-02-03  3:48 ` pinskia at gcc dot gnu dot org
2006-02-03 13:57 ` rakdver at gcc dot gnu dot org
2006-02-03 14:14 ` rakdver at gcc dot gnu dot org
2006-02-03 19:14 ` pinskia at gcc dot gnu dot org
2006-02-04 21:30 ` rakdver at gcc dot gnu dot org
2006-02-05 14:58 ` rakdver at gcc dot gnu dot org
2006-02-05 15:29 ` rakdver at gcc dot gnu dot 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).