This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFA: fix rtl-optimization/20370
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 18 Jul 2005 15:46:54 +0100
- Subject: 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. */