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

--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-02 19:42:30 
UTC ---
(In reply to comment #13)
> (In reply to comment #10)
> > Here is the problem:
> 
> No, in your case new insn is rejected (twice):
> 
> Trying 434 -> 435:
> Failed to match this instruction:
> (parallel [
>         (set (reg/f:SI 364)
>             (if_then_else:SI (eq:SI (reg:SI 442)
>                     (const_int 0 [0]))
>                 (const:SI (plus:SI (symbol_ref:SI ("iplane.1553") [flags 0x2] 
> <var_decl 0x7f9a07ef33c0 iplane>)
>                         (const_int -4 [0xfffffffffffffffc])))
>                 (const:SI (plus:SI (symbol_ref:SI ("iplane.1553") [flags 0x2] 
> <var_decl 0x7f9a07ef33c0 iplane>)
>                         (const_int 4 [0x4])))))
>         (clobber (reg:CC 17 flags))
>     ])
> Failed to match this instruction:
> (set (reg/f:SI 364)
>     (if_then_else:SI (eq:SI (reg:SI 442)
>             (const_int 0 [0]))
>         (const:SI (plus:SI (symbol_ref:SI ("iplane.1553") [flags 0x2] 
> <var_decl 0x7f9a07ef33c0 iplane>)
>                 (const_int -4 [0xfffffffffffffffc])))
>         (const:SI (plus:SI (symbol_ref:SI ("iplane.1553") [flags 0x2] 
> <var_decl 0x7f9a07ef33c0 iplane>)
>                 (const_int 4 [0x4])))))

When new insns (even if they are rejected) are generated, max_uid_known
is increased, which breaks combine due to the fixed arrays allocated
at the beginning of the combine pass:

 /* Allocate array for insn info.  */
  max_uid_known = get_max_uid ();
  uid_log_links = XCNEWVEC (struct insn_link *, max_uid_known + 1); 
  uid_insn_cost = XCNEWVEC (int, max_uid_known + 1); 
  gcc_obstack_init (&insn_link_obstack);

Reply via email to