summaryrefslogtreecommitdiff
path: root/gcc/loop-iv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r--gcc/loop-iv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 81e9a5625ec..3e1b5db5af7 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -301,7 +301,8 @@ latch_dominating_def (rtx reg, struct df_ref **def)
for (adef = DF_REG_DEF_CHAIN (regno); adef; adef = adef->next_reg)
{
- if (!bitmap_bit_p (bb_info->out, DF_REF_ID (adef)))
+ if (!bitmap_bit_p (df->blocks_to_analyze, DF_REF_BB (adef)->index)
+ || !bitmap_bit_p (bb_info->out, DF_REF_ID (adef)))
continue;
/* More than one reaching definition. */