This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/52715] [4.8 Regression] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7140 with -fselective-scheduling2 -funroll-loops --param=max-average-unrolled-insns=406
- From: "abel at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Mar 2012 12:26:53 +0000
- Subject: [Bug rtl-optimization/52715] [4.8 Regression] ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7140 with -fselective-scheduling2 -funroll-loops --param=max-average-unrolled-insns=406
- Auto-submitted: auto-generated
- References: <bug-52715-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52715
Andrey Belevantsev <abel at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-03-26
AssignedTo|unassigned at gcc dot |abel at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Andrey Belevantsev <abel at gcc dot gnu.org> 2012-03-26 12:26:53 UTC ---
Sigh. Of course optimizing calculation of whether an insn change the state as
in PR 52203 was wrong, one needs to calculate this right before actually
scheduling the insn as the state may change. Thus, reverting the fix for 52203
and doing the below instead is not only safe but correct:
diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 2829f60..f5ae9817 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -7127,8 +7124,14 @@ reset_sched_cycles_in_current_ebb (void)
if (real_insn)
{
+ static state_t temp = NULL;
+
+ if (!temp)
+ temp = xmalloc (dfa_state_size);
+ memcpy (temp, curr_state, dfa_state_size);
+
cost = state_transition (curr_state, insn);
- if (!empty)
+ if (memcmp (temp, curr_state, dfa_state_size))
issued_insns++;
if (sched_verbose >= 2)