aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2005-07-22 12:25:20 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2005-07-22 13:25:20 +0100
commit191e1ff2f56a8b5148ccca1e3c30283af9905cee (patch)
treea98e7cdc5aa12f9912600717a656138bb0b828ce /gcc/ifcvt.c
parent475a3eef78ce1a81c2eb9e391327d4163a4f7556 (diff)
downloadgcc-191e1ff2f56a8b5148ccca1e3c30283af9905cee.zip
gcc-191e1ff2f56a8b5148ccca1e3c30283af9905cee.tar.gz
gcc-191e1ff2f56a8b5148ccca1e3c30283af9905cee.tar.bz2
re PR rtl-optimization/20370 (dead_or_predictable doesn't resize reg_n_info)
PR rtl-optimization/20370 * ifcvt.c (dead_or_predicable): Before calling propagate_block, call allocate_reg_info if necessary. From-SVN: r102282
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index d9f18bc..d74d945 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -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