re PR rtl-optimization/20370 (dead_or_predictable doesn't resize reg_n_info)
authorJ"orn Rennecke <joern.rennecke@st.com>
Fri, 22 Jul 2005 12:25:20 +0000 (12:25 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Fri, 22 Jul 2005 12:25:20 +0000 (13:25 +0100)
PR rtl-optimization/20370
* ifcvt.c (dead_or_predicable): Before calling propagate_block,
call allocate_reg_info if necessary.

From-SVN: r102282

gcc/ChangeLog
gcc/ifcvt.c

index afaf91869dadf6cb8227fe2ce072d940fa2041b5..faddc8357e1bf871b29b2d4559784396b70291a6 100644 (file)
@@ -1,5 +1,9 @@
 2005-07-22  J"orn Rennecke <joern.rennecke@st.com>
 
+       PR rtl-optimization/20370
+       * ifcvt.c (dead_or_predicable): Before calling propagate_block,
+       call allocate_reg_info if necessary.
+
        PR rtl-optimization/21848
        * calls.c (emit_library_call_value_1): For const functions, add
        USEs of the stack slots to CALL_INSN_FUNCTION_USAGE.
index d9f18bca6118f6765850ede5d502e3e3096a657d..d74d9457d7becadfef6ad02bb1e134476d9424ec 100644 (file)
@@ -3341,6 +3341,14 @@ dead_or_predicable (basic_block test_bb, basic_block merge_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