re PR bootstrap/48403 (bootstrap comparison failure)
authorBernd Schmidt <bernds@codesourcery.com>
Tue, 5 Apr 2011 22:19:17 +0000 (22:19 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 5 Apr 2011 22:19:17 +0000 (22:19 +0000)
PR bootstrap/48403
* haifa-sched.c (schedule_block): Increment cycle_issued_insns only
if old and new states differ.

From-SVN: r172006

gcc/ChangeLog
gcc/haifa-sched.c

index dff7d07e642432407e6f7fe9fca96bc5a1be1414..0f9ce6c77bd82cdfd337e2b813515b0a14cfa38a 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-05  Bernd Schmidt  <bernds@codesourcery.com>
+
+       PR bootstrap/48403
+       * haifa-sched.c (schedule_block): Increment cycle_issued_insns only
+       if old and new states differ.
+
 2011-04-05  Joseph Myers  <joseph@codesourcery.com>
 
        * config/m68k/m68k.c (m68k_handle_option): Don't handle OPT_m5200,
index 8f2e4ada33c38285dce342b4d5eee7ee6bb87e6a..30f55be5178fdd61440f04a10aa0a58be85fab39 100644 (file)
@@ -3230,10 +3230,12 @@ schedule_block (basic_block *target_bb)
 
          if (recog_memoized (insn) >= 0)
            {
+             memcpy (temp_state, curr_state, dfa_state_size);
              cost = state_transition (curr_state, insn);
              if (!flag_sched_pressure)
                gcc_assert (cost < 0);
-             cycle_issued_insns++;
+             if (memcmp (temp_state, curr_state, dfa_state_size) != 0)
+               cycle_issued_insns++;
              asm_p = false;
            }
          else