PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

Ulrich Weigand uweigand@de.ibm.com
Mon Jun 27 18:51:00 GMT 2011


H.J. Lu wrote:
> On Mon, Jun 27, 2011 at 7:47 AM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > The actual problem
> > here is that this part of gen_reload takes the approach to transform
> >
> >  out <- op0 + op1
> >
> > into
> >
> >  out <- op0
> >  out <- out + op1
> >
> > which is invalid if writing to out clobbers op1.

> The problem is reload 0 puts OP1 in OUT. Adding
> 
> gcc_assert (!reg_overlap_mentioned_p (out, op1));
> 
> doesn't help in reload 2.  How can I check if OP1 overlaps with
> OUT in previous reload?

Sorry, I don't understand how previous reloads come into play here.
gen_reload is supposed to load "in" (which happens to be of the
form op0 + op1) into "out", which means it is of course supposed
to clobber "out" (as long as that doesn't implictly clobber op0
or op1 before they're used).  Any conflicts with other reloads ought
to have been resolved earlier.

Can you elaborate?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list