This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, committed] for PR33224
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 31 Aug 2007 17:12:50 +0200
- Subject: [patch, committed] for PR33224
Hello,
the way df works currently makes it possible for defs outside of the
analysed region to have the same id as the defs in the analysed region
(the defs in the analysed region are renumbered to consecutive
integers). This means that we need to check whether a def belongs to
the analysed region before testing whether it belongs to a reaching def
set.
Bootstrapped & regtested on i686, commited.
Zdenek
PR rtl-optimization/33224
* loop-iv.c (latch_dominating_def): Check that the definition belongs
to the analysed region.
Index: loop-iv.c
===================================================================
*** loop-iv.c (revision 127935)
--- loop-iv.c (working copy)
*************** latch_dominating_def (rtx reg, struct df
*** 301,307 ****
for (adef = DF_REG_DEF_CHAIN (regno); adef; adef = adef->next_reg)
{
! if (!bitmap_bit_p (bb_info->out, DF_REF_ID (adef)))
continue;
/* More than one reaching definition. */
--- 301,308 ----
for (adef = DF_REG_DEF_CHAIN (regno); adef; adef = adef->next_reg)
{
! 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. */