- Add add-checks-to-avoid-spoiling-if-conversion.patch - Add add-option-fallow-store-data-races.patch - Add complete-struct-reorg.patch - Add cse-in-vectorization.patch - Add enable-simd-math.patch - Add fix-ICE-avoid-issueing-loads-in-SM-when-possible.patch - Add fix-ICE-in-compute_live_loop_exits.patch - Add fix-ICE-in-copy_reference_ops_from_ref.patch - Add fix-ICE-in-declare-return-variable.patch - Add fix-ICE-in-exact_div.patch - Add fix-ICE-in-gimple_op.patch - Add fix-ICE-in-model_update_limit_points_in_group.patch - Add fix-ICE-in-reload.patch - Add fix-ICE-in-store_constructor.patch - Add fix-ICE-in-vec.patch - Add fix-ICE-in-vect_create_epilog_for_reduction.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_2.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_3.patch - Add fix-ICE-in-vect_get_vec_def_for_stmt_copy.patch - Add fix-ICE-in-vect_slp_analyze_node_operations.patch - Add fix-ICE-in-vect_stmt_to_vectorize.patch - Add fix-ICE-in-vect_transform_stmt.patch - Add fix-ICE-in-vectorizable_condition.patch - Add fix-ICE-in-verify_ssa.patch - Add fix-ICE-statement-uses-released-SSA-name.patch - Add fix-ICE-when-vectorizing-nested-cycles.patch - Add fix-SSA-update-for-vectorizer-epilogue.patch - Add fix-do-not-build-op.patch - Add fix-load-eliding-in-SM.patch - Add fix-wrong-vectorizer-code.patch - Add generate-csel-for-arrayref.patch - Add ipa-const-prop-self-recursion-bugfix.patch - Add ipa-const-prop.patch - Add ipa-struct-reorg-bugfix.patch - Add ipa-struct-reorg.patch - Add medium-code-mode.patch - Add reduction-chain-slp-option.patch - Add reductions-slp-enhancement.patch - Add simplify-removing-subregs.patch - Add tighten-range-for-generating-csel.patch - Add vectorization-enhancement.patch - Add add-checks-to-avoid-spoiling-if-conversion.patch - Add add-option-fallow-store-data-races.patch - Add complete-struct-reorg.patch - Add cse-in-vectorization.patch - Add enable-simd-math.patch - Add fix-ICE-avoid-issueing-loads-in-SM-when-possible.patch - Add fix-ICE-in-compute_live_loop_exits.patch - Add fix-ICE-in-copy_reference_ops_from_ref.patch - Add fix-ICE-in-declare-return-variable.patch - Add fix-ICE-in-exact_div.patch - Add fix-ICE-in-gimple_op.patch - Add fix-ICE-in-model_update_limit_points_in_group.patch - Add fix-ICE-in-reload.patch - Add fix-ICE-in-store_constructor.patch - Add fix-ICE-in-vec.patch - Add fix-ICE-in-vect_create_epilog_for_reduction.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_2.patch - Add fix-ICE-in-vect_create_epilog_for_reduction_3.patch - Add fix-ICE-in-vect_get_vec_def_for_stmt_copy.patch - Add fix-ICE-in-vect_slp_analyze_node_operations.patch - Add fix-ICE-in-vect_stmt_to_vectorize.patch - Add fix-ICE-in-vect_transform_stmt.patch - Add fix-ICE-in-vectorizable_condition.patch - Add fix-ICE-in-verify_ssa.patch - Add fix-ICE-statement-uses-released-SSA-name.patch - Add fix-ICE-when-vectorizing-nested-cycles.patch - Add fix-SSA-update-for-vectorizer-epilogue.patch - Add fix-do-not-build-op.patch - Add fix-load-eliding-in-SM.patch - Add fix-wrong-vectorizer-code.patch - Add generate-csel-for-arrayref.patch - Add ipa-const-prop-self-recursion-bugfix.patch - Add ipa-const-prop.patch - Add ipa-struct-reorg-bugfix.patch - Add ipa-struct-reorg.patch - Add medium-code-mode.patch - Add reduction-chain-slp-option.patch - Add reductions-slp-enhancement.patch - Add simplify-removing-subregs.patch - Add tighten-range-for-generating-csel.patch - Add vectorization-enhancement.patch
69 lines
2.5 KiB
Diff
69 lines
2.5 KiB
Diff
This backport contains 1 patch from gcc main stream tree.
|
|
The commit id of these patchs list as following in the order of time.
|
|
|
|
0001-vect-CSE-for-bump-and-offset-in-strided-load-store-o.patch
|
|
4a31a8add56d49867c187d90b3a89e97634543c2
|
|
|
|
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr95199.c b/gcc/testsuite/gcc.target/aarch64/sve/pr95199.c
|
|
new file mode 100644
|
|
index 00000000000..adcd5124a7c
|
|
--- /dev/null
|
|
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr95199.c
|
|
@@ -0,0 +1,17 @@
|
|
+/* { dg-do compile } */
|
|
+/* { dg-options "-O3 -march=armv8.2-a+sve -fdump-tree-vect" } */
|
|
+
|
|
+void
|
|
+foo (double *a, double *b, double m, int inc_x, int inc_y)
|
|
+{
|
|
+ int ix = 0, iy = 0;
|
|
+ for (int i = 0; i < 1000; ++i)
|
|
+ {
|
|
+ a[ix] += m * b[iy];
|
|
+ ix += inc_x;
|
|
+ iy += inc_y;
|
|
+ }
|
|
+ return ;
|
|
+}
|
|
+
|
|
+/* { dg-final { scan-tree-dump-times "VEC_SERIES_EXPR" 2 "vect" } } */
|
|
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
|
|
index 4a0a907fcb4..c9174395fca 100644
|
|
--- a/gcc/tree-vect-stmts.c
|
|
+++ b/gcc/tree-vect-stmts.c
|
|
@@ -2846,16 +2846,12 @@ vect_get_strided_load_store_ops (stmt_vec_info stmt_info,
|
|
tree *dataref_bump, tree *vec_offset)
|
|
{
|
|
struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
|
|
- struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
|
|
tree vectype = STMT_VINFO_VECTYPE (stmt_info);
|
|
- gimple_seq stmts;
|
|
|
|
tree bump = size_binop (MULT_EXPR,
|
|
fold_convert (sizetype, DR_STEP (dr)),
|
|
size_int (TYPE_VECTOR_SUBPARTS (vectype)));
|
|
- *dataref_bump = force_gimple_operand (bump, &stmts, true, NULL_TREE);
|
|
- if (stmts)
|
|
- gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
|
|
+ *dataref_bump = cse_and_gimplify_to_preheader (loop_vinfo, bump);
|
|
|
|
/* The offset given in GS_INFO can have pointer type, so use the element
|
|
type of the vector instead. */
|
|
@@ -2866,13 +2862,11 @@ vect_get_strided_load_store_ops (stmt_vec_info stmt_info,
|
|
tree step = size_binop (EXACT_DIV_EXPR, DR_STEP (dr),
|
|
ssize_int (gs_info->scale));
|
|
step = fold_convert (offset_type, step);
|
|
- step = force_gimple_operand (step, &stmts, true, NULL_TREE);
|
|
|
|
/* Create {0, X, X*2, X*3, ...}. */
|
|
- *vec_offset = gimple_build (&stmts, VEC_SERIES_EXPR, offset_vectype,
|
|
- build_zero_cst (offset_type), step);
|
|
- if (stmts)
|
|
- gsi_insert_seq_on_edge_immediate (loop_preheader_edge (loop), stmts);
|
|
+ tree offset = fold_build2 (VEC_SERIES_EXPR, offset_vectype,
|
|
+ build_zero_cst (offset_type), step);
|
|
+ *vec_offset = cse_and_gimplify_to_preheader (loop_vinfo, offset);
|
|
}
|
|
|
|
/* Return the amount that should be added to a vector pointer to move
|