+2017-10-10 Jim Wilson <wilson@tuliptree.org>
+
+ PR rtl-optimization/81434
+ * haifa-sched.c (prune_ready_list): Init min_cost_group to 0. Update
+ comment for main loop. In sched_group_found if, also add checks for
+ pass and min_cost_group.
+
2017-10-10 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (TARGET_INSN_COST): New.
{
int i, pass;
bool sched_group_found = false;
- int min_cost_group = 1;
+ int min_cost_group = 0;
if (sched_fusion)
return;
}
/* Make two passes if there's a SCHED_GROUP_P insn; make sure to handle
- such an insn first and note its cost, then schedule all other insns
- for one cycle later. */
+ such an insn first and note its cost. If at least one SCHED_GROUP_P insn
+ gets queued, then all other insns get queued for one cycle later. */
for (pass = sched_group_found ? 0 : 1; pass < 2; )
{
int n = ready.n_ready;
if (DEBUG_INSN_P (insn))
continue;
- if (sched_group_found && !SCHED_GROUP_P (insn))
+ if (sched_group_found && !SCHED_GROUP_P (insn)
+ && ((pass == 0) || (min_cost_group >= 1)))
{
if (pass == 0)
continue;