This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC build failed with your patch on 2000-09-29T11:50:00Z.


Jan Hubicka <jh@suse.cz> writes:

> > /sloth/delay/tbox/cvs-gcc/egcs/gcc/libgcc2.c: In function `__muldi3':
> > /sloth/delay/tbox/cvs-gcc/egcs/gcc/libgcc2.c:199: Internal compiler error in single_set_1, at rtlanal.c:881
> >    Please submit a full bug report.
> >    See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> 
> The problem seems to be caused by pattern:
> 
>  [(match_parallel 0 "any_operand"
>                   [(clobber (match_operand:SI 1 "register_operand" "=l"))
> 		   (use (match_operand:SI 2 "call_operand" "s"))
> 		   (set (match_operand:DF 3 "memory_operand" "=m")
> 			(match_operand:DF 4 "gpc_reg_operand" "f"))])]

> That breaks the rule requiring the USEs and CLOBBERs to be last in
> the parallel.  Is there some elegant way to "fix" such pattern, or
> is this pattern good example why I should avoid this requirement at
> single_set_1?  If so, I will send a patch shortly.  It increases the
> cost of single_set by factor of 3 on i386.

I don't think it's easily fixable.

What this recognizes is sequences like this:

(parallel [
  (clobber (reg:SI lr))
  (use (symbol_ref "._savef29"))
  (set (mem:DF (plus:SI (reg:SI 1) (const_int -32))) (reg:DF f31))
  (set (mem:DF (plus:SI (reg:SI 1) (const_int -40))) (reg:DF f30))
  (set (mem:DF (plus:SI (reg:SI 1) (const_int -48))) (reg:DF f29))
])

It gets away with using any_operand because the CLOBBER/USE/SET
sequence is distinctive.  If you wanted to move the CLOBBER and USE to
the end of the pattern, you would have to write a predicate to replace
any_operand.  You'd also have to write some code to extract the
symbol_ref name, because it's no longer detected by a match_operand.

Alternatively, you could simply assume that a PARALLEL that _starts_
with a CLOBBER or USE is not a single_set.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]