===================================================================
***************
+ /* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+ /* { dg-options "-O -fprofile-generate -fgcse -fno-gcse-lm -fgcse-sm -fno-ivopts -fno-tree-loop-im -ftree-pre -funroll-loops -fno-web -fschedule-insns2 -fselective-scheduling2 -fsel-sched-pipelining" } */
+
+ extern volatile float f[];
+
+ void foo (void)
+ {
+ int i;
+ for (i = 0; i < 100; i++)
+ f[i] = 0;
+ for (i = 0; i < 100; i++)
+ f[i] = 0;
+ for (i = 0; i < 100; i++)
+ if (f[i])
+ __builtin_abort ();
+ }
===================================================================
*************** reset_sched_cycles_in_current_ebb (void)
{
int cost, haifa_cost;
int sort_p;
! bool asm_p, real_insn, after_stall;
int clock;
if (!INSN_P (insn))
{
int cost, haifa_cost;
int sort_p;
! bool asm_p, real_insn, after_stall, all_issued;
int clock;
if (!INSN_P (insn))
*************** reset_sched_cycles_in_current_ebb (void)
haifa_cost = cost;
after_stall = 1;
}
! if (haifa_cost == 0
! && issued_insns == issue_rate)
haifa_cost = 1;
if (haifa_cost > 0)
{
haifa_cost = cost;
after_stall = 1;
}
! all_issued = issued_insns == issue_rate;
! if (haifa_cost == 0 && all_issued)
haifa_cost = 1;
if (haifa_cost > 0)
{
*************** reset_sched_cycles_in_current_ebb (void)
break;
/* When the data dependency stall is longer than the DFA stall,
! it could be that after the longer stall the insn will again
become unavailable to the DFA restrictions. Looks strange
but happens e.g. on x86-64. So recheck DFA on the last
iteration. */
! if (after_stall
&& real_insn
&& haifa_cost == 0)
haifa_cost = estimate_insn_cost (insn, curr_state);
break;
/* When the data dependency stall is longer than the DFA stall,
! and when we have issued exactly issue_rate insns and stalled,
! it could be that after this longer stall the insn will again
become unavailable to the DFA restrictions. Looks strange
but happens e.g. on x86-64. So recheck DFA on the last
iteration. */
! if ((after_stall || all_issued)
&& real_insn
&& haifa_cost == 0)
haifa_cost = estimate_insn_cost (insn, curr_state);