This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: stormy16: limit SI reload regs


> > One of our internal branches uncovered a failure (not reproducible in
> > fsf by coincidence) in divconst-2, whereby $r7 is used as the target
> > of an SI move, but that can't be split into two HI moves because $r8
> > can't be used that way after the split.  Reload chose $r7 because it's
> > in EIGHT_REGS but neglected to see if the mode required registers
> > outside that class.  I'm not sure if that's reload's fault or not, but
> > I did have success with the attached patch, which creates a sub-class
> > just for pre-split SI moves.  Comments?
> 
> Yes, this is what you're supposed to do in cases like this.

It doesn't quite work.  The problem is that someone is checking the
constraints more strictly between the time registers are selected for
reload and the time the insn is split.  No matter what the register
class, it sometimes picks the last register in the class, and fails.
I'm trying a variant now where we set the reload preference to
SEVEN_REGS but the constraint to EIGHT_REGS.  Hopefully it won't try
to use $r7 anyway.


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