* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
boundary case for the last candidate.
From-SVN: r250960
+2017-08-08 Bin Cheng <bin.cheng@arm.com>
+
+ * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
+ boundary case for the last candidate.
+
2017-08-08 Bin Cheng <bin.cheng@arm.com>
* doc/invoke.texi: Document -ftree-loop-distribution for O3.
static void
relate_compare_use_with_all_cands (struct ivopts_data *data)
{
- unsigned i, max_id = data->vcands.length () - 1;
+ unsigned i, count = data->vcands.length ();
for (i = 0; i < data->vgroups.length (); i++)
{
struct iv_group *group = data->vgroups[i];
if (group->type == USE_COMPARE)
- bitmap_set_range (group->related_cands, 0, max_id);
+ bitmap_set_range (group->related_cands, 0, count);
}
}