This is the mail archive of the 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: Reload bug

> How it did detected that?

  /* If the outer part is a word or smaller, INNER larger than a
     word and the number of regs for INNER is not the same as the
     number of words in INNER, then INNER will need reloading.  */
  return (GET_MODE_SIZE (mode) <= UNITS_PER_WORD
	      != HARD_REGNO_NREGS (REGNO (inner), GET_MODE (inner))))

> I believe it is just pessimization masking a bug as currently there is no
> way how to realize that subreg:SI of MMX with offset 4 register is not 
> valid (and with offset 0 is).

Of course, it's pessimization when offset ==0, but it's correctness when 
offset == 4. As for the choice between correctness and pessimization...

> It should not get recognized earlier than in reload as we should not
> allocate value with subreg undoable in MMX register into MMX register
> (unless rest of insns dictates otherwise).  We've chatted about this
> with Richard

Then the culprit is local alloc.

> No, it is valid for high parts too as long as the register is possible
> (imagine the xmm being replaced by eax).  I think we can add extra test
> realizing how large the registers are when index is nonzero.  This will
> get bit tricky to get right when indexes are nonzero for lowparts.

Then why not use ! lowpart?

Eric Botcazou

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