[patch] for PR24497
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Mon Nov 14 13:20:00 GMT 2005
Hello,
loop-unroll contains assert that verifies that when we are passing
through original loop body and one of the copies simultaneously, we are
indeed looking at the copy of the same insn. This check however fails
if the insn contains scratch, as these are considered to be nonequal.
This patch replaces the assert with a weaker one that should not suffer
with this problem, while still trying to make sure we do not introduce errors
by inserting/deleting some insns elsewhere.
Bootstrapped & regtested on i686.
Zdenek
PR rtl-optimization/24497
* loop-unroll.c (apply_opt_in_copies): Do not verify equality of
the copied insn.
Index: loop-unroll.c
===================================================================
*** loop-unroll.c (revision 106854)
--- loop-unroll.c (working copy)
*************** apply_opt_in_copies (struct opt_info *op
*** 2118,2126 ****
if (ivts)
{
! #ifdef ENABLE_CHECKING
! gcc_assert (rtx_equal_p (PATTERN (insn), PATTERN (orig_insn)));
! #endif
if (!delta)
insert_base_initialization (ivts, insn);
--- 2118,2125 ----
if (ivts)
{
! gcc_assert (GET_CODE (PATTERN (insn))
! == GET_CODE (PATTERN (orig_insn)));
if (!delta)
insert_base_initialization (ivts, insn);
*************** apply_opt_in_copies (struct opt_info *op
*** 2133,2141 ****
ves = htab_find (opt_info->insns_with_var_to_expand, &ve_templ);
if (ves)
{
! #ifdef ENABLE_CHECKING
! gcc_assert (rtx_equal_p (PATTERN (insn), PATTERN (orig_insn)));
! #endif
expand_var_during_unrolling (ves, insn);
}
}
--- 2132,2139 ----
ves = htab_find (opt_info->insns_with_var_to_expand, &ve_templ);
if (ves)
{
! gcc_assert (GET_CODE (PATTERN (insn))
! == GET_CODE (PATTERN (orig_insn)));
expand_var_during_unrolling (ves, insn);
}
}
More information about the Gcc-patches
mailing list