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: cfg merge part 19 - gcse tweek


> Jan Hubicka wrote:
> > The attached patch appears to do the trick.  i386 bootstrap is in
> > progress, OK if it suceeds?
> > 

OK, this looks like it fixes the problem and bootstraps/regtests i386

Wed Jun 19 19:28:26 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* gcse.c (gcse_emit_move_after): Use gen_move_insn to produce the move.
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcse.c,v
retrieving revision 1.205
diff -c -3 -p -r1.205 gcse.c
*** gcse.c	14 Jun 2002 16:25:35 -0000	1.205
--- gcse.c	19 Jun 2002 17:04:37 -0000
*************** gcse_emit_move_after (src, dest, insn)
*** 5144,5164 ****
       rtx src, dest, insn;
  {
    rtx new;
!   rtx set = single_set (insn);
    rtx note;
    rtx eqv;
  
    /* This should never fail since we're creating a reg->reg copy
       we've verified to be valid.  */
  
!   new = emit_insn_after (gen_rtx_SET (VOIDmode, dest, src), insn);
! 
!   /* want_to_gcse_p verifies that this move will be valid.  Still this call
!      is mandatory as it may create clobbers required by the pattern.  */
!   if (insn_invalid_p (insn))
!     abort ();
  
    /* Note the equivalence for local CSE pass.  */
    if ((note = find_reg_equal_equiv_note (insn)))
      eqv = XEXP (note, 0);
    else
--- 5144,5162 ----
       rtx src, dest, insn;
  {
    rtx new;
!   rtx set = single_set (insn), set2;
    rtx note;
    rtx eqv;
  
    /* This should never fail since we're creating a reg->reg copy
       we've verified to be valid.  */
  
!   new = emit_insn_after (gen_move_insn (dest, src), insn);
  
    /* Note the equivalence for local CSE pass.  */
+   set2 = single_set (new);
+   if (!set2 || !rtx_equal_p (set2, dest))
+     return new;
    if ((note = find_reg_equal_equiv_note (insn)))
      eqv = XEXP (note, 0);
    else


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