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]

RFA: fix rtl-optimization/20370


I have successfully bootstrapped/build and regtested this patch on i686-pc-linux-gnu native
and i686-pc-linux-gnu X sh-elf in the sh-elf-4_1-branch.
2004-07-08  J"orn Rennecke <joern.rennecke@superh.com>

	PR rtl-optimization/20370
	* ifcvt.c (dead_or_predicable): Before calling propagate_block,
	call allocate_reg_info if necessary.

Index: gcc/ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.136.4.1
diff -d -u -p -r1.136.4.1 ifcvt.c
--- gcc/ifcvt.c	19 Jun 2004 19:08:44 -0000	1.136.4.1
+++ gcc/ifcvt.c	24 Feb 2005 17:04:23 -0000
@@ -3077,7 +3193,15 @@ dead_or_predicable (basic_block test_bb,
       /* ??? bb->local_set is only valid during calculate_global_regs_live,
 	 so we must recompute usage for MERGE_BB.  Not so bad, I suppose,
          since we've already asserted that MERGE_BB is small.  */
+      /* If we allocated new pseudos (e.g. in the conditional move
+	 expander called from noce_emit_cmove), we must resize the
+	 array first.  */
+      if (max_regno < max_reg_num ())
+	{
+	  max_regno = max_reg_num ();
+	  allocate_reg_info (max_regno, FALSE, FALSE);
+	}
       propagate_block (merge_bb, tmp, merge_set, merge_set, 0);
 
       /* For small register class machines, don't lengthen lifetimes of
 	 hard registers before reload.  */

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