@@ -553,12 +553,12 @@ sort_by_operand_rank (const void *pa, const void *pb)
/* Add an operand entry to *OPS for the tree operand OP. */
static void
-add_to_ops_vec (vec<operand_entry *> *ops, tree op)
+add_to_ops_vec (vec<operand_entry *> *ops, tree op, int rank = 0)
{
operand_entry *oe = operand_entry_pool.allocate ();
oe->op = op;
- oe->rank = get_rank (op);
+ oe->rank = rank ? rank : get_rank (op);
oe->id = next_operand_entry_id++;
oe->count = 1;
ops->safe_push (oe);
@@ -1824,7 +1824,7 @@ transform_add_to_multiply (gimple *stmt, vec<operand_entry *> *ops)
else
insert_stmt_after (mul_stmt, def_stmt);
gimple_set_visited (mul_stmt, true);
- add_to_ops_vec (ops, tmp);
+ add_to_ops_vec (ops, tmp, bb_rank [gimple_bb (stmt)->index]);
changed = true;
}