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]

[lno] Fix for PR14658


Hello,

this patch fixes the bug in invariant motion causing 
PR optimization/14658.

Zdenek

Index: ChangeLog.lno
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.lno,v
retrieving revision 1.1.2.92
diff -c -3 -p -r1.1.2.92 ChangeLog.lno
*** ChangeLog.lno	18 Mar 2004 22:49:33 -0000	1.1.2.92
--- ChangeLog.lno	19 Mar 2004 23:38:07 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 2004-03-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+ 
+ 	PR optimization/14658
+ 	* loop-invariant.c (move_invariant_reg): Handle assignments
+ 	with nontrivial lhs correctly.
+ 
  2004-03-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
  
  	* df.c (df_reg_def_chain_create, df_reg_use_chain_create): Do not clean
Index: loop-invariant.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/loop-invariant.c,v
retrieving revision 1.1.4.4
diff -c -3 -p -r1.1.4.4 loop-invariant.c
*** loop-invariant.c	12 Mar 2004 01:28:29 -0000	1.1.4.4
--- loop-invariant.c	19 Mar 2004 23:38:07 -0000
*************** move_invariant_reg (struct loop *loop, u
*** 800,809 ****
    /* Replace the uses we know to be dominated.  It saves work for copy
       propagation, and also it is necessary so that dependent invariants
       are computed right.  */
!   for (use = inv->def->uses; use; use = use->next)
      {
!       *use->pos = reg;
!       df_insn_modify (df, BLOCK_FOR_INSN (use->insn), use->insn);
      }
  }
  
--- 800,812 ----
    /* Replace the uses we know to be dominated.  It saves work for copy
       propagation, and also it is necessary so that dependent invariants
       are computed right.  */
!   if (inv->def)
      {
!       for (use = inv->def->uses; use; use = use->next)
! 	{
! 	  *use->pos = reg;
! 	  df_insn_modify (df, BLOCK_FOR_INSN (use->insn), use->insn);
! 	}
      }
  }
  


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