Skip to content

Commit fab1cd6

Browse files
committed
Remove dead code from vectorizable_store
There's dead code in the else block of a if (!costing_p) block, after trivial pruning only setting of 'op' remains but that has no further uses downstream. I found this looking for remaining (must-be-dead) uses of vect_get_vec_defs_for_operand. * tree-vect-stmts.cc (vectorizable_store): Remove trivially dead code.
1 parent 02213d0 commit fab1cd6

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

gcc/tree-vect-stmts.cc

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9069,39 +9069,6 @@ vectorizable_store (vec_info *vinfo,
90699069
if (mask)
90709070
vec_mask = vec_masks[0];
90719071
}
9072-
else
9073-
{
9074-
/* For interleaved stores we collect vectorized defs for all the
9075-
stores in the group in DR_CHAIN. DR_CHAIN is then used as an
9076-
input to vect_permute_store_chain().
9077-
9078-
If the store is not grouped, DR_GROUP_SIZE is 1, and DR_CHAIN
9079-
is of size 1. */
9080-
stmt_vec_info next_stmt_info = first_stmt_info;
9081-
for (i = 0; i < group_size; i++)
9082-
{
9083-
/* Since gaps are not supported for interleaved stores,
9084-
DR_GROUP_SIZE is the exact number of stmts in the chain.
9085-
Therefore, NEXT_STMT_INFO can't be NULL_TREE. In case
9086-
that there is no interleaving, DR_GROUP_SIZE is 1,
9087-
and only one iteration of the loop will be executed. */
9088-
op = vect_get_store_rhs (next_stmt_info);
9089-
if (!costing_p)
9090-
{
9091-
vect_get_vec_defs_for_operand (vinfo, next_stmt_info,
9092-
1, op, gvec_oprnds[i]);
9093-
vec_oprnd = (*gvec_oprnds[i])[0];
9094-
dr_chain.quick_push (vec_oprnd);
9095-
}
9096-
next_stmt_info = DR_GROUP_NEXT_ELEMENT (next_stmt_info);
9097-
}
9098-
if (mask && !costing_p)
9099-
{
9100-
vect_get_vec_defs_for_operand (vinfo, stmt_info, 1,
9101-
mask, &vec_masks, mask_vectype);
9102-
vec_mask = vec_masks[0];
9103-
}
9104-
}
91059072

91069073
/* We should have catched mismatched types earlier. */
91079074
gcc_assert (costing_p

0 commit comments

Comments
 (0)