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]

Re: Reload inheritance patch for PRE/POST INC/DEC



  In message <200001250143.RAA05540@netcom.com>you write:
  > 
  > This is my proposed patch for the bug I found in message:
  > 
  > http://gcc.gnu.org/ml/gcc-bugs/2000-01/msg00582.html
  > 
  > It required an additional patch to rtlanal.c because my toolchain is
  > generating weird RTXes with a clobber of nil when compiling mulsi3:
  > 
  > (insn:HI 35 33 37 (parallel[
  >             (set (reg:SF 26 fr2)
  >                 (mem/s:SF (plus:SI (reg/v:SI 8 r8)
  >                         (reg:SI 1 r1))))
  >             (use (reg/v:PSI 48 fpscr))
  >             (clobber (scratch:SI))
  >             ] ) 157 {movsf_ie} (insn_list 30 (nil))
  >     (expr_list:REG_DEAD (reg:SI 1 r1)
  >         (expr_list:REG_UNUSED (scratch:SI )
  >             (nil))))
  > 
  > Anyway, the patch is included below.
  > 
  > Toshi
  > 
  > 
  > Mon Jan 24 17:14:31 PST 2000  Toshiyasu Morita  (toshi.morita@sega.com)
  > 
  > 	* reload1.c (choose_reload_regs): Disallow reload inheritance if
  >         the insns has side effects.
  >         * rtlanal.c (side_effects_p): Handle null rtx pointers.
This seems wrong to me.

What I think should have happened is we should have wiped
reg_last_reload_reg clean since pseudo 4099 and hard register r9 no longer
have the same value after the auto-increment.  

There appears to be code to do this in reload_as_needed:

#ifdef AUTO_INC_DEC
          /* Likewise for regs altered by auto-increment in this insn.
             REG_INC notes have been changed by reloading:
             find_reloads_address_1 records substitutions for them,
             which have been performed by subst_reloads above.  */

But it's impossible to tell since you didn't actually post a testcase or
the precise revision of the compiler, so we can't do any real co-investigation
of the problem with you.

jeff


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