- avoid-cycling-on-vertain-subreg-reloads.patch: Add patch source comment - change-gcc-BASE-VER.patch: Likewise - dont-generate-IF_THEN_ELSE.patch: Likewise - fix-ICE-in-compute_live_loop_exits.patch: Likewise - fix-ICE-in-eliminate_stmt.patch: Likewise - fix-ICE-in-vect_create_epilog_for_reduction.patch: Likewise - fix-ICE-in-vect_stmt_to_vectorize.patch: Likewise - fix-ICE-in-verify_ssa.patch: Likewise - fix-ICE-when-vectorizing-nested-cycles.patch: Likewise - fix-cost-of-plus.patch: Likewise - ipa-const-prop-self-recursion-bugfix.patch: Likewise - simplify-removing-subregs.patch: Likewise - medium-code-mode.patch: Bugfix - fix-when-peeling-for-alignment.patch: Move to ... - fix-PR-92351-When-peeling-for-alignment.patch: ... this - AArch64-Fix-constraints-for-CPY-M.patch: New file - Apply-maximum-nunits-for-BB-SLP.patch: New file - Fix-EXTRACT_LAST_REDUCTION-segfault.patch: New file - Fix-up-push_partial_def-little-endian-bitfield.patch: New file - Fix-zero-masking-for-vcvtps2ph.patch: New file - IRA-Handle-fully-tied-destinations.patch: New file - SLP-VECT-Add-check-to-fix-96837.patch: New file - aarch64-Fix-ash-lr-lshr-mode-3-expanders.patch: New file - aarch64-Fix-bf16-and-matrix-g++-gfortran.patch: New file - aarch64-Fix-mismatched-SVE-predicate-modes.patch: New file - aarch64-fix-sve-acle-error.patch: New file - adjust-vector-cost-and-move-EXTRACT_LAST_REDUCTION-costing.patch: New file - bf16-and-matrix-characteristic.patch: New file - fix-ICE-IPA-compare-VRP-types.patch: New file - fix-ICE-in-affine-combination.patch: New file - fix-ICE-in-pass-vect.patch: New file - fix-ICE-in-vect_update_misalignment_for_peel.patch: New file - fix-addlosymdi-ICE-in-pass-reload.patch: New file - fix-an-ICE-in-vect_recog_mask_conversion_pattern.patch: New file - fix-avx512vl-vcvttpd2dq-2-fail.patch: New file - fix-issue499-add-nop-convert.patch: New file - fix-issue604-ldist-dependency-fixup.patch: New file - modulo-sched-Carefully-process-loop-counter-initiali.patch: New file - re-PR-target-91124-gcc.target-i386-avx512vl-vpshldvd.patch: New file - reduction-paths-with-unhandled-live-stmt.patch: New file - redundant-loop-elimination.patch: New file - sccvn-Improve-handling-of-load-masked-with-integer.patch: New file - speed-up-DDG-analysis-and-fix-bootstrap-compare-debug.patch: New file - store-merging-Consider-also-overlapping-stores-earlier.patch: New file - tree-optimization-96920-another-ICE-when-vectorizing.patch: New file - tree-optimization-97812-fix-range-query-in-VRP-asser.patch: New file - vectorizable-comparison-Swap-operands-only-once.patch: New file - x86-Fix-bf16-and-matrix.patch: New file
88 lines
3.2 KiB
Diff
88 lines
3.2 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-Don-t-assign-a-cost-to-vectorizable_assignment.patch
|
|
e4020b28d02a00d478a3a769855ae6a8d9cc6b26
|
|
|
|
diff -Nurp a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
|
|
--- a/gcc/tree-vect-loop.c 2020-07-09 10:42:35.824000000 +0800
|
|
+++ b/gcc/tree-vect-loop.c 2020-07-09 10:43:23.920000000 +0800
|
|
@@ -1143,7 +1143,9 @@ vect_compute_single_scalar_iteration_cos
|
|
else
|
|
kind = scalar_store;
|
|
}
|
|
- else
|
|
+ else if (vect_nop_conversion_p (stmt_info))
|
|
+ continue;
|
|
+ else
|
|
kind = scalar_stmt;
|
|
|
|
record_stmt_cost (&LOOP_VINFO_SCALAR_ITERATION_COST (loop_vinfo),
|
|
diff -Nurp a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
|
|
--- a/gcc/tree-vectorizer.h 2020-07-09 10:42:35.824000000 +0800
|
|
+++ b/gcc/tree-vectorizer.h 2020-07-09 10:43:23.920000000 +0800
|
|
@@ -1645,6 +1645,7 @@ extern tree vect_get_vec_def_for_stmt_co
|
|
extern bool vect_transform_stmt (stmt_vec_info, gimple_stmt_iterator *,
|
|
slp_tree, slp_instance);
|
|
extern void vect_remove_stores (stmt_vec_info);
|
|
+extern bool vect_nop_conversion_p (stmt_vec_info);
|
|
extern opt_result vect_analyze_stmt (stmt_vec_info, bool *, slp_tree,
|
|
slp_instance, stmt_vector_for_cost *);
|
|
extern void vect_get_load_cost (stmt_vec_info, int, bool,
|
|
diff -Nurp a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
|
|
--- a/gcc/tree-vect-slp.c 2020-07-09 10:42:35.736000000 +0800
|
|
+++ b/gcc/tree-vect-slp.c 2020-07-09 10:43:23.920000000 +0800
|
|
@@ -2940,6 +2940,8 @@ vect_bb_slp_scalar_cost (basic_block bb,
|
|
else
|
|
kind = scalar_store;
|
|
}
|
|
+ else if (vect_nop_conversion_p (stmt_info))
|
|
+ continue;
|
|
else
|
|
kind = scalar_stmt;
|
|
record_stmt_cost (cost_vec, 1, kind, stmt_info, 0, vect_body);
|
|
diff -Nurp a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
|
|
--- a/gcc/tree-vect-stmts.c 2020-07-09 10:42:35.732000000 +0800
|
|
+++ b/gcc/tree-vect-stmts.c 2020-07-09 10:43:23.920000000 +0800
|
|
@@ -5283,6 +5283,29 @@ vectorizable_conversion (stmt_vec_info s
|
|
return true;
|
|
}
|
|
|
|
+/* Return true if we can assume from the scalar form of STMT_INFO that
|
|
+ neither the scalar nor the vector forms will generate code. STMT_INFO
|
|
+ is known not to involve a data reference. */
|
|
+
|
|
+bool
|
|
+vect_nop_conversion_p (stmt_vec_info stmt_info)
|
|
+{
|
|
+ gassign *stmt = dyn_cast <gassign *> (stmt_info->stmt);
|
|
+ if (!stmt)
|
|
+ return false;
|
|
+
|
|
+ tree lhs = gimple_assign_lhs (stmt);
|
|
+ tree_code code = gimple_assign_rhs_code (stmt);
|
|
+ tree rhs = gimple_assign_rhs1 (stmt);
|
|
+
|
|
+ if (code == SSA_NAME || code == VIEW_CONVERT_EXPR)
|
|
+ return true;
|
|
+
|
|
+ if (CONVERT_EXPR_CODE_P (code))
|
|
+ return tree_nop_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs));
|
|
+
|
|
+ return false;
|
|
+}
|
|
|
|
/* Function vectorizable_assignment.
|
|
|
|
@@ -5398,7 +5421,9 @@ vectorizable_assignment (stmt_vec_info s
|
|
{
|
|
STMT_VINFO_TYPE (stmt_info) = assignment_vec_info_type;
|
|
DUMP_VECT_SCOPE ("vectorizable_assignment");
|
|
- vect_model_simple_cost (stmt_info, ncopies, dt, ndts, slp_node, cost_vec);
|
|
+ if (!vect_nop_conversion_p (stmt_info))
|
|
+ vect_model_simple_cost (stmt_info, ncopies, dt, ndts, slp_node,
|
|
+ cost_vec);
|
|
return true;
|
|
}
|
|
|