- 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
65 lines
1.7 KiB
Diff
65 lines
1.7 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.
|
|
|
|
2686de5617bfb572343933be2883e8274c9735b5
|
|
0001-tree-optimization-97760-reduction-paths-with-unhandl.patch
|
|
|
|
diff --git a/gcc/testsuite/gcc.dg/vect/pr97760.c b/gcc/testsuite/gcc.dg/vect/pr97760.c
|
|
new file mode 100644
|
|
index 00000000000..da5ac937a43
|
|
--- /dev/null
|
|
+++ b/gcc/testsuite/gcc.dg/vect/pr97760.c
|
|
@@ -0,0 +1,26 @@
|
|
+#include "tree-vect.h"
|
|
+
|
|
+int b=1;
|
|
+static int *g = &b;
|
|
+
|
|
+void __attribute__((noipa))
|
|
+h (unsigned int n)
|
|
+{
|
|
+ int i = 3;
|
|
+ int f = 3;
|
|
+ for (; f <= 50; f += 4) {
|
|
+ i += 4;
|
|
+ *g = i;
|
|
+ i += n;
|
|
+ }
|
|
+}
|
|
+
|
|
+int main ()
|
|
+{
|
|
+ check_vect ();
|
|
+
|
|
+ h (9);
|
|
+ if (*g != 150 || b != 150)
|
|
+ __builtin_abort ();
|
|
+ return 0;
|
|
+}
|
|
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
|
|
index 977633a3ce3..39b7319e825 100644
|
|
--- a/gcc/tree-vect-loop.c
|
|
+++ b/gcc/tree-vect-loop.c
|
|
@@ -3326,14 +3326,17 @@ pop:
|
|
fail = true;
|
|
break;
|
|
}
|
|
- /* Check there's only a single stmt the op is used on inside
|
|
- of the loop. */
|
|
+ /* Check there's only a single stmt the op is used on. For the
|
|
+ not value-changing tail and the last stmt allow out-of-loop uses.
|
|
+ ??? We could relax this and handle arbitrary live stmts by
|
|
+ forcing a scalar epilogue for example. */
|
|
imm_use_iterator imm_iter;
|
|
gimple *op_use_stmt;
|
|
unsigned cnt = 0;
|
|
FOR_EACH_IMM_USE_STMT (op_use_stmt, imm_iter, op)
|
|
if (!is_gimple_debug (op_use_stmt)
|
|
- && flow_bb_inside_loop_p (loop, gimple_bb (op_use_stmt)))
|
|
+ && (*code != ERROR_MARK
|
|
+ || flow_bb_inside_loop_p (loop, gimple_bb (op_use_stmt))))
|
|
{
|
|
/* We want to allow x + x but not x < 1 ? x : 2. */
|
|
if (is_gimple_assign (op_use_stmt)
|
|
|