+2019-12-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vect-stmts.c (vect_get_strided_load_store_ops): Copy
+ DR_STEP before gimplifying it.
+
2019-12-29 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_condition): For extract-last
+2019-12-29 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.dg/vect/vect-strided-epilogue-1.c: New test.
+
2019-12-29 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/vect/vect-cond-12.c: New test.
gimple_seq stmts;
tree bump = size_binop (MULT_EXPR,
- fold_convert (sizetype, DR_STEP (dr)),
+ fold_convert (sizetype, unshare_expr (DR_STEP (dr))),
size_int (TYPE_VECTOR_SUBPARTS (vectype)));
*dataref_bump = force_gimple_operand (bump, &stmts, true, NULL_TREE);
if (stmts)
offset_type = TREE_TYPE (gs_info->offset_vectype);
/* Calculate X = DR_STEP / SCALE and convert it to the appropriate type. */
- tree step = size_binop (EXACT_DIV_EXPR, DR_STEP (dr),
+ tree step = size_binop (EXACT_DIV_EXPR, unshare_expr (DR_STEP (dr)),
ssize_int (gs_info->scale));
step = fold_convert (offset_type, step);
step = force_gimple_operand (step, &stmts, true, NULL_TREE);