* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-08 11:02 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-08 11:02 UTC (permalink / raw
To: gentoo-commits
commit: 29fc9edc64e0e00a0ade3065238365a4aa46ec59
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 8 10:48:38 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 8 10:53:06 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=29fc9edc
14.0.0: backport more vectorisation fixes & postgres const expression fix
Bug: https://gcc.gnu.org/PR113808
Bug: https://gcc.gnu.org/PR113750
Bug: https://gcc.gnu.org/PR113731
Bug: https://gcc.gnu.org/PR113734 (should be same as PR113808)
Bug: https://gcc.gnu.org/PR113776
Bug: https://bugs.gentoo.org/923804
Bug: https://bugs.gentoo.org/923936
Signed-off-by: Sam James <sam <AT> gentoo.org>
...fix-ICE-when-moving-statements-to-empty-B.patch | 129 +++++++++++
...fix-ICE-when-destination-BB-for-stores-st.patch | 250 +++++++++++++++++++++
...-don-t-cache-restart_loop-in-vectorizable.patch | 93 ++++++++
.../78_all_PR113776-c-boolean-conversion.patch | 117 ++++++++++
14.0.0/gentoo/README.history | 7 +
5 files changed, 596 insertions(+)
diff --git a/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch b/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
new file mode 100644
index 0000000..1146246
--- /dev/null
+++ b/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
@@ -0,0 +1,129 @@
+From c22a0c0ca1a5c31d107f90efd2221eb8bc198205 Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Wed, 7 Feb 2024 10:58:25 +0000
+Subject: [PATCH 1/3] middle-end: fix ICE when moving statements to empty BB
+ [PR113731]
+
+We use gsi_move_before (&stmt_gsi, &dest_gsi); to request that the new statement
+be placed before any other statement. Typically this then moves the current
+pointer to be after the statement we just inserted.
+
+However it looks like when the BB is empty, this does not happen and the CUR
+pointer stays NULL. There's a comment in the source of gsi_insert_before that
+explains:
+
+/* If CUR is NULL, we link at the end of the sequence (this case happens
+
+This adds a default parameter to gsi_move_before to allow us to control where
+the insertion happens.
+
+gcc/ChangeLog:
+
+ PR tree-optimization/113731
+ * gimple-iterator.cc (gsi_move_before): Take new parameter for update
+ method.
+ * gimple-iterator.h (gsi_move_before): Default new param to
+ GSI_SAME_STMT.
+ * tree-vect-loop.cc (move_early_exit_stmts): Call gsi_move_before with
+ GSI_NEW_STMT.
+
+gcc/testsuite/ChangeLog:
+
+ PR tree-optimization/113731
+ * gcc.dg/vect/vect-early-break_111-pr113731.c: New test.
+
+(cherry picked from commit 8f6ed71d8fff3c3c6249651a72aee084e31ffb9e)
+---
+ gcc/gimple-iterator.cc | 7 +++---
+ gcc/gimple-iterator.h | 3 ++-
+ .../vect/vect-early-break_111-pr113731.c | 22 +++++++++++++++++++
+ gcc/tree-vect-loop.cc | 3 +--
+ 4 files changed, 29 insertions(+), 6 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c
+
+diff --git a/gcc/gimple-iterator.cc b/gcc/gimple-iterator.cc
+index 517c53376f05..55ef3198c52b 100644
+--- a/gcc/gimple-iterator.cc
++++ b/gcc/gimple-iterator.cc
+@@ -666,10 +666,11 @@ gsi_move_after (gimple_stmt_iterator *from, gimple_stmt_iterator *to)
+
+
+ /* Move the statement at FROM so it comes right before the statement
+- at TO. */
++ at TO using method M. M defaults to GSI_SAME_STMT. */
+
+ void
+-gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to)
++gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to,
++ gsi_iterator_update m)
+ {
+ gimple *stmt = gsi_stmt (*from);
+ gsi_remove (from, false);
+@@ -677,7 +678,7 @@ gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to)
+ /* For consistency with gsi_move_after, it might be better to have
+ GSI_NEW_STMT here; however, that breaks several places that expect
+ that TO does not change. */
+- gsi_insert_before (to, stmt, GSI_SAME_STMT);
++ gsi_insert_before (to, stmt, m);
+ }
+
+
+diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h
+index 2e83a9660efc..78014a43cb93 100644
+--- a/gcc/gimple-iterator.h
++++ b/gcc/gimple-iterator.h
+@@ -86,7 +86,8 @@ extern gimple_stmt_iterator gsi_for_stmt (gimple *);
+ extern gimple_stmt_iterator gsi_for_stmt (gimple *, gimple_seq *);
+ extern gphi_iterator gsi_for_phi (gphi *);
+ extern void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *);
+-extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *);
++extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *,
++ gsi_iterator_update = GSI_SAME_STMT);
+ extern void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block);
+ extern void gsi_insert_on_edge (edge, gimple *);
+ extern void gsi_insert_seq_on_edge (edge, gimple_seq);
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c
+new file mode 100644
+index 000000000000..b205f470660a
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break } */
++/* { dg-require-effective-target vect_long } */
++/* { dg-additional-options "-msse4.2" { target i?86-*-* x86_64-*-* } } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++char* inet_net_pton_ipv4_bits;
++char inet_net_pton_ipv4_odst;
++void __errno_location();
++void inet_net_pton_ipv4();
++void inet_net_pton() { inet_net_pton_ipv4(); }
++void inet_net_pton_ipv4(char *dst, int size) {
++ while ((inet_net_pton_ipv4_bits > dst) & inet_net_pton_ipv4_odst) {
++ if (size-- <= 0)
++ goto emsgsize;
++ *dst++ = '\0';
++ }
++emsgsize:
++ __errno_location();
++}
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index 30b90d99925b..9aba94bd6ca2 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -11800,8 +11800,7 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
+ dump_printf_loc (MSG_NOTE, vect_location, "moving stmt %G", stmt);
+
+ gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
+- gsi_move_before (&stmt_gsi, &dest_gsi);
+- gsi_prev (&dest_gsi);
++ gsi_move_before (&stmt_gsi, &dest_gsi, GSI_NEW_STMT);
+ }
+
+ /* Update all the stmts with their new reaching VUSES. */
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch b/14.0.0/gentoo/76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch
new file mode 100644
index 0000000..e502439
--- /dev/null
+++ b/14.0.0/gentoo/76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch
@@ -0,0 +1,250 @@
+From 7140d52db24a930955fca57f3e8b6147d0a7fa97 Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Wed, 7 Feb 2024 10:59:32 +0000
+Subject: [PATCH 2/3] middle-end: fix ICE when destination BB for stores starts
+ with a label [PR113750]
+
+The report shows that if the FE leaves a label as the first thing in the dest
+BB then we ICE because we move the stores before the label.
+
+This is easy to fix if we know that there's still only one way into the BB.
+We would have already rejected the loop if there was multiple paths into the BB
+however I added an additional check just for early break in case the other
+constraints are relaxed later with an explanation.
+
+After that we fix the issue just by getting the GSI after the labels and I add
+a bunch of testcases for different positions the label can be added. Only the
+vect-early-break_112-pr113750.c one results in the label being kept.
+
+gcc/ChangeLog:
+
+ PR tree-optimization/113750
+ * tree-vect-data-refs.cc (vect_analyze_early_break_dependences): Check
+ for single predecessor when doing early break vect.
+ * tree-vect-loop.cc (move_early_exit_stmts): Get gsi at the start but
+ after labels.
+
+gcc/testsuite/ChangeLog:
+
+ PR tree-optimization/113750
+ * gcc.dg/vect/vect-early-break_112-pr113750.c: New test.
+ * gcc.dg/vect/vect-early-break_113-pr113750.c: New test.
+ * gcc.dg/vect/vect-early-break_114-pr113750.c: New test.
+ * gcc.dg/vect/vect-early-break_115-pr113750.c: New test.
+ * gcc.dg/vect/vect-early-break_116-pr113750.c: New test.
+
+(cherry picked from commit 5c3ba60024fedc6b3d374ebb071bcf5b3e27cd62)
+---
+ .../vect/vect-early-break_112-pr113750.c | 26 +++++++++++++++++++
+ .../vect/vect-early-break_113-pr113750.c | 26 +++++++++++++++++++
+ .../vect/vect-early-break_114-pr113750.c | 26 +++++++++++++++++++
+ .../vect/vect-early-break_115-pr113750.c | 26 +++++++++++++++++++
+ .../vect/vect-early-break_116-pr113750.c | 26 +++++++++++++++++++
+ gcc/tree-vect-data-refs.cc | 12 +++++++++
+ gcc/tree-vect-loop.cc | 2 +-
+ 7 files changed, 143 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c
+
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c
+new file mode 100644
+index 000000000000..559ebd84d5c3
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break } */
++/* { dg-require-effective-target vect_int } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++#ifndef N
++#define N 800
++#endif
++unsigned vect_a[N];
++unsigned vect_b[N];
++
++unsigned test4(unsigned x)
++{
++ unsigned ret = 0;
++ for (int i = 0; i < N; i++)
++ {
++ vect_b[i] = x + i;
++ if (vect_a[i] != x)
++ break;
++foo:
++ vect_a[i] = x;
++ }
++ return ret;
++}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c
+new file mode 100644
+index 000000000000..ba85780a46b1
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break } */
++/* { dg-require-effective-target vect_int } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++#ifndef N
++#define N 800
++#endif
++unsigned vect_a[N];
++unsigned vect_b[N];
++
++unsigned test4(unsigned x)
++{
++ unsigned ret = 0;
++ for (int i = 0; i < N; i++)
++ {
++ vect_b[i] = x + i;
++ if (vect_a[i] != x)
++ break;
++ vect_a[i] = x;
++foo:
++ }
++ return ret;
++}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c
+new file mode 100644
+index 000000000000..37af2998688f
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break } */
++/* { dg-require-effective-target vect_int } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++#ifndef N
++#define N 800
++#endif
++unsigned vect_a[N];
++unsigned vect_b[N];
++
++unsigned test4(unsigned x)
++{
++ unsigned ret = 0;
++ for (int i = 0; i < N; i++)
++ {
++ vect_b[i] = x + i;
++foo:
++ if (vect_a[i] != x)
++ break;
++ vect_a[i] = x;
++ }
++ return ret;
++}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c
+new file mode 100644
+index 000000000000..502686d308e2
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break } */
++/* { dg-require-effective-target vect_int } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++#ifndef N
++#define N 800
++#endif
++unsigned vect_a[N];
++unsigned vect_b[N];
++
++unsigned test4(unsigned x)
++{
++ unsigned ret = 0;
++ for (int i = 0; i < N; i++)
++ {
++foo:
++ vect_b[i] = x + i;
++ if (vect_a[i] != x)
++ break;
++ vect_a[i] = x;
++ }
++ return ret;
++}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c
+new file mode 100644
+index 000000000000..4e02158aa351
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break } */
++/* { dg-require-effective-target vect_int } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++#ifndef N
++#define N 800
++#endif
++unsigned vect_a[N];
++unsigned vect_b[N];
++
++unsigned test4(unsigned x)
++{
++ unsigned ret = 0;
++ for (int i = 0; i < N; i++)
++ {
++ vect_b[i] = x + i;
++ if (vect_a[i] != x)
++foo:
++ break;
++ vect_a[i] = x;
++ }
++ return ret;
++}
+diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
+index 2ca5a1b131bf..2d3691a14564 100644
+--- a/gcc/tree-vect-data-refs.cc
++++ b/gcc/tree-vect-data-refs.cc
+@@ -819,6 +819,18 @@ vect_analyze_early_break_dependences (loop_vec_info loop_vinfo)
+ trapped already during loop form analysis. */
+ gcc_assert (dest_bb->loop_father == loop);
+
++ /* Check that the destination block we picked has only one pred. To relax this we
++ have to take special care when moving the statements. We don't currently support
++ such control flow however this check is there to simplify how we handle
++ labels that may be present anywhere in the IL. This check is to ensure that the
++ labels aren't significant for the CFG. */
++ if (!single_pred (dest_bb))
++ return opt_result::failure_at (vect_location,
++ "chosen loop exit block (BB %d) does not have a "
++ "single predecessor which is currently not "
++ "supported for early break vectorization.\n",
++ dest_bb->index);
++
+ LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo) = dest_bb;
+
+ if (!LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).is_empty ())
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index 9aba94bd6ca2..190df9ec7741 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -11786,7 +11786,7 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
+
+ /* Move all stmts that need moving. */
+ basic_block dest_bb = LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo);
+- gimple_stmt_iterator dest_gsi = gsi_start_bb (dest_bb);
++ gimple_stmt_iterator dest_gsi = gsi_after_labels (dest_bb);
+
+ for (gimple *stmt : LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo))
+ {
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch b/14.0.0/gentoo/77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch
new file mode 100644
index 0000000..1983aa7
--- /dev/null
+++ b/14.0.0/gentoo/77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch
@@ -0,0 +1,93 @@
+From ce2e742d5439c3f70f6ff641164541e506c808d1 Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Thu, 8 Feb 2024 10:43:13 +0000
+Subject: [PATCH 3/3] middle-end: don't cache restart_loop in
+ vectorizable_live_operations [PR113808]
+
+There's a bug in vectorizable_live_operation that restart_loop is defined
+outside the loop.
+
+This variable is supposed to indicate whether we are doing a first or last
+index reduction. The problem is that by defining it outside the loop it becomes
+dependent on the order we visit the USE/DEFs.
+
+In the given example, the loop isn't PEELED, but we visit the early exit uses
+first. This then sets the boolean to true and it can't get to false again.
+
+So when we visit the main exit we still treat it as an early exit for that
+SSA name.
+
+This cleans it up and renames the variables to something that's hopefully
+clearer to their intention.
+
+gcc/ChangeLog:
+
+ PR tree-optimization/113808
+ * tree-vect-loop.cc (vectorizable_live_operation): Don't cache the
+ value cross iterations.
+
+gcc/testsuite/ChangeLog:
+
+ PR tree-optimization/113808
+ * gfortran.dg/vect/vect-early-break_1-PR113808.f90: New test.
+
+(cherry picked from commit 3f69db1812106cb5bab203e17a60300ac51cdc68)
+---
+ .../vect/vect-early-break_1-PR113808.f90 | 21 +++++++++++++++++++
+ gcc/tree-vect-loop.cc | 5 ++---
+ 2 files changed, 23 insertions(+), 3 deletions(-)
+ create mode 100644 gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
+
+diff --git a/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90 b/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
+new file mode 100644
+index 000000000000..5c339fa7a348
+--- /dev/null
++++ b/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
+@@ -0,0 +1,21 @@
++! { dg-add-options vect_early_break }
++! { dg-require-effective-target vect_early_break }
++! { dg-require-effective-target vect_long_long }
++! { dg-additional-options "-fopenmp-simd" }
++
++! { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } }
++
++program main
++ integer :: n, i,k
++ n = 11
++ do i = 1, n,2
++ !$omp simd lastprivate(k)
++ do k = 1, i + 41
++ if (k > 11 + 41 .or. k < 1) error stop
++ end do
++ end do
++ if (k /= 53) then
++ print *, k, 53
++ error stop
++ endif
++end
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index 190df9ec7741..eed2268e9bae 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -10950,7 +10950,7 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ did. For the live values we want the value at the start of the iteration
+ rather than at the end. */
+ edge main_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
+- bool restart_loop = LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
++ bool all_exits_as_early_p = LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
+ FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
+ if (!is_gimple_debug (use_stmt)
+ && !flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
+@@ -10966,8 +10966,7 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ /* For early exit where the exit is not in the BB that leads
+ to the latch then we're restarting the iteration in the
+ scalar loop. So get the first live value. */
+- restart_loop = restart_loop || !main_exit_edge;
+- if (restart_loop
++ if ((all_exits_as_early_p || !main_exit_edge)
+ && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
+ {
+ tmp_vec_lhs = vec_lhs0;
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/78_all_PR113776-c-boolean-conversion.patch b/14.0.0/gentoo/78_all_PR113776-c-boolean-conversion.patch
new file mode 100644
index 0000000..52d731f
--- /dev/null
+++ b/14.0.0/gentoo/78_all_PR113776-c-boolean-conversion.patch
@@ -0,0 +1,117 @@
+From bfcee89a63538b80b966b2fa7ad21d4d38fd8b3c Mon Sep 17 00:00:00 2001
+From: Joseph Myers <josmyers@redhat.com>
+Date: Thu, 8 Feb 2024 01:34:09 +0000
+Subject: [PATCH] c: Fix boolean conversion of floating constant as integer
+ constant expression [PR113776]
+
+My fix for bug 111059 and bug 111911 caused a conversion of a floating
+constant to boolean to wrongly no longer be considered an integer
+constant expression, because logic to insert a NOP_EXPR in
+c_objc_common_truthvalue_conversion for an argument not an integer
+constant expression itself now took place after rather than before the
+conversion to bool. In the specific case of casting a floating
+constant to bool, the result is an integer constant expression even
+though the argument isn't (build_c_cast deals with ensuring that casts
+to integer type of anything of floating type more complicated than a
+single floating constant don't get wrongly treated as integer constant
+expressions even if they fold to constants), so fix the logic in
+c_objc_common_truthvalue_conversion to handle that special case.
+
+Bootstrapped with no regressions for x86_64-pc-linux-gnu.
+
+ PR c/113776
+
+gcc/c
+ * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
+ integer constant expression for boolean conversion of floating
+ constant.
+
+gcc/testsuite/
+ * gcc.dg/pr113776-1.c, gcc.dg/pr113776-2.c, gcc.dg/pr113776-3.c,
+ gcc.dg/pr113776-4.c: New tests.
+
+(cherry picked from commit bfd72bb44eca83b0db2b0bab895f27a8a44247a2)
+---
+ gcc/c/c-typeck.cc | 12 +++++++++++-
+ gcc/testsuite/gcc.dg/pr113776-1.c | 5 +++++
+ gcc/testsuite/gcc.dg/pr113776-2.c | 4 ++++
+ gcc/testsuite/gcc.dg/pr113776-3.c | 7 +++++++
+ gcc/testsuite/gcc.dg/pr113776-4.c | 6 ++++++
+ 5 files changed, 33 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.dg/pr113776-1.c
+ create mode 100644 gcc/testsuite/gcc.dg/pr113776-2.c
+ create mode 100644 gcc/testsuite/gcc.dg/pr113776-3.c
+ create mode 100644 gcc/testsuite/gcc.dg/pr113776-4.c
+
+diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
+index 3b519c48ae0a..ddeab1e2a8a1 100644
+--- a/gcc/c/c-typeck.cc
++++ b/gcc/c/c-typeck.cc
+@@ -13572,7 +13572,17 @@ c_objc_common_truthvalue_conversion (location_t location, tree expr, tree type)
+ break;
+ }
+
+- int_const = (TREE_CODE (expr) == INTEGER_CST && !TREE_OVERFLOW (expr));
++ /* Conversion of a floating constant to boolean goes through here
++ and yields an integer constant expression. Otherwise, the result
++ is only an integer constant expression if the argument is. */
++ int_const = ((TREE_CODE (expr) == INTEGER_CST && !TREE_OVERFLOW (expr))
++ || ((TREE_CODE (expr) == REAL_CST
++ || TREE_CODE (expr) == COMPLEX_CST)
++ && (TREE_CODE (type) == BOOLEAN_TYPE
++ || (TREE_CODE (type) == ENUMERAL_TYPE
++ && ENUM_UNDERLYING_TYPE (type) != NULL_TREE
++ && (TREE_CODE (ENUM_UNDERLYING_TYPE (type))
++ == BOOLEAN_TYPE)))));
+ int_operands = EXPR_INT_CONST_OPERANDS (expr);
+ if (int_operands && TREE_CODE (expr) != INTEGER_CST)
+ {
+diff --git a/gcc/testsuite/gcc.dg/pr113776-1.c b/gcc/testsuite/gcc.dg/pr113776-1.c
+new file mode 100644
+index 000000000000..36190fbc3fec
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr113776-1.c
+@@ -0,0 +1,5 @@
++/* { dg-do compile } */
++/* { dg-options "-std=c11 -pedantic" } */
++
++char d[(_Bool)0.5 == 1 ? 1 : -1];
++char f[(_Bool)0.0 == 0 ? 1 : -1];
+diff --git a/gcc/testsuite/gcc.dg/pr113776-2.c b/gcc/testsuite/gcc.dg/pr113776-2.c
+new file mode 100644
+index 000000000000..9e88210892a4
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr113776-2.c
+@@ -0,0 +1,4 @@
++/* { dg-do compile } */
++/* { dg-options "-std=c11 -pedantic" } */
++
++enum e { A = (_Bool) 0.0, B = (_Bool) 0.5, C = (_Bool) 1.0 };
+diff --git a/gcc/testsuite/gcc.dg/pr113776-3.c b/gcc/testsuite/gcc.dg/pr113776-3.c
+new file mode 100644
+index 000000000000..c615994a89f6
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr113776-3.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile } */
++/* { dg-options "-std=c23 -pedantic" } */
++
++enum ebool : bool { BF, BT };
++
++char d[(enum ebool)0.5 == 1 ? 1 : -1];
++char f[(enum ebool)0.0 == 0 ? 1 : -1];
+diff --git a/gcc/testsuite/gcc.dg/pr113776-4.c b/gcc/testsuite/gcc.dg/pr113776-4.c
+new file mode 100644
+index 000000000000..1b57557746e1
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr113776-4.c
+@@ -0,0 +1,6 @@
++/* { dg-do compile } */
++/* { dg-options "-std=c23 -pedantic" } */
++
++enum ebool : bool { BF, BT };
++
++enum e { A = (enum ebool) 0.0, B = (enum ebool) 0.5, C = (enum ebool) 1.0 };
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index afaa988..dd2e0a0 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,10 @@
+20 8 Feb 2024
+
+ + 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
+ + 76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch
+ + 77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch
+ + 78_all_PR113776-c-boolean-conversion.patch
+
19 5 Feb 2024
- 76_all_PR113467-vect-miscompile.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-04-07 23:25 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-04-07 23:25 UTC (permalink / raw
To: gentoo-commits
commit: 257336021ebdc63cdd390487506f23d83f04ab91
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 7 23:23:32 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 7 23:23:32 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=25733602
14.0.0: rebase patches
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/02_all_default-warn-format-security.patch | 9 ++++-----
14.0.0/gentoo/04_all_nossp-on-nostdlib.patch | 9 +++++----
14.0.0/gentoo/README.history | 5 +++++
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/14.0.0/gentoo/02_all_default-warn-format-security.patch b/14.0.0/gentoo/02_all_default-warn-format-security.patch
index 9723a1c..439d9d8 100644
--- a/14.0.0/gentoo/02_all_default-warn-format-security.patch
+++ b/14.0.0/gentoo/02_all_default-warn-format-security.patch
@@ -1,9 +1,8 @@
Enable -Wformat and -Wformat-security by default.
-
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
-@@ -696,7 +696,7 @@ Warn about function calls with format strings that write past the end
- of the destination region. Same as -Wformat-overflow=1.
+@@ -770,7 +770,7 @@ Warn about function calls with format strings that write past the end
+ of the destination region.
Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
@@ -11,7 +10,7 @@ Enable -Wformat and -Wformat-security by default.
Warn about possible security problems with format functions.
Wformat-signedness
-@@ -717,7 +717,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
+@@ -795,7 +795,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
Warn about zero-length formats.
Wformat=
@@ -19,4 +18,4 @@ Enable -Wformat and -Wformat-security by default.
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
Warn about printf/scanf/strftime/strfmon format string anomalies.
- Wformat-overflow=
+ Wframe-address
diff --git a/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch b/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch
index b633d7f..30c5825 100644
--- a/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch
+++ b/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch
@@ -1,5 +1,4 @@
-Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
-
+│Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
https://bugs.gentoo.org/484714
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -16,12 +15,14 @@ https://bugs.gentoo.org/484714
#ifndef LINK_SSP_SPEC
#ifdef TARGET_LIBC_PROVIDES_SSP
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-@@ -1280,7 +1286,7 @@ static const char *cc1_options =
+@@ -1286,7 +1292,7 @@ static const char *cc1_options =
%{-version:--version}\
%{-help=*:--help=%*}\
%{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
- %{fsyntax-only:-o %j} %{-param*}\
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
%{coverage:-fprofile-arcs -ftest-coverage}\
- %{fprofile-arcs|fprofile-generate*|coverage:\
+ %{fprofile-arcs|fcondition-coverage|fprofile-generate*|coverage:\
%{!fprofile-update=single:\
+--
+2.44.0
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 33e0319..8e0250c 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,8 @@
+26 7 Apr 2024
+
+ U 02_all_default-warn-format-security.patch
+ U 04_all_nossp-on-nostdlib.patch
+
25 11 Mar 2024
- 50_all_PR111632_system_cxx_headers_libcxx.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-03-11 12:43 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-03-11 12:43 UTC (permalink / raw
To: gentoo-commits
commit: 4e3f1da7f6c300d2e89a00922177e6195d217e41
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 11 12:38:16 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 11 12:38:16 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4e3f1da7
14.0.0: cut patchset 25
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 66c059f..33e0319 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,8 @@
+25 11 Mar 2024
+
+ - 50_all_PR111632_system_cxx_headers_libcxx.patch
+ - 75_all_arm_PR113915-atomics.patch
+
24 3 Mar 2024
+ 76_all_ppc_PR112868-no-checking-many.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-03-07 20:41 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-03-07 20:41 UTC (permalink / raw
To: gentoo-commits
commit: 66ed76361b07f18610a134dca21c6945f03c6a6b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 7 20:41:22 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 7 20:41:22 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=66ed7636
14.0.0: drop 50_all_PR111632_system_cxx_headers_libcxx.patch
qookie reports it's broken:
```
x86_64-pc-linux-gnu-g++ -fPIC -c -DIN_GCC_FRONTEND -march=znver2 -pipe -ggdb3 -D_GLIBCXX_ASSERTIONS -O3 -fno-harden-control-flow-redundancy -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -fPIC -I. -Ijit -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/jit -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../include -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../libcpp/include -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../libcody -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../libdecnumber/bid
-I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../libbacktrace -o jit/jit-recording.o -MT jit/jit-recording.o -MMD -MP -MF jit/.deps/jit-recording.TPo /var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/jit/jit-recording.cc
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/basic_ios.h:37,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ios:46,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/istream:40,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/sstream:40,
from /var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/system.h:774,
from /var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/jit/jit-recording.cc:25:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/locale_facets.h:250:53: error: macro "toupper" passed 2 arguments, but takes just 1
250 | toupper(char_type *__lo, const char_type* __hi) const
| ^
In file included from /var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/system.h:235:
/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/gcc/../include/safe-ctype.h:146:9: note: macro "toupper" defined here
146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
| ^~~~~~~
[...]
```
Signed-off-by: Sam James <sam <AT> gentoo.org>
| 239 ---------------------
1 file changed, 239 deletions(-)
diff --git a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
deleted file mode 100644
index d44963e..0000000
--- a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-https://bugs.gentoo.org/912035
-https://inbox.sourceware.org/gcc-patches/0623E896-6B99-49EC-9144-B41BC51089F0@andric.com
-https://inbox.sourceware.org/gcc-patches/15D35FFE-1E97-4047-A75C-F13D25826E15@andric.com
-https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038
-https://gcc.gnu.org/PR111632
-
-From 025e2a1abb2d14b421cb1e4b0aaae43c87bceb71 Mon Sep 17 00:00:00 2001
-From: Dimitry Andric <dimitry@andric.com>
-Date: Tue, 30 Jan 2024 20:03:38 +0000
-Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
- over-poisoning
-
-When building gcc's C++ sources against recent libc++, the poisoning of
-the ctype macros due to including safe-ctype.h before including C++
-standard headers such as <list>, <map>, etc, causes many compilation
-errors, similar to:
-
-In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
-In file included from /home/dim/src/gcc/master/gcc/system.h:233:
-In file included from /usr/include/c++/v1/vector:321:
-In file included from
-/usr/include/c++/v1/__format/formatter_bool.h:20:
-In file included from
-/usr/include/c++/v1/__format/formatter_integral.h:32:
-In file included from /usr/include/c++/v1/locale:202:
-/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
-only applies to structs, variables, functions, and namespaces
-546 | _LIBCPP_INLINE_VISIBILITY
- | ^
-/usr/include/c++/v1/__config:813:37: note: expanded from macro
-'_LIBCPP_INLINE_VISIBILITY'
-813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
- | ^
-/usr/include/c++/v1/__config:792:26: note: expanded from macro
-'_LIBCPP_HIDE_FROM_ABI'
-792 |
-__attribute__((__abi_tag__(_LIBCPP_TOSTRING(
-_LIBCPP_VERSIONED_IDENTIFIER))))
- | ^
-In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
-In file included from /home/dim/src/gcc/master/gcc/system.h:233:
-In file included from /usr/include/c++/v1/vector:321:
-In file included from
-/usr/include/c++/v1/__format/formatter_bool.h:20:
-In file included from
-/usr/include/c++/v1/__format/formatter_integral.h:32:
-In file included from /usr/include/c++/v1/locale:202:
-/usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
-declaration list
-547 | char_type toupper(char_type __c) const
- | ^
-/usr/include/c++/v1/__locale:553:48: error: too many arguments
-provided to function-like macro invocation
-553 | const char_type* toupper(char_type* __low, const
-char_type* __high) const
- | ^
-/home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
-macro 'toupper' defined here
-146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
- | ^
-
-This is because libc++ uses different transitive includes than
-libstdc++, and some of those transitive includes pull in various ctype
-declarations (typically via <locale>).
-
-There was already a special case for including <string> before
-safe-ctype.h, so move the rest of the C++ standard header includes to
-the same location, to fix the problem.
-
-Signed-off-by: Dimitry Andric <dimitry@andric.com>
----
- gcc/jit/dummy-frontend.cc | 2 ++
- gcc/jit/jit-builtins.cc | 2 ++
- gcc/jit/jit-playback.cc | 2 ++
- gcc/jit/jit-playback.h | 7 +++----
- gcc/jit/jit-recording.cc | 4 +++-
- gcc/jit/jit-recording.h | 6 +++---
- gcc/jit/libgccjit.cc | 2 ++
- libcc1/libcc1plugin.cc | 3 +--
- libcc1/libcp1plugin.cc | 3 +--
- 9 files changed, 19 insertions(+), 12 deletions(-)
-
-diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit/dummy-frontend.cc
-index dbeeacd17a86..2339e593d028 100644
---- a/gcc/jit/dummy-frontend.cc
-+++ b/gcc/jit/dummy-frontend.cc
-@@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #include "config.h"
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
- #include "system.h"
- #include "coretypes.h"
- #include "jit-playback.h"
-diff --git a/gcc/jit/jit-builtins.cc b/gcc/jit/jit-builtins.cc
-index e0bb24738ddf..c69e64fd6ee5 100644
---- a/gcc/jit/jit-builtins.cc
-+++ b/gcc/jit/jit-builtins.cc
-@@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #include "config.h"
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
- #include "system.h"
- #include "coretypes.h"
- #include "target.h"
-diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
-index 6baa838af10a..90e3b0ff1907 100644
---- a/gcc/jit/jit-playback.cc
-+++ b/gcc/jit/jit-playback.cc
-@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
-
- #include "config.h"
- #define INCLUDE_MUTEX
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
- #include "libgccjit.h"
- #include "system.h"
- #include "coretypes.h"
-diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
-index aa6a086613c5..751a55526e16 100644
---- a/gcc/jit/jit-playback.h
-+++ b/gcc/jit/jit-playback.h
-@@ -21,10 +21,9 @@ along with GCC; see the file COPYING3. If not see
- #ifndef JIT_PLAYBACK_H
- #define JIT_PLAYBACK_H
-
--#include <string>
--#include <utility> // for std::pair
--#include <vector>
--
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
-+#include "system.h"
- #include "timevar.h"
- #include "varasm.h"
-
-diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
-index 68a2e860c1fb..4fa0ae02ef91 100644
---- a/gcc/jit/jit-recording.cc
-+++ b/gcc/jit/jit-recording.cc
-@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>. */
-
- #include "config.h"
-+#define INCLUDE_SSTREAM
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
- #include "system.h"
- #include "coretypes.h"
- #include "tm.h"
-@@ -29,7 +32,6 @@ along with GCC; see the file COPYING3. If not see
- #include "jit-builtins.h"
- #include "jit-recording.h"
- #include "jit-playback.h"
--#include <sstream>
-
- namespace gcc {
- namespace jit {
-diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h
-index d8d16f4fe29c..679f86662a6b 100644
---- a/gcc/jit/jit-recording.h
-+++ b/gcc/jit/jit-recording.h
-@@ -21,12 +21,12 @@ along with GCC; see the file COPYING3. If not see
- #ifndef JIT_RECORDING_H
- #define JIT_RECORDING_H
-
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
- #include "jit-common.h"
- #include "jit-logging.h"
- #include "libgccjit.h"
--
--#include <string>
--#include <vector>
-+#include "system.h"
-
- class timer;
-
-diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc
-index f40a97814051..3bbe4dcd75cb 100644
---- a/gcc/jit/libgccjit.cc
-+++ b/gcc/jit/libgccjit.cc
-@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
-
- #include "config.h"
- #define INCLUDE_MUTEX
-+#define INCLUDE_STRING
-+#define INCLUDE_VECTOR
- #include "system.h"
- #include "coretypes.h"
- #include "timevar.h"
-diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
-index 72d17c3b81c5..e64847466f4d 100644
---- a/libcc1/libcc1plugin.cc
-+++ b/libcc1/libcc1plugin.cc
-@@ -32,6 +32,7 @@
- #undef PACKAGE_VERSION
-
- #define INCLUDE_MEMORY
-+#define INCLUDE_VECTOR
- #include "gcc-plugin.h"
- #include "system.h"
- #include "coretypes.h"
-@@ -69,8 +70,6 @@
- #include "gcc-c-interface.h"
- #include "context.hh"
-
--#include <vector>
--
- using namespace cc1_plugin;
-
- \f
-diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
-index 0eff7c68d298..da68c5d0ac1b 100644
---- a/libcc1/libcp1plugin.cc
-+++ b/libcc1/libcp1plugin.cc
-@@ -33,6 +33,7 @@
- #undef PACKAGE_VERSION
-
- #define INCLUDE_MEMORY
-+#define INCLUDE_VECTOR
- #include "gcc-plugin.h"
- #include "system.h"
- #include "coretypes.h"
-@@ -71,8 +72,6 @@
- #include "rpc.hh"
- #include "context.hh"
-
--#include <vector>
--
- using namespace cc1_plugin;
-
- \f
---
-2.44.0
-
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-03-07 20:14 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-03-07 20:14 UTC (permalink / raw
To: gentoo-commits
commit: a1cfe852efbba70ce855b09c38f202d05583bbb1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 7 20:14:27 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 7 20:14:27 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a1cfe852
14.0.0: update 50_all_PR111632_system_cxx_headers_libcxx.patch
Partly upstreamed.
Signed-off-by: Sam James <sam <AT> gentoo.org>
| 351 +++++++++++++--------
1 file changed, 228 insertions(+), 123 deletions(-)
--git a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
index af6c286..d44963e 100644
--- a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
+++ b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
@@ -1,134 +1,239 @@
https://bugs.gentoo.org/912035
https://inbox.sourceware.org/gcc-patches/0623E896-6B99-49EC-9144-B41BC51089F0@andric.com
+https://inbox.sourceware.org/gcc-patches/15D35FFE-1E97-4047-A75C-F13D25826E15@andric.com
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038
https://gcc.gnu.org/PR111632
-commit 8992952bfa95e769a554bd97581cf332987383d8
-Author: Dimitry Andric <dimitry@andric.com>
-Date: 2023-09-28T17:40:29+02:00
+From 025e2a1abb2d14b421cb1e4b0aaae43c87bceb71 Mon Sep 17 00:00:00 2001
+From: Dimitry Andric <dimitry@andric.com>
+Date: Tue, 30 Jan 2024 20:03:38 +0000
+Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
+ over-poisoning
- Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
-
- When building gcc's C++ sources against recent libc++, the poisoning of
- the ctype macros due to including safe-ctype.h before including C++
- standard headers such as <list>, <map>, etc, causes many compilation
- errors, similar to:
-
- In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
- In file included from /home/dim/src/gcc/master/gcc/system.h:233:
- In file included from /usr/include/c++/v1/vector:321:
- In file included from
- /usr/include/c++/v1/__format/formatter_bool.h:20:
- In file included from
- /usr/include/c++/v1/__format/formatter_integral.h:32:
- In file included from /usr/include/c++/v1/locale:202:
- /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
- only applies to structs, variables, functions, and namespaces
- 546 | _LIBCPP_INLINE_VISIBILITY
- | ^
- /usr/include/c++/v1/__config:813:37: note: expanded from macro
- '_LIBCPP_INLINE_VISIBILITY'
- 813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
- | ^
- /usr/include/c++/v1/__config:792:26: note: expanded from macro
- '_LIBCPP_HIDE_FROM_ABI'
- 792 |
- __attribute__((__abi_tag__(_LIBCPP_TOSTRING(
- _LIBCPP_VERSIONED_IDENTIFIER))))
- | ^
- In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
- In file included from /home/dim/src/gcc/master/gcc/system.h:233:
- In file included from /usr/include/c++/v1/vector:321:
- In file included from
- /usr/include/c++/v1/__format/formatter_bool.h:20:
- In file included from
- /usr/include/c++/v1/__format/formatter_integral.h:32:
- In file included from /usr/include/c++/v1/locale:202:
- /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
- declaration list
- 547 | char_type toupper(char_type __c) const
- | ^
- /usr/include/c++/v1/__locale:553:48: error: too many arguments
- provided to function-like macro invocation
- 553 | const char_type* toupper(char_type* __low, const
- char_type* __high) const
- | ^
- /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
- macro 'toupper' defined here
- 146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
- | ^
-
- This is because libc++ uses different transitive includes than
- libstdc++, and some of those transitive includes pull in various ctype
- declarations (typically via <locale>).
-
- There was already a special case for including <string> before
- safe-ctype.h, so move the rest of the C++ standard header includes to
- the same location, to fix the problem.
-
- Signed-off-by: Dimitry Andric <dimitry@andric.com>
+When building gcc's C++ sources against recent libc++, the poisoning of
+the ctype macros due to including safe-ctype.h before including C++
+standard headers such as <list>, <map>, etc, causes many compilation
+errors, similar to:
-diff --git a/gcc/system.h b/gcc/system.h
-index e924152ad4c..7a516b11438 100644
---- a/gcc/system.h
-+++ b/gcc/system.h
-@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
- #undef fread_unlocked
- #undef fwrite_unlocked
-
--/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
-- the ctype macros through safe-ctype.h */
--
--#ifdef __cplusplus
--#ifdef INCLUDE_STRING
--# include <string>
--#endif
--#endif
+In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+In file included from /usr/include/c++/v1/vector:321:
+In file included from
+/usr/include/c++/v1/__format/formatter_bool.h:20:
+In file included from
+/usr/include/c++/v1/__format/formatter_integral.h:32:
+In file included from /usr/include/c++/v1/locale:202:
+/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
+only applies to structs, variables, functions, and namespaces
+546 | _LIBCPP_INLINE_VISIBILITY
+ | ^
+/usr/include/c++/v1/__config:813:37: note: expanded from macro
+'_LIBCPP_INLINE_VISIBILITY'
+813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+ | ^
+/usr/include/c++/v1/__config:792:26: note: expanded from macro
+'_LIBCPP_HIDE_FROM_ABI'
+792 |
+__attribute__((__abi_tag__(_LIBCPP_TOSTRING(
+_LIBCPP_VERSIONED_IDENTIFIER))))
+ | ^
+In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+In file included from /usr/include/c++/v1/vector:321:
+In file included from
+/usr/include/c++/v1/__format/formatter_bool.h:20:
+In file included from
+/usr/include/c++/v1/__format/formatter_integral.h:32:
+In file included from /usr/include/c++/v1/locale:202:
+/usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
+declaration list
+547 | char_type toupper(char_type __c) const
+ | ^
+/usr/include/c++/v1/__locale:553:48: error: too many arguments
+provided to function-like macro invocation
+553 | const char_type* toupper(char_type* __low, const
+char_type* __high) const
+ | ^
+/home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
+macro 'toupper' defined here
+146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
+ | ^
+
+This is because libc++ uses different transitive includes than
+libstdc++, and some of those transitive includes pull in various ctype
+declarations (typically via <locale>).
+
+There was already a special case for including <string> before
+safe-ctype.h, so move the rest of the C++ standard header includes to
+the same location, to fix the problem.
+
+Signed-off-by: Dimitry Andric <dimitry@andric.com>
+---
+ gcc/jit/dummy-frontend.cc | 2 ++
+ gcc/jit/jit-builtins.cc | 2 ++
+ gcc/jit/jit-playback.cc | 2 ++
+ gcc/jit/jit-playback.h | 7 +++----
+ gcc/jit/jit-recording.cc | 4 +++-
+ gcc/jit/jit-recording.h | 6 +++---
+ gcc/jit/libgccjit.cc | 2 ++
+ libcc1/libcc1plugin.cc | 3 +--
+ libcc1/libcp1plugin.cc | 3 +--
+ 9 files changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/gcc/jit/dummy-frontend.cc b/gcc/jit/dummy-frontend.cc
+index dbeeacd17a86..2339e593d028 100644
+--- a/gcc/jit/dummy-frontend.cc
++++ b/gcc/jit/dummy-frontend.cc
+@@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #include "config.h"
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
+ #include "system.h"
+ #include "coretypes.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/jit-builtins.cc b/gcc/jit/jit-builtins.cc
+index e0bb24738ddf..c69e64fd6ee5 100644
+--- a/gcc/jit/jit-builtins.cc
++++ b/gcc/jit/jit-builtins.cc
+@@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #include "config.h"
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
+ #include "system.h"
+ #include "coretypes.h"
+ #include "target.h"
+diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
+index 6baa838af10a..90e3b0ff1907 100644
+--- a/gcc/jit/jit-playback.cc
++++ b/gcc/jit/jit-playback.cc
+@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
+
+ #include "config.h"
+ #define INCLUDE_MUTEX
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
+ #include "libgccjit.h"
+ #include "system.h"
+ #include "coretypes.h"
+diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
+index aa6a086613c5..751a55526e16 100644
+--- a/gcc/jit/jit-playback.h
++++ b/gcc/jit/jit-playback.h
+@@ -21,10 +21,9 @@ along with GCC; see the file COPYING3. If not see
+ #ifndef JIT_PLAYBACK_H
+ #define JIT_PLAYBACK_H
+
+-#include <string>
+-#include <utility> // for std::pair
+-#include <vector>
-
--/* There are an extraordinary number of issues with <ctype.h>.
-- The last straw is that it varies with the locale. Use libiberty's
-- replacement instead. */
--#include "safe-ctype.h"
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
++#include "system.h"
+ #include "timevar.h"
+ #include "varasm.h"
+
+diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc
+index 68a2e860c1fb..4fa0ae02ef91 100644
+--- a/gcc/jit/jit-recording.cc
++++ b/gcc/jit/jit-recording.cc
+@@ -19,6 +19,9 @@ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+ #include "config.h"
++#define INCLUDE_SSTREAM
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
+ #include "system.h"
+ #include "coretypes.h"
+ #include "tm.h"
+@@ -29,7 +32,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+-#include <sstream>
+
+ namespace gcc {
+ namespace jit {
+diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h
+index d8d16f4fe29c..679f86662a6b 100644
+--- a/gcc/jit/jit-recording.h
++++ b/gcc/jit/jit-recording.h
+@@ -21,12 +21,12 @@ along with GCC; see the file COPYING3. If not see
+ #ifndef JIT_RECORDING_H
+ #define JIT_RECORDING_H
+
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
+ #include "jit-common.h"
+ #include "jit-logging.h"
+ #include "libgccjit.h"
-
--#include <sys/types.h>
+-#include <string>
+-#include <vector>
++#include "system.h"
+
+ class timer;
+
+diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc
+index f40a97814051..3bbe4dcd75cb 100644
+--- a/gcc/jit/libgccjit.cc
++++ b/gcc/jit/libgccjit.cc
+@@ -20,6 +20,8 @@ along with GCC; see the file COPYING3. If not see
+
+ #include "config.h"
+ #define INCLUDE_MUTEX
++#define INCLUDE_STRING
++#define INCLUDE_VECTOR
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
+index 72d17c3b81c5..e64847466f4d 100644
+--- a/libcc1/libcc1plugin.cc
++++ b/libcc1/libcc1plugin.cc
+@@ -32,6 +32,7 @@
+ #undef PACKAGE_VERSION
+
+ #define INCLUDE_MEMORY
++#define INCLUDE_VECTOR
+ #include "gcc-plugin.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -69,8 +70,6 @@
+ #include "gcc-c-interface.h"
+ #include "context.hh"
+
+-#include <vector>
-
--#include <errno.h>
+ using namespace cc1_plugin;
+
+ \f
+diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
+index 0eff7c68d298..da68c5d0ac1b 100644
+--- a/libcc1/libcp1plugin.cc
++++ b/libcc1/libcp1plugin.cc
+@@ -33,6 +33,7 @@
+ #undef PACKAGE_VERSION
+
+ #define INCLUDE_MEMORY
++#define INCLUDE_VECTOR
+ #include "gcc-plugin.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -71,8 +72,6 @@
+ #include "rpc.hh"
+ #include "context.hh"
+
+-#include <vector>
-
--#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
--extern int errno;
--#endif
-+/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
-+ poisoning the ctype macros through safe-ctype.h */
-
- #ifdef __cplusplus
- #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
-@@ -229,6 +210,9 @@ extern int errno;
- #ifdef INCLUDE_SET
- # include <set>
- #endif
-+#ifdef INCLUDE_STRING
-+# include <string>
-+#endif
- #ifdef INCLUDE_VECTOR
- # include <vector>
- #endif
-@@ -245,6 +229,19 @@ extern int errno;
- # include <type_traits>
- #endif
-
-+/* There are an extraordinary number of issues with <ctype.h>.
-+ The last straw is that it varies with the locale. Use libiberty's
-+ replacement instead. */
-+#include "safe-ctype.h"
-+
-+#include <sys/types.h>
-+
-+#include <errno.h>
-+
-+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
-+extern int errno;
-+#endif
-+
- /* Some of glibc's string inlines cause warnings. Plus we'd rather
- rely on (and therefore test) GCC's string builtins. */
- #define __NO_STRING_INLINES
+ using namespace cc1_plugin;
+
+ \f
+--
+2.44.0
+
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-03-06 17:47 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-03-06 17:47 UTC (permalink / raw
To: gentoo-commits
commit: 4d92f1b90d9a1f0bfc9280745bd6cfb2fd68a2e8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 6 17:46:52 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 6 17:46:52 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4d92f1b9
14.0.0: drop 75_all_arm_PR113915-atomics.patch
Fixed upstream.
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_arm_PR113915-atomics.patch | 36 -------------------------
1 file changed, 36 deletions(-)
diff --git a/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch b/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch
deleted file mode 100644
index 82fa84a..0000000
--- a/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 9b1d9f15e7ecfd7d27a2bb878efb6577741eecaa Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Sun, 18 Feb 2024 22:58:51 +0000
-Subject: [PATCH] arm: fix inconsistency between atomic patterns and expected
- attributes
-
-Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9.
-
-Bug: https://gcc.gnu.org/PR113915
-Bug: https://bugs.gentoo.org/924237
----
- gcc/config/arm/arm.cc | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
-index 1cd69268ee98..9f0d2405b905 100644
---- a/gcc/config/arm/arm.cc
-+++ b/gcc/config/arm/arm.cc
-@@ -25614,11 +25614,12 @@ arm_final_prescan_insn (rtx_insn *insn)
-
- case INSN:
- /* Instructions using or affecting the condition codes make it
-- fail. */
-+ fail or ones which cannot be predicable. */
- scanbody = PATTERN (this_insn);
- if (!(GET_CODE (scanbody) == SET
- || GET_CODE (scanbody) == PARALLEL)
-- || get_attr_conds (this_insn) != CONDS_NOCOND)
-+ || get_attr_conds (this_insn) != CONDS_NOCOND
-+ || get_attr_predicable (this_insn) != PREDICABLE_YES)
- fail = TRUE;
- break;
-
---
-2.43.2
-
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-03-03 22:58 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-03-03 22:58 UTC (permalink / raw
To: gentoo-commits
commit: c8305c9bdf09abe3e2f89783fe62f2e4049468fa
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 3 22:55:47 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 3 22:55:47 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c8305c9b
14.0.0: add 76_all_ppc_PR112868-no-checking-many.patch
Bug: https://gcc.gnu.org/PR112868
Bug: https://gcc.gnu.org/PR113652 (sort of)
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../76_all_ppc_PR112868-no-checking-many.patch | 42 ++++++++++++++++++++++
14.0.0/gentoo/README.history | 4 +++
2 files changed, 46 insertions(+)
diff --git a/14.0.0/gentoo/76_all_ppc_PR112868-no-checking-many.patch b/14.0.0/gentoo/76_all_ppc_PR112868-no-checking-many.patch
new file mode 100644
index 0000000..dc9f5e5
--- /dev/null
+++ b/14.0.0/gentoo/76_all_ppc_PR112868-no-checking-many.patch
@@ -0,0 +1,42 @@
+https://gcc.gnu.org/PR112868 (specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112868#c8)
+(see also https://gcc.gnu.org/PR113652)
+
+--- a/gcc/config/rs6000/rs6000.h
++++ b/gcc/config/rs6000/rs6000.h
+@@ -94,12 +94,6 @@
+ "%{mdejagnu-*: %<mdejagnu-*}", \
+ SUBTARGET_DRIVER_SELF_SPECS
+
+-#if CHECKING_P
+-#define ASM_OPT_ANY ""
+-#else
+-#define ASM_OPT_ANY " -many"
+-#endif
+-
+ /* Common ASM definitions used by ASM_SPEC among the various targets for
+ handling -mcpu=xxx switches. There is a parallel list in driver-rs6000.cc to
+ provide the default assembler options if the user uses -mcpu=native, so if
+@@ -166,8 +160,7 @@
+ mvsx: -mpower7; \
+ mpowerpc64: -mppc64;: %(asm_default)}; \
+ :%eMissing -mcpu option in ASM_CPU_SPEC?\n} \
+-%{mvsx: -mvsx -maltivec; maltivec: -maltivec}" \
+-ASM_OPT_ANY
++%{mvsx: -mvsx -maltivec; maltivec: -maltivec}"
+
+ #define CPP_DEFAULT_SPEC ""
+
+--- a/gcc/testsuite/lib/target-supports.exp
++++ b/gcc/testsuite/lib/target-supports.exp
+@@ -7285,7 +7285,7 @@ proc check_effective_target_powerpc_ppu_ok { } {
+ #endif
+ return 0;
+ }
+- }]
++ } "-mcpu=cell"]
+ } else {
+ return 0
+ }
+
+
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index dd7c933..66c059f 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+24 3 Mar 2024
+
+ + 76_all_ppc_PR112868-no-checking-many.patch
+
23 19 Feb 2024
- 75_all_PR113734_middle_end_update_vector_loop_bounds.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-19 0:02 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-19 0:02 UTC (permalink / raw
To: gentoo-commits
commit: e54a7fbca63053b5753fd9ba543c27ef392d3084
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 19 00:01:46 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 19 00:01:46 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e54a7fbc
14.0.0: arm: fix inconsistency between atomic patterns and expected attributes
Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9.
Bug: https://gcc.gnu.org/PR113915
Bug: https://bugs.gentoo.org/924237
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_arm_PR113915-atomics.patch | 36 +++++++++++++++++++++++++
14.0.0/gentoo/README.history | 5 ++++
2 files changed, 41 insertions(+)
diff --git a/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch b/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch
new file mode 100644
index 0000000..82fa84a
--- /dev/null
+++ b/14.0.0/gentoo/75_all_arm_PR113915-atomics.patch
@@ -0,0 +1,36 @@
+From 9b1d9f15e7ecfd7d27a2bb878efb6577741eecaa Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 18 Feb 2024 22:58:51 +0000
+Subject: [PATCH] arm: fix inconsistency between atomic patterns and expected
+ attributes
+
+Apply workaround patch from Andrew Pinski at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915#c9.
+
+Bug: https://gcc.gnu.org/PR113915
+Bug: https://bugs.gentoo.org/924237
+---
+ gcc/config/arm/arm.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc
+index 1cd69268ee98..9f0d2405b905 100644
+--- a/gcc/config/arm/arm.cc
++++ b/gcc/config/arm/arm.cc
+@@ -25614,11 +25614,12 @@ arm_final_prescan_insn (rtx_insn *insn)
+
+ case INSN:
+ /* Instructions using or affecting the condition codes make it
+- fail. */
++ fail or ones which cannot be predicable. */
+ scanbody = PATTERN (this_insn);
+ if (!(GET_CODE (scanbody) == SET
+ || GET_CODE (scanbody) == PARALLEL)
+- || get_attr_conds (this_insn) != CONDS_NOCOND)
++ || get_attr_conds (this_insn) != CONDS_NOCOND
++ || get_attr_predicable (this_insn) != PREDICABLE_YES)
+ fail = TRUE;
+ break;
+
+--
+2.43.2
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 8cfb3c2..dd7c933 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,8 @@
+23 19 Feb 2024
+
+ - 75_all_PR113734_middle_end_update_vector_loop_bounds.patch
+ + 75_all_arm_PR113915-atomics.patch
+
22 13 Feb 2024
+ 75_all_PR113734_middle_end_update_vector_loop_bounds.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-13 11:17 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-13 11:17 UTC (permalink / raw
To: gentoo-commits
commit: 62e7698eec17981d7d48b5f248a100149fe41514
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 13 11:16:25 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 13 11:17:03 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=62e7698e
14.0.0: add 75_all_PR113734_middle_end_update_vector_loop_bounds.patch
Bug: https://gcc.gnu.org/PR113734
Signed-off-by: Sam James <sam <AT> gentoo.org>
...3734_middle_end_update_vector_loop_bounds.patch | 93 ++++++++++++++++++++++
14.0.0/gentoo/README.history | 4 +
2 files changed, 97 insertions(+)
diff --git a/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch b/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch
new file mode 100644
index 0000000..dcc52df
--- /dev/null
+++ b/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch
@@ -0,0 +1,93 @@
+https://gcc.gnu.org/PR113734
+
+From 491e57451df47cda88f658601a92d6d006ae09d7 Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina@arm.com>
+Date: Tue, 13 Feb 2024 11:04:38 +0000
+Subject: [PATCH] middle-end: update vector loop upper bounds when early break
+ vect [PR113734]
+
+When doing early break vectorization we should treat the final iteration as
+possibly being partial. This so that when we calculate the vector loop upper
+bounds we take into account that final iteration could have done some work.
+
+The attached testcase shows that if we don't then cunroll may unroll the loop an
+if the upper bound is wrong we lose a vector iteration.
+
+This is similar to how we adjust the scalar loop bounds for the PEELED case.
+
+gcc/ChangeLog:
+
+ PR tree-optimization/113734
+ * tree-vect-loop.cc (vect_transform_loop): Treat the final iteration of
+ an early break loop as partial.
+
+gcc/testsuite/ChangeLog:
+
+ PR tree-optimization/113734
+ * gcc.dg/vect/vect-early-break_117-pr113734.c: New test.
+---
+ .../vect/vect-early-break_117-pr113734.c | 37 +++++++++++++++++++
+ gcc/tree-vect-loop.cc | 3 +-
+ 2 files changed, 39 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c
+
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c
+new file mode 100644
+index 000000000000..36ae09483dfd
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c
+@@ -0,0 +1,37 @@
++/* { dg-add-options vect_early_break } */
++/* { dg-require-effective-target vect_early_break_hw } */
++/* { dg-require-effective-target vect_int } */
++/* { dg-additional-options "-O3" } */
++
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
++
++#include "tree-vect.h"
++
++#define N 306
++#define NEEDLE 136
++
++int table[N];
++
++__attribute__ ((noipa))
++int foo (int i, unsigned short parse_tables_n)
++{
++ parse_tables_n >>= 9;
++ parse_tables_n += 11;
++ while (i < N && parse_tables_n--)
++ table[i++] = 0;
++
++ return table[NEEDLE];
++}
++
++int main ()
++{
++ check_vect ();
++
++ for (int j = 0; j < N; j++)
++ table[j] = -1;
++
++ if (foo (0, 0xFFFF) != 0)
++ __builtin_abort ();
++
++ return 0;
++}
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index 04f4b5b6b2fa..367077965fd9 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -12174,7 +12174,8 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
+ /* True if the final iteration might not handle a full vector's
+ worth of scalar iterations. */
+ bool final_iter_may_be_partial
+- = LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo);
++ = LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo)
++ || LOOP_VINFO_EARLY_BREAKS (loop_vinfo);
+ /* The minimum number of iterations performed by the epilogue. This
+ is 1 when peeling for gaps because we always need a final scalar
+ iteration. */
+--
+2.43.1
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index c175cb7..8cfb3c2 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+22 13 Feb 2024
+
+ + 75_all_PR113734_middle_end_update_vector_loop_bounds.patch
+
21 12 Feb 2024
- 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-13 11:17 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-13 11:17 UTC (permalink / raw
To: gentoo-commits
commit: 568b3f9940f87a775060aea789b2f438af477e9f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 13 11:17:16 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 13 11:17:16 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=568b3f99
14.0.0: drop upstream patch
Signed-off-by: Sam James <sam <AT> gentoo.org>
...3734_middle_end_update_vector_loop_bounds.patch | 93 ----------------------
1 file changed, 93 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch b/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch
deleted file mode 100644
index dcc52df..0000000
--- a/14.0.0/gentoo/75_all_PR113734_middle_end_update_vector_loop_bounds.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-https://gcc.gnu.org/PR113734
-
-From 491e57451df47cda88f658601a92d6d006ae09d7 Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Tue, 13 Feb 2024 11:04:38 +0000
-Subject: [PATCH] middle-end: update vector loop upper bounds when early break
- vect [PR113734]
-
-When doing early break vectorization we should treat the final iteration as
-possibly being partial. This so that when we calculate the vector loop upper
-bounds we take into account that final iteration could have done some work.
-
-The attached testcase shows that if we don't then cunroll may unroll the loop an
-if the upper bound is wrong we lose a vector iteration.
-
-This is similar to how we adjust the scalar loop bounds for the PEELED case.
-
-gcc/ChangeLog:
-
- PR tree-optimization/113734
- * tree-vect-loop.cc (vect_transform_loop): Treat the final iteration of
- an early break loop as partial.
-
-gcc/testsuite/ChangeLog:
-
- PR tree-optimization/113734
- * gcc.dg/vect/vect-early-break_117-pr113734.c: New test.
----
- .../vect/vect-early-break_117-pr113734.c | 37 +++++++++++++++++++
- gcc/tree-vect-loop.cc | 3 +-
- 2 files changed, 39 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c
-
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c
-new file mode 100644
-index 000000000000..36ae09483dfd
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_117-pr113734.c
-@@ -0,0 +1,37 @@
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break_hw } */
-+/* { dg-require-effective-target vect_int } */
-+/* { dg-additional-options "-O3" } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+#include "tree-vect.h"
-+
-+#define N 306
-+#define NEEDLE 136
-+
-+int table[N];
-+
-+__attribute__ ((noipa))
-+int foo (int i, unsigned short parse_tables_n)
-+{
-+ parse_tables_n >>= 9;
-+ parse_tables_n += 11;
-+ while (i < N && parse_tables_n--)
-+ table[i++] = 0;
-+
-+ return table[NEEDLE];
-+}
-+
-+int main ()
-+{
-+ check_vect ();
-+
-+ for (int j = 0; j < N; j++)
-+ table[j] = -1;
-+
-+ if (foo (0, 0xFFFF) != 0)
-+ __builtin_abort ();
-+
-+ return 0;
-+}
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index 04f4b5b6b2fa..367077965fd9 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -12174,7 +12174,8 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
- /* True if the final iteration might not handle a full vector's
- worth of scalar iterations. */
- bool final_iter_may_be_partial
-- = LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo);
-+ = LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo)
-+ || LOOP_VINFO_EARLY_BREAKS (loop_vinfo);
- /* The minimum number of iterations performed by the epilogue. This
- is 1 when peeling for gaps because we always need a final scalar
- iteration. */
---
-2.43.1
-
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-12 7:03 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-12 7:03 UTC (permalink / raw
To: gentoo-commits
commit: e6628b8411533cc14470a9404cca9047df81cb0f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 12 06:26:19 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 12 06:26:19 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e6628b84
14.0.0: drop upstream patches
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index dd2e0a0..c175cb7 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,10 @@
+21 12 Feb 2024
+
+ - 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
+ - 76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch
+ - 77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch
+ - 78_all_PR113776-c-boolean-conversion.patch
+
20 8 Feb 2024
+ 75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-08 11:02 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-08 11:02 UTC (permalink / raw
To: gentoo-commits
commit: fe1bf105eb3e4f607a8d3b533c7b971b8a951085
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 8 11:01:58 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Feb 8 11:01:58 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fe1bf105
14.0.0: drop upstream patches
Signed-off-by: Sam James <sam <AT> gentoo.org>
...fix-ICE-when-moving-statements-to-empty-B.patch | 129 -----------
...fix-ICE-when-destination-BB-for-stores-st.patch | 250 ---------------------
...-don-t-cache-restart_loop-in-vectorizable.patch | 93 --------
.../78_all_PR113776-c-boolean-conversion.patch | 117 ----------
4 files changed, 589 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch b/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
deleted file mode 100644
index 1146246..0000000
--- a/14.0.0/gentoo/75_all_PR113731_fix-ICE-when-moving-statements-to-empty-B.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From c22a0c0ca1a5c31d107f90efd2221eb8bc198205 Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Wed, 7 Feb 2024 10:58:25 +0000
-Subject: [PATCH 1/3] middle-end: fix ICE when moving statements to empty BB
- [PR113731]
-
-We use gsi_move_before (&stmt_gsi, &dest_gsi); to request that the new statement
-be placed before any other statement. Typically this then moves the current
-pointer to be after the statement we just inserted.
-
-However it looks like when the BB is empty, this does not happen and the CUR
-pointer stays NULL. There's a comment in the source of gsi_insert_before that
-explains:
-
-/* If CUR is NULL, we link at the end of the sequence (this case happens
-
-This adds a default parameter to gsi_move_before to allow us to control where
-the insertion happens.
-
-gcc/ChangeLog:
-
- PR tree-optimization/113731
- * gimple-iterator.cc (gsi_move_before): Take new parameter for update
- method.
- * gimple-iterator.h (gsi_move_before): Default new param to
- GSI_SAME_STMT.
- * tree-vect-loop.cc (move_early_exit_stmts): Call gsi_move_before with
- GSI_NEW_STMT.
-
-gcc/testsuite/ChangeLog:
-
- PR tree-optimization/113731
- * gcc.dg/vect/vect-early-break_111-pr113731.c: New test.
-
-(cherry picked from commit 8f6ed71d8fff3c3c6249651a72aee084e31ffb9e)
----
- gcc/gimple-iterator.cc | 7 +++---
- gcc/gimple-iterator.h | 3 ++-
- .../vect/vect-early-break_111-pr113731.c | 22 +++++++++++++++++++
- gcc/tree-vect-loop.cc | 3 +--
- 4 files changed, 29 insertions(+), 6 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c
-
-diff --git a/gcc/gimple-iterator.cc b/gcc/gimple-iterator.cc
-index 517c53376f05..55ef3198c52b 100644
---- a/gcc/gimple-iterator.cc
-+++ b/gcc/gimple-iterator.cc
-@@ -666,10 +666,11 @@ gsi_move_after (gimple_stmt_iterator *from, gimple_stmt_iterator *to)
-
-
- /* Move the statement at FROM so it comes right before the statement
-- at TO. */
-+ at TO using method M. M defaults to GSI_SAME_STMT. */
-
- void
--gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to)
-+gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to,
-+ gsi_iterator_update m)
- {
- gimple *stmt = gsi_stmt (*from);
- gsi_remove (from, false);
-@@ -677,7 +678,7 @@ gsi_move_before (gimple_stmt_iterator *from, gimple_stmt_iterator *to)
- /* For consistency with gsi_move_after, it might be better to have
- GSI_NEW_STMT here; however, that breaks several places that expect
- that TO does not change. */
-- gsi_insert_before (to, stmt, GSI_SAME_STMT);
-+ gsi_insert_before (to, stmt, m);
- }
-
-
-diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h
-index 2e83a9660efc..78014a43cb93 100644
---- a/gcc/gimple-iterator.h
-+++ b/gcc/gimple-iterator.h
-@@ -86,7 +86,8 @@ extern gimple_stmt_iterator gsi_for_stmt (gimple *);
- extern gimple_stmt_iterator gsi_for_stmt (gimple *, gimple_seq *);
- extern gphi_iterator gsi_for_phi (gphi *);
- extern void gsi_move_after (gimple_stmt_iterator *, gimple_stmt_iterator *);
--extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *);
-+extern void gsi_move_before (gimple_stmt_iterator *, gimple_stmt_iterator *,
-+ gsi_iterator_update = GSI_SAME_STMT);
- extern void gsi_move_to_bb_end (gimple_stmt_iterator *, basic_block);
- extern void gsi_insert_on_edge (edge, gimple *);
- extern void gsi_insert_seq_on_edge (edge, gimple_seq);
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c
-new file mode 100644
-index 000000000000..b205f470660a
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_111-pr113731.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break } */
-+/* { dg-require-effective-target vect_long } */
-+/* { dg-additional-options "-msse4.2" { target i?86-*-* x86_64-*-* } } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+char* inet_net_pton_ipv4_bits;
-+char inet_net_pton_ipv4_odst;
-+void __errno_location();
-+void inet_net_pton_ipv4();
-+void inet_net_pton() { inet_net_pton_ipv4(); }
-+void inet_net_pton_ipv4(char *dst, int size) {
-+ while ((inet_net_pton_ipv4_bits > dst) & inet_net_pton_ipv4_odst) {
-+ if (size-- <= 0)
-+ goto emsgsize;
-+ *dst++ = '\0';
-+ }
-+emsgsize:
-+ __errno_location();
-+}
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index 30b90d99925b..9aba94bd6ca2 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -11800,8 +11800,7 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
- dump_printf_loc (MSG_NOTE, vect_location, "moving stmt %G", stmt);
-
- gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
-- gsi_move_before (&stmt_gsi, &dest_gsi);
-- gsi_prev (&dest_gsi);
-+ gsi_move_before (&stmt_gsi, &dest_gsi, GSI_NEW_STMT);
- }
-
- /* Update all the stmts with their new reaching VUSES. */
---
-2.43.0
-
diff --git a/14.0.0/gentoo/76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch b/14.0.0/gentoo/76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch
deleted file mode 100644
index e502439..0000000
--- a/14.0.0/gentoo/76_all_PR113750_fix-ICE-when-destination-BB-for-stores-st.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-From 7140d52db24a930955fca57f3e8b6147d0a7fa97 Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Wed, 7 Feb 2024 10:59:32 +0000
-Subject: [PATCH 2/3] middle-end: fix ICE when destination BB for stores starts
- with a label [PR113750]
-
-The report shows that if the FE leaves a label as the first thing in the dest
-BB then we ICE because we move the stores before the label.
-
-This is easy to fix if we know that there's still only one way into the BB.
-We would have already rejected the loop if there was multiple paths into the BB
-however I added an additional check just for early break in case the other
-constraints are relaxed later with an explanation.
-
-After that we fix the issue just by getting the GSI after the labels and I add
-a bunch of testcases for different positions the label can be added. Only the
-vect-early-break_112-pr113750.c one results in the label being kept.
-
-gcc/ChangeLog:
-
- PR tree-optimization/113750
- * tree-vect-data-refs.cc (vect_analyze_early_break_dependences): Check
- for single predecessor when doing early break vect.
- * tree-vect-loop.cc (move_early_exit_stmts): Get gsi at the start but
- after labels.
-
-gcc/testsuite/ChangeLog:
-
- PR tree-optimization/113750
- * gcc.dg/vect/vect-early-break_112-pr113750.c: New test.
- * gcc.dg/vect/vect-early-break_113-pr113750.c: New test.
- * gcc.dg/vect/vect-early-break_114-pr113750.c: New test.
- * gcc.dg/vect/vect-early-break_115-pr113750.c: New test.
- * gcc.dg/vect/vect-early-break_116-pr113750.c: New test.
-
-(cherry picked from commit 5c3ba60024fedc6b3d374ebb071bcf5b3e27cd62)
----
- .../vect/vect-early-break_112-pr113750.c | 26 +++++++++++++++++++
- .../vect/vect-early-break_113-pr113750.c | 26 +++++++++++++++++++
- .../vect/vect-early-break_114-pr113750.c | 26 +++++++++++++++++++
- .../vect/vect-early-break_115-pr113750.c | 26 +++++++++++++++++++
- .../vect/vect-early-break_116-pr113750.c | 26 +++++++++++++++++++
- gcc/tree-vect-data-refs.cc | 12 +++++++++
- gcc/tree-vect-loop.cc | 2 +-
- 7 files changed, 143 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c
- create mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c
-
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c
-new file mode 100644
-index 000000000000..559ebd84d5c3
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_112-pr113750.c
-@@ -0,0 +1,26 @@
-+/* { dg-do compile } */
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break } */
-+/* { dg-require-effective-target vect_int } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+#ifndef N
-+#define N 800
-+#endif
-+unsigned vect_a[N];
-+unsigned vect_b[N];
-+
-+unsigned test4(unsigned x)
-+{
-+ unsigned ret = 0;
-+ for (int i = 0; i < N; i++)
-+ {
-+ vect_b[i] = x + i;
-+ if (vect_a[i] != x)
-+ break;
-+foo:
-+ vect_a[i] = x;
-+ }
-+ return ret;
-+}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c
-new file mode 100644
-index 000000000000..ba85780a46b1
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_113-pr113750.c
-@@ -0,0 +1,26 @@
-+/* { dg-do compile } */
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break } */
-+/* { dg-require-effective-target vect_int } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+#ifndef N
-+#define N 800
-+#endif
-+unsigned vect_a[N];
-+unsigned vect_b[N];
-+
-+unsigned test4(unsigned x)
-+{
-+ unsigned ret = 0;
-+ for (int i = 0; i < N; i++)
-+ {
-+ vect_b[i] = x + i;
-+ if (vect_a[i] != x)
-+ break;
-+ vect_a[i] = x;
-+foo:
-+ }
-+ return ret;
-+}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c
-new file mode 100644
-index 000000000000..37af2998688f
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_114-pr113750.c
-@@ -0,0 +1,26 @@
-+/* { dg-do compile } */
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break } */
-+/* { dg-require-effective-target vect_int } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+#ifndef N
-+#define N 800
-+#endif
-+unsigned vect_a[N];
-+unsigned vect_b[N];
-+
-+unsigned test4(unsigned x)
-+{
-+ unsigned ret = 0;
-+ for (int i = 0; i < N; i++)
-+ {
-+ vect_b[i] = x + i;
-+foo:
-+ if (vect_a[i] != x)
-+ break;
-+ vect_a[i] = x;
-+ }
-+ return ret;
-+}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c
-new file mode 100644
-index 000000000000..502686d308e2
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_115-pr113750.c
-@@ -0,0 +1,26 @@
-+/* { dg-do compile } */
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break } */
-+/* { dg-require-effective-target vect_int } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+#ifndef N
-+#define N 800
-+#endif
-+unsigned vect_a[N];
-+unsigned vect_b[N];
-+
-+unsigned test4(unsigned x)
-+{
-+ unsigned ret = 0;
-+ for (int i = 0; i < N; i++)
-+ {
-+foo:
-+ vect_b[i] = x + i;
-+ if (vect_a[i] != x)
-+ break;
-+ vect_a[i] = x;
-+ }
-+ return ret;
-+}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c
-new file mode 100644
-index 000000000000..4e02158aa351
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_116-pr113750.c
-@@ -0,0 +1,26 @@
-+/* { dg-do compile } */
-+/* { dg-add-options vect_early_break } */
-+/* { dg-require-effective-target vect_early_break } */
-+/* { dg-require-effective-target vect_int } */
-+
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-+
-+#ifndef N
-+#define N 800
-+#endif
-+unsigned vect_a[N];
-+unsigned vect_b[N];
-+
-+unsigned test4(unsigned x)
-+{
-+ unsigned ret = 0;
-+ for (int i = 0; i < N; i++)
-+ {
-+ vect_b[i] = x + i;
-+ if (vect_a[i] != x)
-+foo:
-+ break;
-+ vect_a[i] = x;
-+ }
-+ return ret;
-+}
-diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
-index 2ca5a1b131bf..2d3691a14564 100644
---- a/gcc/tree-vect-data-refs.cc
-+++ b/gcc/tree-vect-data-refs.cc
-@@ -819,6 +819,18 @@ vect_analyze_early_break_dependences (loop_vec_info loop_vinfo)
- trapped already during loop form analysis. */
- gcc_assert (dest_bb->loop_father == loop);
-
-+ /* Check that the destination block we picked has only one pred. To relax this we
-+ have to take special care when moving the statements. We don't currently support
-+ such control flow however this check is there to simplify how we handle
-+ labels that may be present anywhere in the IL. This check is to ensure that the
-+ labels aren't significant for the CFG. */
-+ if (!single_pred (dest_bb))
-+ return opt_result::failure_at (vect_location,
-+ "chosen loop exit block (BB %d) does not have a "
-+ "single predecessor which is currently not "
-+ "supported for early break vectorization.\n",
-+ dest_bb->index);
-+
- LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo) = dest_bb;
-
- if (!LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).is_empty ())
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index 9aba94bd6ca2..190df9ec7741 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -11786,7 +11786,7 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
-
- /* Move all stmts that need moving. */
- basic_block dest_bb = LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo);
-- gimple_stmt_iterator dest_gsi = gsi_start_bb (dest_bb);
-+ gimple_stmt_iterator dest_gsi = gsi_after_labels (dest_bb);
-
- for (gimple *stmt : LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo))
- {
---
-2.43.0
-
diff --git a/14.0.0/gentoo/77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch b/14.0.0/gentoo/77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch
deleted file mode 100644
index 1983aa7..0000000
--- a/14.0.0/gentoo/77_all_PR113808-middle-end-don-t-cache-restart_loop-in-vectorizable.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From ce2e742d5439c3f70f6ff641164541e506c808d1 Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Thu, 8 Feb 2024 10:43:13 +0000
-Subject: [PATCH 3/3] middle-end: don't cache restart_loop in
- vectorizable_live_operations [PR113808]
-
-There's a bug in vectorizable_live_operation that restart_loop is defined
-outside the loop.
-
-This variable is supposed to indicate whether we are doing a first or last
-index reduction. The problem is that by defining it outside the loop it becomes
-dependent on the order we visit the USE/DEFs.
-
-In the given example, the loop isn't PEELED, but we visit the early exit uses
-first. This then sets the boolean to true and it can't get to false again.
-
-So when we visit the main exit we still treat it as an early exit for that
-SSA name.
-
-This cleans it up and renames the variables to something that's hopefully
-clearer to their intention.
-
-gcc/ChangeLog:
-
- PR tree-optimization/113808
- * tree-vect-loop.cc (vectorizable_live_operation): Don't cache the
- value cross iterations.
-
-gcc/testsuite/ChangeLog:
-
- PR tree-optimization/113808
- * gfortran.dg/vect/vect-early-break_1-PR113808.f90: New test.
-
-(cherry picked from commit 3f69db1812106cb5bab203e17a60300ac51cdc68)
----
- .../vect/vect-early-break_1-PR113808.f90 | 21 +++++++++++++++++++
- gcc/tree-vect-loop.cc | 5 ++---
- 2 files changed, 23 insertions(+), 3 deletions(-)
- create mode 100644 gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
-
-diff --git a/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90 b/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
-new file mode 100644
-index 000000000000..5c339fa7a348
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/vect/vect-early-break_1-PR113808.f90
-@@ -0,0 +1,21 @@
-+! { dg-add-options vect_early_break }
-+! { dg-require-effective-target vect_early_break }
-+! { dg-require-effective-target vect_long_long }
-+! { dg-additional-options "-fopenmp-simd" }
-+
-+! { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } }
-+
-+program main
-+ integer :: n, i,k
-+ n = 11
-+ do i = 1, n,2
-+ !$omp simd lastprivate(k)
-+ do k = 1, i + 41
-+ if (k > 11 + 41 .or. k < 1) error stop
-+ end do
-+ end do
-+ if (k /= 53) then
-+ print *, k, 53
-+ error stop
-+ endif
-+end
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index 190df9ec7741..eed2268e9bae 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -10950,7 +10950,7 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- did. For the live values we want the value at the start of the iteration
- rather than at the end. */
- edge main_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
-- bool restart_loop = LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
-+ bool all_exits_as_early_p = LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
- if (!is_gimple_debug (use_stmt)
- && !flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
-@@ -10966,8 +10966,7 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- /* For early exit where the exit is not in the BB that leads
- to the latch then we're restarting the iteration in the
- scalar loop. So get the first live value. */
-- restart_loop = restart_loop || !main_exit_edge;
-- if (restart_loop
-+ if ((all_exits_as_early_p || !main_exit_edge)
- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
- {
- tmp_vec_lhs = vec_lhs0;
---
-2.43.0
-
diff --git a/14.0.0/gentoo/78_all_PR113776-c-boolean-conversion.patch b/14.0.0/gentoo/78_all_PR113776-c-boolean-conversion.patch
deleted file mode 100644
index 52d731f..0000000
--- a/14.0.0/gentoo/78_all_PR113776-c-boolean-conversion.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From bfcee89a63538b80b966b2fa7ad21d4d38fd8b3c Mon Sep 17 00:00:00 2001
-From: Joseph Myers <josmyers@redhat.com>
-Date: Thu, 8 Feb 2024 01:34:09 +0000
-Subject: [PATCH] c: Fix boolean conversion of floating constant as integer
- constant expression [PR113776]
-
-My fix for bug 111059 and bug 111911 caused a conversion of a floating
-constant to boolean to wrongly no longer be considered an integer
-constant expression, because logic to insert a NOP_EXPR in
-c_objc_common_truthvalue_conversion for an argument not an integer
-constant expression itself now took place after rather than before the
-conversion to bool. In the specific case of casting a floating
-constant to bool, the result is an integer constant expression even
-though the argument isn't (build_c_cast deals with ensuring that casts
-to integer type of anything of floating type more complicated than a
-single floating constant don't get wrongly treated as integer constant
-expressions even if they fold to constants), so fix the logic in
-c_objc_common_truthvalue_conversion to handle that special case.
-
-Bootstrapped with no regressions for x86_64-pc-linux-gnu.
-
- PR c/113776
-
-gcc/c
- * c-typeck.cc (c_objc_common_truthvalue_conversion): Return an
- integer constant expression for boolean conversion of floating
- constant.
-
-gcc/testsuite/
- * gcc.dg/pr113776-1.c, gcc.dg/pr113776-2.c, gcc.dg/pr113776-3.c,
- gcc.dg/pr113776-4.c: New tests.
-
-(cherry picked from commit bfd72bb44eca83b0db2b0bab895f27a8a44247a2)
----
- gcc/c/c-typeck.cc | 12 +++++++++++-
- gcc/testsuite/gcc.dg/pr113776-1.c | 5 +++++
- gcc/testsuite/gcc.dg/pr113776-2.c | 4 ++++
- gcc/testsuite/gcc.dg/pr113776-3.c | 7 +++++++
- gcc/testsuite/gcc.dg/pr113776-4.c | 6 ++++++
- 5 files changed, 33 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.dg/pr113776-1.c
- create mode 100644 gcc/testsuite/gcc.dg/pr113776-2.c
- create mode 100644 gcc/testsuite/gcc.dg/pr113776-3.c
- create mode 100644 gcc/testsuite/gcc.dg/pr113776-4.c
-
-diff --git a/gcc/c/c-typeck.cc b/gcc/c/c-typeck.cc
-index 3b519c48ae0a..ddeab1e2a8a1 100644
---- a/gcc/c/c-typeck.cc
-+++ b/gcc/c/c-typeck.cc
-@@ -13572,7 +13572,17 @@ c_objc_common_truthvalue_conversion (location_t location, tree expr, tree type)
- break;
- }
-
-- int_const = (TREE_CODE (expr) == INTEGER_CST && !TREE_OVERFLOW (expr));
-+ /* Conversion of a floating constant to boolean goes through here
-+ and yields an integer constant expression. Otherwise, the result
-+ is only an integer constant expression if the argument is. */
-+ int_const = ((TREE_CODE (expr) == INTEGER_CST && !TREE_OVERFLOW (expr))
-+ || ((TREE_CODE (expr) == REAL_CST
-+ || TREE_CODE (expr) == COMPLEX_CST)
-+ && (TREE_CODE (type) == BOOLEAN_TYPE
-+ || (TREE_CODE (type) == ENUMERAL_TYPE
-+ && ENUM_UNDERLYING_TYPE (type) != NULL_TREE
-+ && (TREE_CODE (ENUM_UNDERLYING_TYPE (type))
-+ == BOOLEAN_TYPE)))));
- int_operands = EXPR_INT_CONST_OPERANDS (expr);
- if (int_operands && TREE_CODE (expr) != INTEGER_CST)
- {
-diff --git a/gcc/testsuite/gcc.dg/pr113776-1.c b/gcc/testsuite/gcc.dg/pr113776-1.c
-new file mode 100644
-index 000000000000..36190fbc3fec
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr113776-1.c
-@@ -0,0 +1,5 @@
-+/* { dg-do compile } */
-+/* { dg-options "-std=c11 -pedantic" } */
-+
-+char d[(_Bool)0.5 == 1 ? 1 : -1];
-+char f[(_Bool)0.0 == 0 ? 1 : -1];
-diff --git a/gcc/testsuite/gcc.dg/pr113776-2.c b/gcc/testsuite/gcc.dg/pr113776-2.c
-new file mode 100644
-index 000000000000..9e88210892a4
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr113776-2.c
-@@ -0,0 +1,4 @@
-+/* { dg-do compile } */
-+/* { dg-options "-std=c11 -pedantic" } */
-+
-+enum e { A = (_Bool) 0.0, B = (_Bool) 0.5, C = (_Bool) 1.0 };
-diff --git a/gcc/testsuite/gcc.dg/pr113776-3.c b/gcc/testsuite/gcc.dg/pr113776-3.c
-new file mode 100644
-index 000000000000..c615994a89f6
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr113776-3.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile } */
-+/* { dg-options "-std=c23 -pedantic" } */
-+
-+enum ebool : bool { BF, BT };
-+
-+char d[(enum ebool)0.5 == 1 ? 1 : -1];
-+char f[(enum ebool)0.0 == 0 ? 1 : -1];
-diff --git a/gcc/testsuite/gcc.dg/pr113776-4.c b/gcc/testsuite/gcc.dg/pr113776-4.c
-new file mode 100644
-index 000000000000..1b57557746e1
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr113776-4.c
-@@ -0,0 +1,6 @@
-+/* { dg-do compile } */
-+/* { dg-options "-std=c23 -pedantic" } */
-+
-+enum ebool : bool { BF, BT };
-+
-+enum e { A = (enum ebool) 0.0, B = (enum ebool) 0.5, C = (enum ebool) 1.0 };
---
-2.43.0
-
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-07 19:01 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-07 19:01 UTC (permalink / raw
To: gentoo-commits
commit: 31395f8bba7e15cd156c631946646f7c7799540d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 7 19:01:36 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 7 19:01:36 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=31395f8b
14.0.0: drop upstream 76_all_PR113731-vect-crash.patch
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/76_all_PR113731-vect-crash.patch | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/14.0.0/gentoo/76_all_PR113731-vect-crash.patch b/14.0.0/gentoo/76_all_PR113731-vect-crash.patch
deleted file mode 100644
index 671f11f..0000000
--- a/14.0.0/gentoo/76_all_PR113731-vect-crash.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/PR113731
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -11801,7 +11801,8 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
-
- gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
- gsi_move_before (&stmt_gsi, &dest_gsi);
-- gsi_prev (&dest_gsi);
-+ if (!gsi_end_p (dest_gsi))
-+ gsi_prev (&dest_gsi);
- }
-
- /* Update all the stmts with their new reaching VUSES. */
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-05 0:01 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-05 0:01 UTC (permalink / raw
To: gentoo-commits
commit: 4b42344808c61e309c43ca557fb2e77182d121d4
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 5 00:01:18 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 5 00:01:18 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4b423448
14.0.0: cut patchset 19
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index cb088b2..afaa988 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,8 @@
+19 5 Feb 2024
+
+ - 76_all_PR113467-vect-miscompile.patch
+ + 76_all_PR113731-vect-crash.patch
+
18 30 Jan 2024
+ 50_all_PR111632_system_cxx_headers_libcxx.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-03 7:52 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-03 7:52 UTC (permalink / raw
To: gentoo-commits
commit: 3ab6b70bf9ee185da7e092e1df20753cdc35d710
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 3 07:52:17 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 3 07:52:17 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3ab6b70b
14.0.0: add PR113731 crash fix
Bug: https://gcc.gnu.org/PR113731
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/76_all_PR113731-vect-crash.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/14.0.0/gentoo/76_all_PR113731-vect-crash.patch b/14.0.0/gentoo/76_all_PR113731-vect-crash.patch
new file mode 100644
index 0000000..671f11f
--- /dev/null
+++ b/14.0.0/gentoo/76_all_PR113731-vect-crash.patch
@@ -0,0 +1,13 @@
+https://gcc.gnu.org/PR113731
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -11801,7 +11801,8 @@ move_early_exit_stmts (loop_vec_info loop_vinfo)
+
+ gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
+ gsi_move_before (&stmt_gsi, &dest_gsi);
+- gsi_prev (&dest_gsi);
++ if (!gsi_end_p (dest_gsi))
++ gsi_prev (&dest_gsi);
+ }
+
+ /* Update all the stmts with their new reaching VUSES. */
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-02-03 0:09 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-02-03 0:09 UTC (permalink / raw
To: gentoo-commits
commit: e000e7f8aad97476d77372cc0ef8791901de1195
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 3 00:08:49 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 3 00:08:49 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e000e7f8
14.0.0: drop 76_all_PR113467-vect-miscompile.patch
Fixed upstream so we don't need this workaround anymore.
Bug: https://gcc.gnu.org/PR113467
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch b/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch
deleted file mode 100644
index aee5ddf..0000000
--- a/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://gcc.gnu.org/PR113467
-
-Disable early-exit peeling variants.
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -998,6 +998,9 @@ vec_init_loop_exit_info (class loop *loop)
- }
- }
-
-+ if (candidate && candidate->src != EDGE_PRED (loop->latch, 0)->src)
-+ return NULL;
-+
- return candidate;
- }
-
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-30 15:16 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-30 15:16 UTC (permalink / raw
To: gentoo-commits
commit: a3d9af415d651d202c24b7cb235713852e406c9d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 15:16:40 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 15:16:40 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a3d9af41
14.0.0: cut patchset 18
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index bd9cd16..cb088b2 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-?/ ?? ??? 2024
+18 30 Jan 2024
+ 50_all_PR111632_system_cxx_headers_libcxx.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-30 15:16 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-30 15:16 UTC (permalink / raw
To: gentoo-commits
commit: 7144ab534c85495f8519e0e90f1705b8aad89472
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 15:16:08 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 15:16:08 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7144ab53
14.0.0: add 50_all_PR111632_system_cxx_headers_libcxx.patch
Bug: https://gcc.gnu.org/PR111632
Signed-off-by: Sam James <sam <AT> gentoo.org>
| 134 +++++++++++++++++++++
14.0.0/gentoo/README.history | 4 +
2 files changed, 138 insertions(+)
--git a/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
new file mode 100644
index 0000000..af6c286
--- /dev/null
+++ b/14.0.0/gentoo/50_all_PR111632_system_cxx_headers_libcxx.patch
@@ -0,0 +1,134 @@
+https://bugs.gentoo.org/912035
+https://inbox.sourceware.org/gcc-patches/0623E896-6B99-49EC-9144-B41BC51089F0@andric.com
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274038
+https://gcc.gnu.org/PR111632
+
+commit 8992952bfa95e769a554bd97581cf332987383d8
+Author: Dimitry Andric <dimitry@andric.com>
+Date: 2023-09-28T17:40:29+02:00
+
+ Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
+
+ When building gcc's C++ sources against recent libc++, the poisoning of
+ the ctype macros due to including safe-ctype.h before including C++
+ standard headers such as <list>, <map>, etc, causes many compilation
+ errors, similar to:
+
+ In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+ In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+ In file included from /usr/include/c++/v1/vector:321:
+ In file included from
+ /usr/include/c++/v1/__format/formatter_bool.h:20:
+ In file included from
+ /usr/include/c++/v1/__format/formatter_integral.h:32:
+ In file included from /usr/include/c++/v1/locale:202:
+ /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
+ only applies to structs, variables, functions, and namespaces
+ 546 | _LIBCPP_INLINE_VISIBILITY
+ | ^
+ /usr/include/c++/v1/__config:813:37: note: expanded from macro
+ '_LIBCPP_INLINE_VISIBILITY'
+ 813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+ | ^
+ /usr/include/c++/v1/__config:792:26: note: expanded from macro
+ '_LIBCPP_HIDE_FROM_ABI'
+ 792 |
+ __attribute__((__abi_tag__(_LIBCPP_TOSTRING(
+ _LIBCPP_VERSIONED_IDENTIFIER))))
+ | ^
+ In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+ In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+ In file included from /usr/include/c++/v1/vector:321:
+ In file included from
+ /usr/include/c++/v1/__format/formatter_bool.h:20:
+ In file included from
+ /usr/include/c++/v1/__format/formatter_integral.h:32:
+ In file included from /usr/include/c++/v1/locale:202:
+ /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
+ declaration list
+ 547 | char_type toupper(char_type __c) const
+ | ^
+ /usr/include/c++/v1/__locale:553:48: error: too many arguments
+ provided to function-like macro invocation
+ 553 | const char_type* toupper(char_type* __low, const
+ char_type* __high) const
+ | ^
+ /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
+ macro 'toupper' defined here
+ 146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
+ | ^
+
+ This is because libc++ uses different transitive includes than
+ libstdc++, and some of those transitive includes pull in various ctype
+ declarations (typically via <locale>).
+
+ There was already a special case for including <string> before
+ safe-ctype.h, so move the rest of the C++ standard header includes to
+ the same location, to fix the problem.
+
+ Signed-off-by: Dimitry Andric <dimitry@andric.com>
+
+diff --git a/gcc/system.h b/gcc/system.h
+index e924152ad4c..7a516b11438 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
+ #undef fread_unlocked
+ #undef fwrite_unlocked
+
+-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+- the ctype macros through safe-ctype.h */
+-
+-#ifdef __cplusplus
+-#ifdef INCLUDE_STRING
+-# include <string>
+-#endif
+-#endif
+-
+-/* There are an extraordinary number of issues with <ctype.h>.
+- The last straw is that it varies with the locale. Use libiberty's
+- replacement instead. */
+-#include "safe-ctype.h"
+-
+-#include <sys/types.h>
+-
+-#include <errno.h>
+-
+-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
+-extern int errno;
+-#endif
++/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
++ poisoning the ctype macros through safe-ctype.h */
+
+ #ifdef __cplusplus
+ #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
+@@ -229,6 +210,9 @@ extern int errno;
+ #ifdef INCLUDE_SET
+ # include <set>
+ #endif
++#ifdef INCLUDE_STRING
++# include <string>
++#endif
+ #ifdef INCLUDE_VECTOR
+ # include <vector>
+ #endif
+@@ -245,6 +229,19 @@ extern int errno;
+ # include <type_traits>
+ #endif
+
++/* There are an extraordinary number of issues with <ctype.h>.
++ The last straw is that it varies with the locale. Use libiberty's
++ replacement instead. */
++#include "safe-ctype.h"
++
++#include <sys/types.h>
++
++#include <errno.h>
++
++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
++extern int errno;
++#endif
++
+ /* Some of glibc's string inlines cause warnings. Plus we'd rather
+ rely on (and therefore test) GCC's string builtins. */
+ #define __NO_STRING_INLINES
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index e452982..bd9cd16 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+?/ ?? ??? 2024
+
+ + 50_all_PR111632_system_cxx_headers_libcxx.patch
+
17 28 Jan 2024
- 75_all_PR113364-vect.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-28 23:02 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-28 23:02 UTC (permalink / raw
To: gentoo-commits
commit: d560ef1c4e57321434d7ac686b1ba6de31e0b424
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 23:01:41 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 28 23:01:53 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=d560ef1c
14.0.0: cut 17 patchset
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 3b7309d..e452982 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-17 ?? ??? 2024
+17 28 Jan 2024
- 75_all_PR113364-vect.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-24 13:53 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-24 13:53 UTC (permalink / raw
To: gentoo-commits
commit: ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 24 13:53:06 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 13:53:06 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ddeac849
14.0.0: drop 75_all_PR113364-vect.patch
Fixed upstream.
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_PR113364-vect.patch | 13 -------------
14.0.0/gentoo/README.history | 4 ++++
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR113364-vect.patch b/14.0.0/gentoo/75_all_PR113364-vect.patch
deleted file mode 100644
index 8922158..0000000
--- a/14.0.0/gentoo/75_all_PR113364-vect.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://gcc.gnu.org/PR113364
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -5965,7 +5965,8 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- loop-closed PHI of the inner loop which we remember as
- def for the reduction PHI generation. */
- bool double_reduc = false;
-- bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit;
-+ bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit
-+ && !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
- stmt_vec_info rdef_info = stmt_info;
- if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
- {
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 7ae98b3..3b7309d 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+17 ?? ??? 2024
+
+ - 75_all_PR113364-vect.patch
+
16 15 Jan 2024
- 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-19 7:45 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-19 7:45 UTC (permalink / raw
To: gentoo-commits
commit: a1e21703f86e5d60a68a53839774535ccdb8403e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 07:44:41 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 07:44:41 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a1e21703
14.0.0: add 76_all_PR113467-vect-miscompile.patch
Bug: https://gcc.gnu.org/PR113467
Bug: https://bugs.gentoo.org/922195
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch b/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch
new file mode 100644
index 0000000..aee5ddf
--- /dev/null
+++ b/14.0.0/gentoo/76_all_PR113467-vect-miscompile.patch
@@ -0,0 +1,15 @@
+https://gcc.gnu.org/PR113467
+
+Disable early-exit peeling variants.
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -998,6 +998,9 @@ vec_init_loop_exit_info (class loop *loop)
+ }
+ }
+
++ if (candidate && candidate->src != EDGE_PRED (loop->latch, 0)->src)
++ return NULL;
++
+ return candidate;
+ }
+
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-17 1:06 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-17 1:06 UTC (permalink / raw
To: gentoo-commits
commit: 4b55a8e4b87cf08d2b043fade9284d52e7af71df
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 15 00:07:42 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 15 00:07:53 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=4b55a8e4
14.0.0: cut patchset 16
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_PR113364-vect.patch | 13 +++++++++++++
14.0.0/gentoo/README.history | 3 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/75_all_PR113364-vect.patch b/14.0.0/gentoo/75_all_PR113364-vect.patch
new file mode 100644
index 0000000..8922158
--- /dev/null
+++ b/14.0.0/gentoo/75_all_PR113364-vect.patch
@@ -0,0 +1,13 @@
+https://gcc.gnu.org/PR113364
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -5965,7 +5965,8 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ loop-closed PHI of the inner loop which we remember as
+ def for the reduction PHI generation. */
+ bool double_reduc = false;
+- bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit;
++ bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit
++ && !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
+ stmt_vec_info rdef_info = stmt_info;
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
+ {
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 8e1b87e..7ae98b3 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-?? ?? ??? ????
+16 15 Jan 2024
- 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
- 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
@@ -8,6 +8,7 @@
- 80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
- 81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
- 82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
+ + 75_all_PR113364-vect.patch
15 8 Jan 2024
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-10 12:08 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-10 12:08 UTC (permalink / raw
To: gentoo-commits
commit: 9d69e54a3b402b0fad067464bd402e92c14504a9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 10 12:08:13 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 10 12:08:13 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9d69e54a
14.0.0: drop reverts
Upstream fixes have started landing.
Signed-off-by: Sam James <sam <AT> gentoo.org>
...le-end-explicitly-initialize-vec_stmts-PR.patch | 32 -
...suite-un-xfail-TSVC-loops-that-check-for-.patch | 75 -
..._Add_Advanced_SIMD_cbranch_implementation.patch | 341 --
...e_add_tests_for_early_break_vectorization.patch | 4955 --------------------
...h64_add_implementation_for_vector_cbranch.patch | 320 --
..._support_vectorization_of_loops_with_mult.patch | 2426 ----------
...le-end-prevent-LIM-from-hoising-vector-co.patch | 50 -
...ite_Add_more_pragma_novector_to_new_tests.patch | 457 --
14.0.0/gentoo/README.history | 11 +
9 files changed, 11 insertions(+), 8656 deletions(-)
diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
deleted file mode 100644
index 93bf96b..0000000
--- a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 0d9351ff8ab23e79edc7a468a255a7c009695f21 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:10 +0000
-Subject: [PATCH 1/8] Revert "middle-end: explicitly initialize vec_stmts
- [PR113132]"
-
-This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/tree-vect-loop.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index a06771611ac8..2bd96b56006a 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- exit_bb = loop_exit->dest;
- exit_gsi = gsi_after_labels (exit_bb);
- reduc_inputs.create (slp_node ? vec_num : ncopies);
-- vec <gimple *> vec_stmts = vNULL;
-+ vec <gimple *> vec_stmts;
- for (unsigned i = 0; i < vec_num; i++)
- {
- gimple_seq stmts = NULL;
---
-2.43.0
-
diff --git a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
deleted file mode 100644
index d22a7ae..0000000
--- a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 21f952dd33ae6037ff1a18cfe1c52dcc9becce19 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:12 +0000
-Subject: [PATCH 2/8] Revert "testsuite: un-xfail TSVC loops that check for
- exit control flow vectorization"
-
-This reverts commit a657c7e3518fcfc796f223d47385cad5e97dc9a5.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c | 3 +--
- gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c | 3 +--
- gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c | 3 +--
- 3 files changed, 3 insertions(+), 6 deletions(-)
-
-diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
-index 0d55d0dd67c3..3fd490b3797d 100644
---- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
-+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
-@@ -3,7 +3,6 @@
-
- /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
- /* { dg-require-effective-target vect_float } */
--/* { dg-add-options vect_early_break } */
-
- #include "tsvc.h"
-
-@@ -50,4 +49,4 @@ int main (int argc, char **argv)
- return 0;
- }
-
--/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break } } } } */
-+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
-index 5539f0f08411..bf98e173d2e6 100644
---- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
-+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
-@@ -3,7 +3,6 @@
-
- /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
- /* { dg-require-effective-target vect_float } */
--/* { dg-add-options vect_early_break } */
-
- #include "tsvc.h"
-
-@@ -40,4 +39,4 @@ int main (int argc, char **argv)
- return 0;
- }
-
--/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break} } } } */
-+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
-index 73bed5d4c57a..c4e26806292a 100644
---- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
-+++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
-@@ -3,7 +3,6 @@
-
- /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
- /* { dg-require-effective-target vect_float } */
--/* { dg-add-options vect_early_break } */
-
- #include "tsvc.h"
-
-@@ -38,4 +37,4 @@ int main (int argc, char **argv)
- return 0;
- }
-
--/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break } } } } */
-+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
---
-2.43.0
-
diff --git a/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch b/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch
deleted file mode 100644
index e284b9d..0000000
--- a/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch
+++ /dev/null
@@ -1,341 +0,0 @@
-From f7dfd5052edeaa7f433bc296fd3c8b9c5239edb3 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 8 Jan 2024 07:09:10 +0000
-Subject: [PATCH 3/8] Revert "arm: Add Advanced SIMD cbranch implementation"
-
-This reverts commit d9dd04f9f17e36854387899eb630c64a0c8d1a17.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/config/arm/neon.md | 49 -------
- .../gcc.dg/vect/vect-early-break_2.c | 2 +-
- .../gcc.dg/vect/vect-early-break_7.c | 2 +-
- .../gcc.dg/vect/vect-early-break_75.c | 2 +-
- .../gcc.dg/vect/vect-early-break_77.c | 2 +-
- .../gcc.dg/vect/vect-early-break_82.c | 2 +-
- .../gcc.dg/vect/vect-early-break_88.c | 2 +-
- .../gcc.target/arm/vect-early-break-cbranch.c | 138 ------------------
- gcc/testsuite/lib/target-supports.exp | 7 -
- 9 files changed, 6 insertions(+), 200 deletions(-)
- delete mode 100644 gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c
-
-diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
-index bb6e28ff4e74..91ca7e804555 100644
---- a/gcc/config/arm/neon.md
-+++ b/gcc/config/arm/neon.md
-@@ -408,55 +408,6 @@ (define_insn "vec_extract<mode><V_elem_l>"
- [(set_attr "type" "neon_store1_one_lane<q>,neon_to_gp<q>")]
- )
-
--;; Patterns comparing two vectors and conditionally jump.
--;; Avdanced SIMD lacks a vector != comparison, but this is a quite common
--;; operation. To not pay the penalty for inverting == we can map our any
--;; comparisons to all i.e. any(~x) => all(x).
--;;
--;; However unlike the AArch64 version, we can't optimize this further as the
--;; chain is too long for combine due to these being unspecs so it doesn't fold
--;; the operation to something simpler.
--(define_expand "cbranch<mode>4"
-- [(set (pc) (if_then_else
-- (match_operator 0 "expandable_comparison_operator"
-- [(match_operand:VDQI 1 "register_operand")
-- (match_operand:VDQI 2 "reg_or_zero_operand")])
-- (label_ref (match_operand 3 "" ""))
-- (pc)))]
-- "TARGET_NEON"
--{
-- rtx mask = operands[1];
--
-- /* If comparing against a non-zero vector we have to do a comparison first
-- so we can have a != 0 comparison with the result. */
-- if (operands[2] != CONST0_RTX (<MODE>mode))
-- {
-- mask = gen_reg_rtx (<MODE>mode);
-- emit_insn (gen_xor<mode>3 (mask, operands[1], operands[2]));
-- }
--
-- /* For 128-bit vectors we need an additional reductions. */
-- if (known_eq (128, GET_MODE_BITSIZE (<MODE>mode)))
-- {
-- /* Always reduce using a V4SI. */
-- rtx op1 = lowpart_subreg (V4SImode, mask, <MODE>mode);
-- mask = gen_reg_rtx (V2SImode);
-- rtx low = gen_reg_rtx (V2SImode);
-- rtx high = gen_reg_rtx (V2SImode);
-- emit_insn (gen_neon_vget_lowv4si (low, op1));
-- emit_insn (gen_neon_vget_highv4si (high, op1));
-- emit_insn (gen_neon_vpumaxv2si (mask, low, high));
-- }
--
-- rtx op1 = lowpart_subreg (V2SImode, mask, GET_MODE (mask));
-- emit_insn (gen_neon_vpumaxv2si (op1, op1, op1));
--
-- rtx val = gen_reg_rtx (SImode);
-- emit_move_insn (val, gen_lowpart (SImode, mask));
-- emit_jump_insn (gen_cbranch_cc (operands[0], val, const0_rtx, operands[3]));
-- DONE;
--})
--
- ;; This pattern is renamed from "vec_extract<mode><V_elem_l>" to
- ;; "neon_vec_extract<mode><V_elem_l>" and this pattern is called
- ;; by define_expand in vec-common.md file.
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
-index dec0b492ab88..5c32bf94409e 100644
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
-@@ -5,7 +5,7 @@
-
- /* { dg-additional-options "-Ofast" } */
-
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-
- #include <complex.h>
-
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
-index d218a0686719..8c86c5034d75 100644
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
-@@ -5,7 +5,7 @@
-
- /* { dg-additional-options "-Ofast" } */
-
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-
- #include <complex.h>
-
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
-index 9dcc3372acd6..ed27f8635730 100644
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
-@@ -3,7 +3,7 @@
- /* { dg-require-effective-target vect_int } */
-
- /* { dg-additional-options "-O3" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-* arm*-*-*" } } } } */
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
-
- #include <limits.h>
- #include <assert.h>
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
-index 9fa7e6948ebf..225106aab0a3 100644
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
-@@ -3,7 +3,7 @@
- /* { dg-require-effective-target vect_int } */
-
- /* { dg-additional-options "-O3" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-
- #include "tree-vect.h"
-
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
-index 7cd21d33485f..0e9b2d8d385c 100644
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
-@@ -5,7 +5,7 @@
-
- /* { dg-additional-options "-Ofast" } */
-
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-
- #include <complex.h>
-
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
-index 59ed57c5fb5f..b392dd465539 100644
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
-+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
-@@ -3,7 +3,7 @@
- /* { dg-require-effective-target vect_int } */
-
- /* { dg-additional-options "-Ofast --param vect-partial-vector-usage=2" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
-+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-
- #include "tree-vect.h"
-
-diff --git a/gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c
-deleted file mode 100644
-index f57bbd8be428..000000000000
---- a/gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c
-+++ /dev/null
-@@ -1,138 +0,0 @@
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target arm_neon_ok } */
--/* { dg-require-effective-target arm32 } */
--/* { dg-options "-O3 -march=armv8-a+simd -mfpu=auto -mfloat-abi=hard -fno-schedule-insns -fno-reorder-blocks -fno-schedule-insns2" } */
--/* { dg-final { check-function-bodies "**" "" "" } } */
--
--#define N 640
--int a[N] = {0};
--int b[N] = {0};
--
--/*
--** f1:
--** ...
--** vcgt.s32 q[0-9]+, q[0-9]+, #0
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vmov r[0-9]+, s[0-9]+ @ int
--** cmp r[0-9]+, #0
--** bne \.L[0-9]+
--** ...
--*/
--void f1 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] > 0)
-- break;
-- }
--}
--
--/*
--** f2:
--** ...
--** vcge.s32 q[0-9]+, q[0-9]+, #0
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vmov r[0-9]+, s[0-9]+ @ int
--** cmp r[0-9]+, #0
--** bne \.L[0-9]+
--** ...
--*/
--void f2 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] >= 0)
-- break;
-- }
--}
--
--/*
--** f3:
--** ...
--** vceq.i32 q[0-9]+, q[0-9]+, #0
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vmov r[0-9]+, s[0-9]+ @ int
--** cmp r[0-9]+, #0
--** bne \.L[0-9]+
--** ...
--*/
--void f3 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] == 0)
-- break;
-- }
--}
--
--/*
--** f4:
--** ...
--** vceq.i32 q[0-9]+, q[0-9]+, #0
--** vmvn q[0-9]+, q[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vmov r[0-9]+, s[0-9]+ @ int
--** cmp r[0-9]+, #0
--** bne \.L[0-9]+
--** ...
--*/
--void f4 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] != 0)
-- break;
-- }
--}
--
--/*
--** f5:
--** ...
--** vclt.s32 q[0-9]+, q[0-9]+, #0
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vmov r[0-9]+, s[0-9]+ @ int
--** cmp r[0-9]+, #0
--** bne \.L[0-9]+
--** ...
--*/
--void f5 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] < 0)
-- break;
-- }
--}
--
--/*
--** f6:
--** ...
--** vcle.s32 q[0-9]+, q[0-9]+, #0
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
--** vmov r[0-9]+, s[0-9]+ @ int
--** cmp r[0-9]+, #0
--** bne \.L[0-9]+
--** ...
--*/
--void f6 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] <= 0)
-- break;
-- }
--}
--
-diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
-index b27c30b8c51b..d65953158651 100644
---- a/gcc/testsuite/lib/target-supports.exp
-+++ b/gcc/testsuite/lib/target-supports.exp
-@@ -4069,7 +4069,6 @@ proc check_effective_target_vect_early_break { } {
- return [check_cached_effective_target_indexed vect_early_break {
- expr {
- [istarget aarch64*-*-*]
-- || [check_effective_target_arm_v8_neon_ok]
- || [check_effective_target_sse4]
- }}]
- }
-@@ -4083,7 +4082,6 @@ proc check_effective_target_vect_early_break_hw { } {
- return [check_cached_effective_target_indexed vect_early_break_hw {
- expr {
- [istarget aarch64*-*-*]
-- || [check_effective_target_arm_v8_neon_hw]
- || [check_sse4_hw_available]
- }}]
- }
-@@ -4093,11 +4091,6 @@ proc add_options_for_vect_early_break { flags } {
- return "$flags"
- }
-
-- if { [check_effective_target_arm_v8_neon_ok] } {
-- global et_arm_v8_neon_flags
-- return "$flags $et_arm_v8_neon_flags -march=armv8-a"
-- }
--
- if { [check_effective_target_sse4] } {
- return "$flags -msse4.1"
- }
---
-2.43.0
-
diff --git a/14.0.0/gentoo/78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch b/14.0.0/gentoo/78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
deleted file mode 100644
index 6fbdd54..0000000
--- a/14.0.0/gentoo/78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
+++ /dev/null
@@ -1,4955 +0,0 @@
-From 2fe83ac81d631810a520e5938224c5d10ffbc269 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:13 +0000
-Subject: [PATCH 4/8] Revert "testsuite: Add tests for early break
- vectorization"
-
-This reverts commit c5232ec14937a34e599e9e386a5975fab9a5e283.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/doc/sourcebuild.texi | 13 -
- .../g++.dg/vect/vect-early-break_1.cc | 62 -----
- .../g++.dg/vect/vect-early-break_2.cc | 61 -----
- .../g++.dg/vect/vect-early-break_3.cc | 17 --
- .../gcc.dg/vect/vect-early-break-run_1.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_10.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_2.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_3.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_4.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_5.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_6.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_7.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_8.c | 11 -
- .../gcc.dg/vect/vect-early-break-run_9.c | 11 -
- .../gcc.dg/vect/vect-early-break-template_1.c | 50 ----
- .../gcc.dg/vect/vect-early-break-template_2.c | 53 ----
- .../gcc.dg/vect/vect-early-break_1.c | 28 ---
- .../gcc.dg/vect/vect-early-break_10.c | 29 ---
- .../gcc.dg/vect/vect-early-break_11.c | 32 ---
- .../gcc.dg/vect/vect-early-break_12.c | 32 ---
- .../gcc.dg/vect/vect-early-break_13.c | 28 ---
- .../gcc.dg/vect/vect-early-break_14.c | 26 --
- .../gcc.dg/vect/vect-early-break_15.c | 26 --
- .../gcc.dg/vect/vect-early-break_16.c | 26 --
- .../gcc.dg/vect/vect-early-break_17.c | 26 --
- .../gcc.dg/vect/vect-early-break_18.c | 28 ---
- .../gcc.dg/vect/vect-early-break_19.c | 28 ---
- .../gcc.dg/vect/vect-early-break_2.c | 28 ---
- .../gcc.dg/vect/vect-early-break_20.c | 38 ---
- .../gcc.dg/vect/vect-early-break_21.c | 38 ---
- .../gcc.dg/vect/vect-early-break_22.c | 45 ----
- .../gcc.dg/vect/vect-early-break_23.c | 65 -----
- .../gcc.dg/vect/vect-early-break_24.c | 46 ----
- .../gcc.dg/vect/vect-early-break_25.c | 11 -
- .../gcc.dg/vect/vect-early-break_26.c | 44 ----
- .../gcc.dg/vect/vect-early-break_27.c | 19 --
- .../gcc.dg/vect/vect-early-break_28.c | 16 --
- .../gcc.dg/vect/vect-early-break_29.c | 17 --
- .../gcc.dg/vect/vect-early-break_3.c | 21 --
- .../gcc.dg/vect/vect-early-break_30.c | 29 ---
- .../gcc.dg/vect/vect-early-break_31.c | 30 ---
- .../gcc.dg/vect/vect-early-break_32.c | 30 ---
- .../gcc.dg/vect/vect-early-break_33.c | 29 ---
- .../gcc.dg/vect/vect-early-break_34.c | 28 ---
- .../gcc.dg/vect/vect-early-break_35.c | 29 ---
- .../gcc.dg/vect/vect-early-break_36.c | 29 ---
- .../gcc.dg/vect/vect-early-break_37.c | 26 --
- .../gcc.dg/vect/vect-early-break_38.c | 26 --
- .../gcc.dg/vect/vect-early-break_39.c | 26 --
- .../gcc.dg/vect/vect-early-break_4.c | 24 --
- .../gcc.dg/vect/vect-early-break_40.c | 27 --
- .../gcc.dg/vect/vect-early-break_41.c | 25 --
- .../gcc.dg/vect/vect-early-break_42.c | 26 --
- .../gcc.dg/vect/vect-early-break_43.c | 30 ---
- .../gcc.dg/vect/vect-early-break_44.c | 30 ---
- .../gcc.dg/vect/vect-early-break_45.c | 26 --
- .../gcc.dg/vect/vect-early-break_46.c | 28 ---
- .../gcc.dg/vect/vect-early-break_47.c | 26 --
- .../gcc.dg/vect/vect-early-break_48.c | 14 --
- .../gcc.dg/vect/vect-early-break_49.c | 25 --
- .../gcc.dg/vect/vect-early-break_5.c | 25 --
- .../gcc.dg/vect/vect-early-break_50.c | 18 --
- .../gcc.dg/vect/vect-early-break_51.c | 26 --
- .../gcc.dg/vect/vect-early-break_52.c | 21 --
- .../gcc.dg/vect/vect-early-break_53.c | 18 --
- .../gcc.dg/vect/vect-early-break_54.c | 30 ---
- .../gcc.dg/vect/vect-early-break_55.c | 29 ---
- .../gcc.dg/vect/vect-early-break_56.c | 102 --------
- .../gcc.dg/vect/vect-early-break_57.c | 32 ---
- .../gcc.dg/vect/vect-early-break_58.c | 19 --
- .../gcc.dg/vect/vect-early-break_59.c | 18 --
- .../gcc.dg/vect/vect-early-break_6.c | 27 --
- .../gcc.dg/vect/vect-early-break_60.c | 18 --
- .../gcc.dg/vect/vect-early-break_61.c | 18 --
- .../gcc.dg/vect/vect-early-break_62.c | 21 --
- .../gcc.dg/vect/vect-early-break_63.c | 29 ---
- .../gcc.dg/vect/vect-early-break_64.c | 18 --
- .../gcc.dg/vect/vect-early-break_65.c | 20 --
- .../gcc.dg/vect/vect-early-break_66.c | 28 ---
- .../gcc.dg/vect/vect-early-break_67.c | 42 ----
- .../gcc.dg/vect/vect-early-break_68.c | 42 ----
- .../gcc.dg/vect/vect-early-break_69.c | 80 ------
- .../gcc.dg/vect/vect-early-break_7.c | 28 ---
- .../gcc.dg/vect/vect-early-break_70.c | 69 ------
- .../gcc.dg/vect/vect-early-break_71.c | 71 ------
- .../gcc.dg/vect/vect-early-break_72.c | 151 -----------
- .../gcc.dg/vect/vect-early-break_73.c | 71 ------
- .../gcc.dg/vect/vect-early-break_74.c | 165 ------------
- .../gcc.dg/vect/vect-early-break_75.c | 234 ------------------
- .../gcc.dg/vect/vect-early-break_76.c | 169 -------------
- .../gcc.dg/vect/vect-early-break_77.c | 34 ---
- .../gcc.dg/vect/vect-early-break_78.c | 77 ------
- .../gcc.dg/vect/vect-early-break_79.c | 28 ---
- .../gcc.dg/vect/vect-early-break_8.c | 28 ---
- .../gcc.dg/vect/vect-early-break_80.c | 49 ----
- .../gcc.dg/vect/vect-early-break_81.c | 31 ---
- .../gcc.dg/vect/vect-early-break_82.c | 28 ---
- .../gcc.dg/vect/vect-early-break_83.c | 29 ---
- .../gcc.dg/vect/vect-early-break_84.c | 44 ----
- .../gcc.dg/vect/vect-early-break_85.c | 40 ---
- .../gcc.dg/vect/vect-early-break_86.c | 26 --
- .../gcc.dg/vect/vect-early-break_87.c | 26 --
- .../gcc.dg/vect/vect-early-break_88.c | 41 ---
- .../gcc.dg/vect/vect-early-break_89.c | 21 --
- .../gcc.dg/vect/vect-early-break_9.c | 28 ---
- .../gcc.dg/vect/vect-early-break_90.c | 48 ----
- .../gcc.dg/vect/vect-early-break_91.c | 48 ----
- .../gcc.dg/vect/vect-early-break_92.c | 48 ----
- .../gcc.dg/vect/vect-early-break_93.c | 48 ----
- gcc/testsuite/lib/target-supports.exp | 38 ---
- 110 files changed, 4025 deletions(-)
- delete mode 100644 gcc/testsuite/g++.dg/vect/vect-early-break_1.cc
- delete mode 100644 gcc/testsuite/g++.dg/vect/vect-early-break_2.cc
- delete mode 100644 gcc/testsuite/g++.dg/vect/vect-early-break_3.cc
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_1.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_10.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_11.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_12.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_13.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_14.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_15.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_16.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_17.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_19.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_20.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_21.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_22.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_23.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_24.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_25.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_26.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_27.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_28.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_29.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_3.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_30.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_31.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_32.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_33.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_34.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_35.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_36.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_37.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_39.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_4.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_40.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_41.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_42.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_43.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_44.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_45.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_46.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_47.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_48.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_49.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_5.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_50.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_51.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_52.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_53.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_54.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_55.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_56.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_57.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_58.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_59.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_6.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_60.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_61.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_62.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_63.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_64.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_66.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_67.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_68.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_69.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_70.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_71.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_72.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_73.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_74.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_76.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_78.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_79.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_8.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_80.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_81.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_83.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_84.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_85.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_86.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_87.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_89.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_9.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_90.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_91.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_92.c
- delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
-
-diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
-index 3a394e7739b6..35da6c11a5a9 100644
---- a/gcc/doc/sourcebuild.texi
-+++ b/gcc/doc/sourcebuild.texi
-@@ -1645,14 +1645,6 @@ Target supports hardware vectors of @code{float} when
- @option{-funsafe-math-optimizations} is not in effect.
- This implies @code{vect_float}.
-
--@item vect_early_break
--Target supports vectorization codegen of loops with early breaks.
--This requires an implementation of the cbranch optab for vectors.
--
--@item vect_early_break_hw
--Target supports hardware vectorization and running of loops with early breaks.
--This requires an implementation of the cbranch optab for vectors.
--
- @item vect_int
- Target supports hardware vectors of @code{int}.
-
-@@ -3222,11 +3214,6 @@ instructions, if any.
- @item tls
- Add the target-specific flags needed to use thread-local storage.
-
--@item vect_early_break
--Add the target-specific flags needed to enable early break vectorization for
--a target, if any. This requires the target to have an implementation of the
--@code{cbranch} optab.
--
- @item weak_undefined
- Add the flags needed to enable support for weak undefined symbols.
- @end table
-diff --git a/gcc/testsuite/g++.dg/vect/vect-early-break_1.cc b/gcc/testsuite/g++.dg/vect/vect-early-break_1.cc
-deleted file mode 100644
-index fce8e67f20b3..000000000000
---- a/gcc/testsuite/g++.dg/vect/vect-early-break_1.cc
-+++ /dev/null
-@@ -1,62 +0,0 @@
--/* { dg-do compile } */
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--
--/* { dg-additional-options "-w -O2" } */
--
--void fancy_abort(char *, int, const char *) __attribute__((__noreturn__));
--template <unsigned N, typename> struct poly_int_pod { int coeffs[N]; };
--template <unsigned N, typename> class poly_int : public poly_int_pod<N, int> {
--public:
-- template <typename Ca> poly_int &operator+=(const poly_int_pod<N, Ca> &);
--};
--template <unsigned N, typename C>
--template <typename Ca>
--poly_int<N, C> &poly_int<N, C>::operator+=(const poly_int_pod<N, Ca> &a) {
-- for (int i = 0; i < N; i++)
-- this->coeffs[i] += a.coeffs[i];
-- return *this;
--}
--template <unsigned N, typename Ca, typename Cb>
--poly_int<N, long> exact_div(poly_int_pod<N, Ca>, Cb) {
-- poly_int<N, long> r;
-- return r;
--}
--struct vec_prefix {
-- unsigned m_num;
--};
--struct vl_ptr;
--struct va_heap {
-- typedef vl_ptr default_layout;
--};
--template <typename, typename A, typename = typename A::default_layout>
--struct vec;
--template <typename T, typename A> struct vec<T, A, int> {
-- T &operator[](unsigned);
-- vec_prefix m_vecpfx;
-- T m_vecdata[];
--};
--template <typename T, typename A> T &vec<T, A, int>::operator[](unsigned ix) {
-- m_vecpfx.m_num ? fancy_abort("", 9, __FUNCTION__), 0 : 0;
-- return m_vecdata[ix];
--}
--template <typename T> struct vec<T, va_heap> {
-- T &operator[](unsigned ix) { return m_vec[ix]; }
-- vec<T, va_heap, int> m_vec;
--};
--class auto_vec : public vec<poly_int<2, long>, va_heap> {};
--template <typename> class vector_builder : public auto_vec {};
--class int_vector_builder : public vector_builder<int> {
--public:
-- int_vector_builder(poly_int<2, long>, int, int);
--};
--bool vect_grouped_store_supported() {
-- int i;
-- poly_int<2, long> nelt;
-- int_vector_builder sel(nelt, 2, 3);
-- for (i = 0; i < 6; i++)
-- sel[i] += exact_div(nelt, 2);
--}
--
-diff --git a/gcc/testsuite/g++.dg/vect/vect-early-break_2.cc b/gcc/testsuite/g++.dg/vect/vect-early-break_2.cc
-deleted file mode 100644
-index dad175a336f7..000000000000
---- a/gcc/testsuite/g++.dg/vect/vect-early-break_2.cc
-+++ /dev/null
-@@ -1,61 +0,0 @@
--/* { dg-do compile } */
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-w -O2" } */
--
--void fancy_abort(char *, int, const char *) __attribute__((__noreturn__));
--template <unsigned N, typename> struct poly_int_pod { int coeffs[N]; };
--template <unsigned N, typename> class poly_int : public poly_int_pod<N, int> {
--public:
-- template <typename Ca> poly_int &operator+=(const poly_int_pod<N, Ca> &);
--};
--template <unsigned N, typename C>
--template <typename Ca>
--poly_int<N, C> &poly_int<N, C>::operator+=(const poly_int_pod<N, Ca> &a) {
-- for (int i = 0; i < N; i++)
-- this->coeffs[i] += a.coeffs[i];
-- return *this;
--}
--template <unsigned N, typename Ca, typename Cb>
--poly_int<N, long> exact_div(poly_int_pod<N, Ca>, Cb) {
-- poly_int<N, long> r;
-- return r;
--}
--struct vec_prefix {
-- unsigned m_num;
--};
--struct vl_ptr;
--struct va_heap {
-- typedef vl_ptr default_layout;
--};
--template <typename, typename A, typename = typename A::default_layout>
--struct vec;
--template <typename T, typename A> struct vec<T, A, int> {
-- T &operator[](unsigned);
-- vec_prefix m_vecpfx;
-- T m_vecdata[];
--};
--template <typename T, typename A> T &vec<T, A, int>::operator[](unsigned ix) {
-- m_vecpfx.m_num ? fancy_abort("", 9, __FUNCTION__), 0 : 0;
-- return m_vecdata[ix];
--}
--template <typename T> struct vec<T, va_heap> {
-- T &operator[](unsigned ix) { return m_vec[ix]; }
-- vec<T, va_heap, int> m_vec;
--};
--class auto_vec : public vec<poly_int<2, long>, va_heap> {};
--template <typename> class vector_builder : public auto_vec {};
--class int_vector_builder : public vector_builder<int> {
--public:
-- int_vector_builder(poly_int<2, long>, int, int);
--};
--bool vect_grouped_store_supported() {
-- int i;
-- poly_int<2, long> nelt;
-- int_vector_builder sel(nelt, 2, 3);
-- for (i = 0; i < 6; i++)
-- sel[i] += exact_div(nelt, 2);
--}
--
-diff --git a/gcc/testsuite/g++.dg/vect/vect-early-break_3.cc b/gcc/testsuite/g++.dg/vect/vect-early-break_3.cc
-deleted file mode 100644
-index 8a4e33b0925b..000000000000
---- a/gcc/testsuite/g++.dg/vect/vect-early-break_3.cc
-+++ /dev/null
-@@ -1,17 +0,0 @@
--/* { dg-do compile } */
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-w -O2" } */
--
--int aarch64_advsimd_valid_immediate_hs_val32;
--bool aarch64_advsimd_valid_immediate_hs() {
-- for (int shift = 0; shift < 32; shift += 8)
-- if (aarch64_advsimd_valid_immediate_hs_val32 & shift)
-- return aarch64_advsimd_valid_immediate_hs_val32;
-- for (;;)
-- ;
--}
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c
-deleted file mode 100644
-index fb8faea3221f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 0
--#include "vect-early-break-template_1.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c
-deleted file mode 100644
-index 2fc8551db41e..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 800
--#define P 799
--#include "vect-early-break-template_2.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c
-deleted file mode 100644
-index 8c6d4cebb190..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 802
--#include "vect-early-break-template_1.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c
-deleted file mode 100644
-index ad25db4e6e22..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 5
--#include "vect-early-break-template_1.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c
-deleted file mode 100644
-index 804d640cd10b..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 278
--#include "vect-early-break-template_1.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c
-deleted file mode 100644
-index fd8086aab0de..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 800
--#define P 799
--#include "vect-early-break-template_1.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c
-deleted file mode 100644
-index 3b4490df0ebd..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 0
--#include "vect-early-break-template_2.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c
-deleted file mode 100644
-index ab9ff90c3d09..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 802
--#include "vect-early-break-template_2.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c
-deleted file mode 100644
-index c2ea839d7167..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 5
--#include "vect-early-break-template_2.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c
-deleted file mode 100644
-index a221c879387b..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast -save-temps" } */
--
--#define N 803
--#define P 278
--#include "vect-early-break-template_2.c"
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c
-deleted file mode 100644
-index acc088282ad0..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c
-+++ /dev/null
-@@ -1,50 +0,0 @@
--#include "tree-vect.h"
--
--#ifndef N
--#define N 803
--#endif
--
--#ifndef P
--#define P 0
--#endif
--
--unsigned vect_a[N] = {0};
--unsigned vect_b[N] = {0};
--
--__attribute__((noipa, noinline))
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- int x = 1;
-- int idx = P;
-- vect_a[idx] = x + 1;
--
-- test4(x);
--
-- if (vect_b[idx] != (x + idx))
-- abort ();
--
-- if (vect_a[idx] != x + 1)
-- abort ();
--
-- if (idx > 0 && vect_a[idx-1] != x)
-- abort ();
--
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c
-deleted file mode 100644
-index dce852e760a2..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c
-+++ /dev/null
-@@ -1,53 +0,0 @@
--#include "tree-vect.h"
--
--#ifndef N
--#define N 803
--#endif
--
--#ifndef P
--#define P 0
--#endif
--
--unsigned vect_a[N] = {0};
--unsigned vect_b[N] = {0};
--
--__attribute__((noipa, noinline))
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return i;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- int x = 1;
-- int idx = P;
-- vect_a[idx] = x + 1;
--
-- unsigned res = test4(x);
--
-- if (res != idx)
-- abort ();
--
-- if (vect_b[idx] != (x + idx))
-- abort ();
--
-- if (vect_a[idx] != x + 1)
-- abort ();
--
-- if (idx > 0 && vect_a[idx-1] != x)
-- abort ();
--
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_1.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_1.c
-deleted file mode 100644
-index c1da23e691cf..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_1.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_10.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_10.c
-deleted file mode 100644
-index 49bae484967f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_10.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x,int y, int z)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
-- }
--
-- ret = x + y * z;
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_11.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_11.c
-deleted file mode 100644
-index 8085383a5687..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_11.c
-+++ /dev/null
-@@ -1,32 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x, int y)
--{
-- unsigned ret = 0;
--for (int o = 0; o < y; o++)
--{
-- ret += o;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
--}
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_12.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_12.c
-deleted file mode 100644
-index 8eeec820be5c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_12.c
-+++ /dev/null
-@@ -1,32 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x, int y)
--{
-- unsigned ret = 0;
--for (int o = 0; o < y; o++)
--{
-- ret += o;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i];
-- vect_a[i] = x;
--
-- }
--}
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_13.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_13.c
-deleted file mode 100644
-index 58f5f0ae7e2e..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_13.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i] * x;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_14.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_14.c
-deleted file mode 100644
-index 3f0a61fe8b71..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_14.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#define N 803
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--int test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return i;
-- vect_a[i] += x * vect_b[i];
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_15.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_15.c
-deleted file mode 100644
-index 08e7faf24023..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_15.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#define N 803
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--int test4(unsigned x)
--{
-- int ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return i;
-- vect_a[i] += x * vect_b[i];
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_16.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_16.c
-deleted file mode 100644
-index 6bb71555be20..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_16.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#define N 1024
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i];
-- vect_a[i] = x;
-- ret += vect_a[i] + vect_b[i];
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_17.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_17.c
-deleted file mode 100644
-index 264031874eed..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_17.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#define N 1024
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i];
-- vect_a[i] = x;
-- ret = vect_a[i] + vect_b[i];
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
-deleted file mode 100644
-index babc79c74c39..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i+=2)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_19.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_19.c
-deleted file mode 100644
-index 9555c16a0821..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_19.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x, unsigned step)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i+=step)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
-deleted file mode 100644
-index 5c32bf94409e..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include <complex.h>
--
--#define N 1024
--complex double vect_a[N];
--complex double vect_b[N];
--
--complex double test4(complex double x)
--{
-- complex double ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] += x + i;
-- if (vect_a[i] == x)
-- return i;
-- vect_a[i] += x * vect_b[i];
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_20.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_20.c
-deleted file mode 100644
-index 039aac7fd84c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_20.c
-+++ /dev/null
-@@ -1,38 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include <stdbool.h>
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_b[N];
--struct testStruct {
-- long e;
-- long f;
-- bool a : 1;
-- bool b : 1;
-- int c : 14;
-- int d;
--};
--struct testStruct vect_a[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i].a > x)
-- return true;
-- vect_a[i].e = x;
-- }
-- return ret;
--}
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_21.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_21.c
-deleted file mode 100644
-index dbe3f8265115..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_21.c
-+++ /dev/null
-@@ -1,38 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <stdbool.h>
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_b[N];
--struct testStruct {
-- long e;
-- long f;
-- bool a : 1;
-- bool b : 1;
-- int c : 14;
-- int d;
--};
--struct testStruct vect_a[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i].a)
-- return true;
-- vect_a[i].e = x;
-- }
-- return ret;
--}
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_22.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_22.c
-deleted file mode 100644
-index b3f5984f682f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_22.c
-+++ /dev/null
-@@ -1,45 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--/* { dg-require-effective-target vect_perm } */
--/* { dg-require-effective-target vect_early_break_hw } */
--
--#include "tree-vect.h"
--
--void __attribute__((noipa))
--foo (int * __restrict__ a, short * __restrict__ b, int * __restrict__ c)
--{
-- int t1 = *c;
-- int t2 = *c;
-- for (int i = 0; i < 64; i+=2)
-- {
-- b[i] = a[i] - t1;
-- t1 = a[i];
-- b[i+1] = a[i+1] - t2;
-- t2 = a[i+1];
-- }
--}
--
--int a[64];
--short b[64];
--
--int
--main ()
--{
-- check_vect ();
-- for (int i = 0; i < 64; ++i)
-- {
-- a[i] = i;
-- __asm__ volatile ("" ::: "memory");
-- }
-- int c = 7;
-- foo (a, b, &c);
-- for (int i = 2; i < 64; i+=2)
-- if (b[i] != a[i] - a[i-2]
-- || b[i+1] != a[i+1] - a[i-1])
-- abort ();
-- if (b[0] != -7 || b[1] != -6)
-- abort ();
-- return 0;
--}
--
--/* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 2 "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_23.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_23.c
-deleted file mode 100644
-index 3e435af44471..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_23.c
-+++ /dev/null
-@@ -1,65 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--#include "tree-vect.h"
--
--#define N 200
--#define M 4
--
--typedef signed char sc;
--typedef unsigned char uc;
--typedef signed short ss;
--typedef unsigned short us;
--typedef int si;
--typedef unsigned int ui;
--typedef signed long long sll;
--typedef unsigned long long ull;
--
--#define FOR_EACH_TYPE(M) \
-- M (sc) M (uc) \
-- M (ss) M (us) \
-- M (si) M (ui) \
-- M (sll) M (ull) \
-- M (float) M (double)
--
--#define TEST_VALUE(I) ((I) * 17 / 2)
--
--#define ADD_TEST(TYPE) \
-- void __attribute__((noinline, noclone)) \
-- test_##TYPE (TYPE *a, TYPE *b) \
-- { \
-- for (int i = 0; i < N; i += 2) \
-- { \
-- a[i + 0] = b[i + 0] + 2; \
-- a[i + 1] = b[i + 1] + 3; \
-- } \
-- }
--
--#define DO_TEST(TYPE) \
-- for (int j = 1; j < M; ++j) \
-- { \
-- TYPE a[N + M]; \
-- for (int i = 0; i < N + M; ++i) \
-- a[i] = TEST_VALUE (i); \
-- test_##TYPE (a + j, a); \
-- for (int i = 0; i < N; i += 2) \
-- if (a[i + j] != (TYPE) (a[i] + 2) \
-- || a[i + j + 1] != (TYPE) (a[i + 1] + 3)) \
-- __builtin_abort (); \
-- }
--
--FOR_EACH_TYPE (ADD_TEST)
--
--int
--main (void)
--{
-- check_vect ();
--
-- FOR_EACH_TYPE (DO_TEST)
-- return 0;
--}
--
--/* { dg-final { scan-tree-dump {flags: [^\n]*ARBITRARY\n} "vect" { target vect_int } } } */
--/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */
--/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_24.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_24.c
-deleted file mode 100644
-index fa2a17ed96f1..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_24.c
-+++ /dev/null
-@@ -1,46 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_double } */
--/* { dg-require-effective-target vect_early_break_hw } */
--
--#include "tree-vect.h"
--
--extern void abort (void);
--void __attribute__((noinline,noclone))
--foo (double *b, double *d, double *f)
--{
-- int i;
-- for (i = 0; i < 1024; i++)
-- {
-- d[2*i] = 2. * d[2*i];
-- d[2*i+1] = 4. * d[2*i+1];
-- b[i] = d[2*i] - 1.;
-- f[i] = d[2*i+1] + 2.;
-- }
--}
--int main()
--{
-- double b[1024], d[2*1024], f[1024];
-- int i;
--
-- check_vect ();
--
-- for (i = 0; i < 2*1024; i++)
-- d[i] = 1.;
-- foo (b, d, f);
-- for (i = 0; i < 1024; i+= 2)
-- {
-- if (d[2*i] != 2.)
-- abort ();
-- if (d[2*i+1] != 4.)
-- abort ();
-- }
-- for (i = 0; i < 1024; i++)
-- {
-- if (b[i] != 1.)
-- abort ();
-- if (f[i] != 6.)
-- abort ();
-- }
-- return 0;
--}
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_25.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_25.c
-deleted file mode 100644
-index 4d8b47ed9aaa..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_25.c
-+++ /dev/null
-@@ -1,11 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* Disabling epilogues until we find a better way to deal with scans. */
--/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
--/* { dg-require-effective-target vect_int } */
--
--#include "vect-peel-1-src.c"
--
--/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
--/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_26.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_26.c
-deleted file mode 100644
-index 47d2a50218bd..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_26.c
-+++ /dev/null
-@@ -1,44 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--/* { dg-require-effective-target vect_perm } */
--
--#include "tree-vect.h"
--
--void __attribute__((noipa))
--foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
--{
-- int t1 = *c;
-- int t2 = *c;
-- for (int i = 0; i < 64; i+=2)
-- {
-- b[i] = a[i] - t1;
-- t1 = a[i];
-- b[i+1] = a[i+1] - t2;
-- t2 = a[i+1];
-- }
--}
--
--int a[64], b[64];
--
--int
--main ()
--{
-- check_vect ();
-- for (int i = 0; i < 64; ++i)
-- {
-- a[i] = i;
-- __asm__ volatile ("" ::: "memory");
-- }
-- int c = 7;
-- foo (a, b, &c);
-- for (int i = 2; i < 64; i+=2)
-- if (b[i] != a[i] - a[i-2]
-- || b[i+1] != a[i+1] - a[i-1])
-- abort ();
-- if (b[0] != -7 || b[1] != -6)
-- abort ();
-- return 0;
--}
--
--/* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 2 "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_27.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_27.c
-deleted file mode 100644
-index ed7b31757a0c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_27.c
-+++ /dev/null
-@@ -1,19 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--void abort ();
--int a[128];
--
--int main ()
--{
-- int i;
-- for (i = 1; i < 128; i++)
-- if (a[i] != i%4 + 1)
-- abort ();
-- if (a[0] != 5)
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_28.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_28.c
-deleted file mode 100644
-index 9c980b8453d9..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_28.c
-+++ /dev/null
-@@ -1,16 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--void abort ();
--int a[128];
--int main ()
--{
-- int i;
-- for (i = 1; i < 128; i++)
-- if (a[i] != i%4 + 1)
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_29.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_29.c
-deleted file mode 100644
-index b66fe204caee..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_29.c
-+++ /dev/null
-@@ -1,17 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--int in[100];
--int out[100 * 2];
--
--int main (void)
--{
-- if (out[0] != in[100 - 1])
-- for (int i = 1; i <= 100; ++i)
-- if (out[i] != 2)
-- __builtin_abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_3.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_3.c
-deleted file mode 100644
-index 4afbc7266765..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_3.c
-+++ /dev/null
-@@ -1,21 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
--
--unsigned test4(char x, char *vect, int n)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < n; i++)
-- {
-- if (vect[i] > x)
-- return 1;
--
-- vect[i] = x;
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_30.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_30.c
-deleted file mode 100644
-index 3f6e802ae8f0..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_30.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--int x[100];
--int choose1(int);
--int choose2();
--void consume(int);
--void f() {
-- for (int i = 0; i < 100; ++i) {
-- if (x[i] == 11) {
-- if (choose1(i))
-- goto A;
-- else
-- goto B;
-- }
-- }
-- if (choose2())
-- goto B;
--A:
-- for (int i = 0; i < 100; ++i)
-- consume(i);
--B:
-- for (int i = 0; i < 100; ++i)
-- consume(i * i);
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_31.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_31.c
-deleted file mode 100644
-index 1eaf52aaa852..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_31.c
-+++ /dev/null
-@@ -1,30 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 1025
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i];
-- vect_a[i] = x;
-- ret += vect_a[i] + vect_b[i];
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_32.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_32.c
-deleted file mode 100644
-index 038be402c2b8..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_32.c
-+++ /dev/null
-@@ -1,30 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 1024
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i];
-- vect_a[i] = x;
-- ret = vect_a[i] + vect_b[i];
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_33.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_33.c
-deleted file mode 100644
-index 74116143b260..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_33.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a2[N];
--unsigned vect_a1[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x, int z)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a1[i]*2 > x)
-- {
-- for (int y = 0; y < z; y++)
-- vect_a2 [y] *= vect_a1[i];
-- break;
-- }
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 2 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_34.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_34.c
-deleted file mode 100644
-index 63f1bb4254c6..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_34.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--
--unsigned vect_a[N] __attribute__ ((aligned (4)));;
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
--
-- for (int i = 1; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_35.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_35.c
-deleted file mode 100644
-index 4c0078fbc675..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_35.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a2[N];
--unsigned vect_a1[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a1[i]*2 > x)
-- break;
-- vect_a1[i] = x;
-- if (vect_a2[i]*4 > x)
-- break;
-- vect_a2[i] = x*x;
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_36.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_36.c
-deleted file mode 100644
-index a83994035b9d..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_36.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a2[N];
--unsigned vect_a1[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a1[i]*2 > x)
-- break;
-- vect_a1[i] = x;
-- if (vect_a2[i]*4 > x)
-- return i;
-- vect_a2[i] = x*x;
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_37.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_37.c
-deleted file mode 100644
-index b7559a9adc7c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_37.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 4
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 != x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
-deleted file mode 100644
-index 8062fbbf6422..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i+=2)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_39.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_39.c
-deleted file mode 100644
-index 9d3c6a5dffe3..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_39.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x, unsigned n)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i+= (N % 4))
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_4.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_4.c
-deleted file mode 100644
-index bd7107c1736c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_4.c
-+++ /dev/null
-@@ -1,24 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
--
--#define N 1024
--unsigned vect[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- if (i > 16 && vect[i] > x)
-- break;
--
-- vect[i] = x;
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_40.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_40.c
-deleted file mode 100644
-index 428f6249fa68..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_40.c
-+++ /dev/null
-@@ -1,27 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i*=3)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* SCEV can't currently analyze this loop bounds. */
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_41.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_41.c
-deleted file mode 100644
-index 31a8ed2d3e2f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_41.c
-+++ /dev/null
-@@ -1,25 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
--#pragma GCC novector
--#pragma GCC unroll 4
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] += vect_a[i] + x;
-- }
-- return ret;
--}
--
--/* novector should have blocked vectorization. */
--/* { dg-final { scan-tree-dump-not "vectorized \d loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_42.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_42.c
-deleted file mode 100644
-index f1ee2f7e9a66..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_42.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 800
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_43.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_43.c
-deleted file mode 100644
-index 7e9f635a0b5a..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_43.c
-+++ /dev/null
-@@ -1,30 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 802
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i+=2)
-- {
-- vect_b[i] = x + i;
-- vect_b[i+1] = x + i + 1;
-- if (vect_a[i]*2 > x)
-- break;
-- if (vect_a[i+1]*2 > x)
-- break;
-- vect_a[i] = x;
-- vect_a[i+1] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_44.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_44.c
-deleted file mode 100644
-index 7e9f635a0b5a..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_44.c
-+++ /dev/null
-@@ -1,30 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 802
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i+=2)
-- {
-- vect_b[i] = x + i;
-- vect_b[i+1] = x + i + 1;
-- if (vect_a[i]*2 > x)
-- break;
-- if (vect_a[i+1]*2 > x)
-- break;
-- vect_a[i] = x;
-- vect_a[i+1] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_45.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_45.c
-deleted file mode 100644
-index 7031f237ecce..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_45.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i]*2 > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_46.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_46.c
-deleted file mode 100644
-index c9aad909ffd8..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_46.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--#include <complex.h>
--
--#define N 1024
--complex double vect_a[N];
--complex double vect_b[N];
--
--complex double test4(complex double x)
--{
-- complex double ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] += x + i;
-- if (vect_a[i] == x)
-- return i;
-- vect_a[i] += x * vect_b[i];
--
-- }
-- return ret;
--}
--
--/* At -O2 we can't currently vectorize this because of the libcalls not being
-- lowered. */
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_47.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_47.c
-deleted file mode 100644
-index ef90380ea197..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_47.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--void abort ();
--
--float results1[16] = {192.00,240.00,288.00,336.00,384.00,432.00,480.00,528.00,0.00};
--float results2[16] = {0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,54.00,120.00,198.00,288.00,390.00,504.00,630.00};
--float a[16] = {0};
--float e[16] = {0};
--float b[16] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
--int main1 ()
--{
-- int i;
-- for (i=0; i<16; i++)
-- {
-- if (a[i] != results1[i] || e[i] != results2[i])
-- abort();
-- }
--
-- if (a[i+3] != b[i-1])
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_48.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_48.c
-deleted file mode 100644
-index 0efbb2836bfd..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_48.c
-+++ /dev/null
-@@ -1,14 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--int main (void)
--{
-- signed char a[50], b[50], c[50];
-- for (int i = 0; i < 50; ++i)
-- if (a[i] != ((((signed int) -1 < 0 ? -126 : 4) + ((signed int) -1 < 0 ? -101 : 26) + i * 9 + 0) >> 1))
-- __builtin_abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_49.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_49.c
-deleted file mode 100644
-index 6c4ee40fd5d3..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_49.c
-+++ /dev/null
-@@ -1,25 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--void abort();
--struct foostr {
-- _Complex short f1;
-- _Complex short f2;
--};
--struct foostr a[16] __attribute__ ((__aligned__(16))) = {};
--struct foostr c[16] __attribute__ ((__aligned__(16)));
--struct foostr res[16] = {};
--void
--foo (void)
--{
-- int i;
-- for (i = 0; i < 16; i++)
-- {
-- if (c[i].f1 != res[i].f1)
-- abort ();
-- if (c[i].f2 != res[i].f2)
-- abort ();
-- }
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_5.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_5.c
-deleted file mode 100644
-index 1468c795b620..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_5.c
-+++ /dev/null
-@@ -1,25 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#define N 1024
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- return vect_a[i];
-- vect_a[i] = x;
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_50.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_50.c
-deleted file mode 100644
-index b3cf2d7f05f0..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_50.c
-+++ /dev/null
-@@ -1,18 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--extern void abort();
--float a[1024], b[1024], c[1024], d[1024];
--_Bool k[1024];
--
--int main ()
--{
-- int i;
-- for (i = 0; i < 1024; i++)
-- if (k[i] != ((i % 3) == 0 && ((i / 9) % 3) == 0))
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_51.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_51.c
-deleted file mode 100644
-index c06eff5a385f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_51.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--int x_in[32];
--int x_out_a[32], x_out_b[32];
--int c[16] = {3,2,1,10,1,42,3,4,50,9,32,8,11,10,1,2};
--int a[16 +1] = {0,16,32,48,64,128,256,512,0,16,32,48,64,128,256,512,1024};
--int b[16 +1] = {17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
--
--void foo ()
--{
-- int j, i, x;
-- int curr_a, flag, next_a, curr_b, next_b;
-- {
-- for (i = 0; i < 16; i++)
-- {
-- next_b = b[i+1];
-- curr_b = flag ? next_b : curr_b;
-- }
-- x_out_b[j] = curr_b;
-- }
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-\ No newline at end of file
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_52.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_52.c
-deleted file mode 100644
-index 86a632f2a822..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_52.c
-+++ /dev/null
-@@ -1,21 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--void abort();
--int main1 (short X)
--{
-- unsigned char a[128];
-- unsigned short b[128];
-- unsigned int c[128];
-- short myX = X;
-- int i;
-- for (i = 0; i < 128; i++)
-- {
-- if (a[i] != (unsigned char)myX || b[i] != myX || c[i] != (unsigned int)myX++)
-- abort ();
-- }
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_53.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_53.c
-deleted file mode 100644
-index a02d5986ba3c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_53.c
-+++ /dev/null
-@@ -1,18 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--void abort ();
--int a[64], b[64];
--int main ()
--{
-- int c = 7;
-- for (int i = 1; i < 64; ++i)
-- if (b[i] != a[i] - a[i-1])
-- abort ();
-- if (b[0] != -7)
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_54.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_54.c
-deleted file mode 100644
-index bfc78c262751..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_54.c
-+++ /dev/null
-@@ -1,30 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- unsigned tmp[N];
-- for (int i = 0; i < N; i++)
-- {
-- tmp[i] = x + i;
-- vect_b[i] = tmp[i];
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_55.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_55.c
-deleted file mode 100644
-index c2a823bff7a4..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_55.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- volatile unsigned tmp = x + i;
-- vect_b[i] = tmp;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_56.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_56.c
-deleted file mode 100644
-index 9096f66647c7..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_56.c
-+++ /dev/null
-@@ -1,102 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* Disabling epilogues until we find a better way to deal with scans. */
--/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
--/* { dg-require-effective-target vect_int } */
--/* { dg-add-options bind_pic_locally } */
--/* { dg-require-effective-target vect_early_break_hw } */
--
--#include <stdarg.h>
--#include "tree-vect.h"
--
--#define N 32
--
--unsigned short sa[N];
--unsigned short sc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
--unsigned short sb[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
--unsigned int ia[N];
--unsigned int ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
-- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
--unsigned int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
-- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
--
--/* Current peeling-for-alignment scheme will consider the 'sa[i+7]'
-- access for peeling, and therefore will examine the option of
-- using a peeling factor = VF-7%VF. This will result in a peeling factor 1,
-- which will also align the access to 'ia[i+3]', and the loop could be
-- vectorized on all targets that support unaligned loads.
-- Without cost model on targets that support misaligned stores, no peeling
-- will be applied since we want to keep the four loads aligned. */
--
--__attribute__ ((noinline))
--int main1 ()
--{
-- int i;
-- int n = N - 7;
--
-- /* Multiple types with different sizes, used in independent
-- copmutations. Vectorizable. */
-- for (i = 0; i < n; i++)
-- {
-- sa[i+7] = sb[i] + sc[i];
-- ia[i+3] = ib[i] + ic[i];
-- }
--
-- /* check results: */
-- for (i = 0; i < n; i++)
-- {
-- if (sa[i+7] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
-- abort ();
-- }
--
-- return 0;
--}
--
--/* Current peeling-for-alignment scheme will consider the 'ia[i+3]'
-- access for peeling, and therefore will examine the option of
-- using a peeling factor = VF-3%VF. This will result in a peeling factor
-- 1 if VF=4,2. This will not align the access to 'sa[i+3]', for which we
-- need to peel 5,1 iterations for VF=4,2 respectively, so the loop can not
-- be vectorized. However, 'ia[i+3]' also gets aligned if we peel 5
-- iterations, so the loop is vectorizable on all targets that support
-- unaligned loads.
-- Without cost model on targets that support misaligned stores, no peeling
-- will be applied since we want to keep the four loads aligned. */
--
--__attribute__ ((noinline))
--int main2 ()
--{
-- int i;
-- int n = N-3;
--
-- /* Multiple types with different sizes, used in independent
-- copmutations. Vectorizable. */
-- for (i = 0; i < n; i++)
-- {
-- ia[i+3] = ib[i] + ic[i];
-- sa[i+3] = sb[i] + sc[i];
-- }
--
-- /* check results: */
-- for (i = 0; i < n; i++)
-- {
-- if (sa[i+3] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
-- abort ();
-- }
--
-- return 0;
--}
--
--int main (void)
--{
-- check_vect ();
--
-- main1 ();
-- main2 ();
--
-- return 0;
--}
--
--/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" { xfail { vect_early_break && { ! vect_hw_misalign } } } } } */
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_57.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_57.c
-deleted file mode 100644
-index 319bd125c315..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_57.c
-+++ /dev/null
-@@ -1,32 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--/* { dg-final { scan-tree-dump "epilog loop required" "vect" } } */
--
--void abort ();
--
--unsigned short sa[32];
--unsigned short sc[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
--unsigned short sb[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
--unsigned int ia[32];
--unsigned int ic[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
-- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
--unsigned int ib[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
-- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
--
--int main2 (int n)
--{
-- int i;
-- for (i = 0; i < n; i++)
-- {
-- if (sa[i+3] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
-- abort ();
-- }
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_58.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_58.c
-deleted file mode 100644
-index 5f18f06d423f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_58.c
-+++ /dev/null
-@@ -1,19 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--extern void abort();
--float a[1024], b[1024], c[1024], d[1024];
--_Bool k[1024];
--
--int main ()
--{
-- int i;
-- for (i = 0; i < 1024; i++)
-- if (k[i] != ((i % 3) == 0))
-- abort ();
--}
--
--/* Pattern didn't match inside gcond. */
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_59.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_59.c
-deleted file mode 100644
-index aec4ee457d78..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_59.c
-+++ /dev/null
-@@ -1,18 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--extern void abort();
--float a[1024], b[1024], c[1024], d[1024];
--_Bool k[1024];
--
--int main ()
--{
-- int i;
-- for (i = 0; i < 1024; i++)
-- if (k[i] != (i == 0))
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_6.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_6.c
-deleted file mode 100644
-index 7b870e9c60dc..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_6.c
-+++ /dev/null
-@@ -1,27 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#define N 1024
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < (N/2); i+=2)
-- {
-- vect_b[i] = x + i;
-- vect_b[i+1] = x + i+1;
-- if (vect_a[i] > x || vect_a[i+1] > x)
-- break;
-- vect_a[i] += x * vect_b[i];
-- vect_a[i+1] += x * vect_b[i+1];
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_60.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_60.c
-deleted file mode 100644
-index 75b35f8d423f..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_60.c
-+++ /dev/null
-@@ -1,18 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--extern void abort();
--float a[1024], b[1024], c[1024], d[1024];
--_Bool k[1024];
--
--int main ()
--{
-- char i;
-- for (i = 0; i < 1024; i++)
-- if (k[i] != (i == 0))
-- abort ();
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_61.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_61.c
-deleted file mode 100644
-index c789ec01f32c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_61.c
-+++ /dev/null
-@@ -1,18 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_float } */
--
--typedef float real_t;
--__attribute__((aligned(64))) real_t a[32000], b[32000], c[32000];
--real_t s482()
--{
-- for (int nl = 0; nl < 10000; nl++) {
-- for (int i = 0; i < 32000; i++) {
-- a[i] += b[i] * c[i];
-- if (c[i] > b[i]) break;
-- }
-- }
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_62.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_62.c
-deleted file mode 100644
-index aaad62ef8d78..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_62.c
-+++ /dev/null
-@@ -1,21 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--int a, b;
--int e() {
-- int d, c;
-- d = 0;
-- for (; d < b; d++)
-- a = 0;
-- d = 0;
-- for (; d < b; d++)
-- if (d)
-- c++;
-- for (;;)
-- if (c)
-- break;
--}
--
--/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_63.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_63.c
-deleted file mode 100644
-index 1d9ff4ad6bac..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_63.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* Disabling epilogues until we find a better way to deal with scans. */
--/* { dg-do compile } */
--/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
--/* { dg-require-effective-target vect_long } */
--/* { dg-require-effective-target vect_shift } */
--/* { dg-additional-options "-fno-tree-scev-cprop" } */
--
--/* Statement used outside the loop.
-- NOTE: SCEV disabled to ensure the live operation is not removed before
-- vectorization. */
--__attribute__ ((noinline)) int
--liveloop (int start, int n, int *x, int *y)
--{
-- int i = start;
-- int j;
-- int ret;
--
-- for (j = 0; j < n; ++j)
-- {
-- i += 1;
-- x[j] = i;
-- ret = y[j];
-- }
-- return ret;
--}
--
--/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
--/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_64.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_64.c
-deleted file mode 100644
-index aaa2a46fb67e..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_64.c
-+++ /dev/null
-@@ -1,18 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--/* { dg-additional-options "-fdump-tree-vect-all" } */
--
--int d(unsigned);
--
--void a() {
-- char b[8];
-- unsigned c = 0;
-- while (c < 7 && b[c])
-- ++c;
-- if (d(c))
-- return;
--}
--
--/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_partial_vectors } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
-deleted file mode 100644
-index 23a8341b529d..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
-+++ /dev/null
-@@ -1,20 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--/* { dg-options "-Ofast -fno-vect-cost-model -fdump-tree-vect-details" } */
--
--enum a { b };
--
--struct {
-- enum a c;
--} d[10], *e;
--
--void f() {
-- int g;
-- for (g = 0, e = d; g < sizeof(1); g++, e++)
-- if (e->c)
-- return;
--}
--
--/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_66.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_66.c
-deleted file mode 100644
-index e54cc5e1260e..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_66.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--int a[0];
--int b;
--
--void g();
--
--void f() {
-- int d, e;
-- for (; e; e++) {
-- int c;
-- switch (b)
-- case '9': {
-- for (; d < 1; d++)
-- if (a[d])
-- c = 1;
-- break;
-- case '<':
-- g();
-- c = 0;
-- }
-- while (c)
-- ;
-- }
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_67.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_67.c
-deleted file mode 100644
-index e9da46439f27..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_67.c
-+++ /dev/null
-@@ -1,42 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target int32plus } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--
--
--int main()
--{
-- int var6 = -1267827473;
-- do {
-- ++var6;
-- double s1_115[4], s2_108[4];
-- int var8 = -161498264;
-- do {
-- ++var8;
-- int var12 = 1260960076;
-- for (; var12 <= 1260960080; ++var12) {
-- int var13 = 1960990937;
-- do {
-- ++var13;
-- int var14 = 2128638723;
-- for (; var14 <= 2128638728; ++var14) {
-- int var22 = -1141190839;
-- do {
-- ++var22;
-- if (s2_108 > s1_115) {
-- int var23 = -890798748;
-- do {
-- long long e_119[4];
-- } while (var23 <= -890798746);
-- }
-- } while (var22 <= -1141190829);
-- }
-- } while (var13 <= 1960990946);
-- }
-- } while (var8 <= -161498254);
-- } while (var6 <= -1267827462);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_68.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_68.c
-deleted file mode 100644
-index dfa90b557e87..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_68.c
-+++ /dev/null
-@@ -1,42 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 800
--#endif
--unsigned vect_a1[N];
--unsigned vect_b1[N];
--unsigned vect_c1[N];
--unsigned vect_d1[N];
--
--unsigned vect_a2[N];
--unsigned vect_b2[N];
--unsigned vect_c2[N];
--unsigned vect_d2[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b1[i] += x + i;
-- vect_c1[i] += x + i;
-- vect_d1[i] += x + i;
-- if (vect_a1[i]*2 != x)
-- break;
-- vect_a1[i] = x;
--
-- vect_b2[i] += x + i;
-- vect_c2[i] += x + i;
-- vect_d2[i] += x + i;
-- if (vect_a2[i]*2 != x)
-- break;
-- vect_a2[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_69.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_69.c
-deleted file mode 100644
-index 916351a14ab4..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_69.c
-+++ /dev/null
-@@ -1,80 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--# define BITSIZEOF_INT 32
--# define BITSIZEOF_LONG 64
--# define BITSIZEOF_LONG_LONG 64
--
--#define MAKE_FUNS(suffix, type) \
--int my_ffs##suffix(type x) { \
-- int i; \
-- if (x == 0) \
-- return 0; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- break; \
-- return i + 1; \
--} \
-- \
--int my_clz##suffix(type x) { \
-- int i; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
-- break; \
-- return i; \
--}
--
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--
--unsigned int ints[] = NUMS32;
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
-- for (i = 0; i < N(ints); i++)
-- {
-- if (__builtin_ffs (ints[i]) != my_ffs (ints[i]))
-- abort ();
-- if (ints[i] != 0
-- && __builtin_clz (ints[i]) != my_clz (ints[i]))
-- abort ();
-- }
--
-- exit (0);
--}
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
-deleted file mode 100644
-index 8c86c5034d75..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include <complex.h>
--
--#define N 1024
--complex double vect_a[N];
--complex double vect_b[N];
--
--complex double test4(complex double x)
--{
-- complex double ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] += x + i;
-- if (vect_a[i] == x)
-- break;
-- vect_a[i] += x * vect_b[i];
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_70.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_70.c
-deleted file mode 100644
-index 3dbedf610406..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_70.c
-+++ /dev/null
-@@ -1,69 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--# define BITSIZEOF_INT 32
--# define BITSIZEOF_LONG 64
--# define BITSIZEOF_LONG_LONG 64
--
--#define MAKE_FUNS(suffix, type) \
--__attribute__((noinline)) \
--int my_clz##suffix(type x) { \
-- int i; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
-- break; \
-- return i; \
--}
--
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--
--unsigned int ints[] = NUMS32;
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- for (i = 0; i < N(ints); i++)
-- {
-- if (ints[i] != 0
-- && __builtin_clz (ints[i]) != my_clz (ints[i]))
-- abort ();
-- }
--
-- exit (0);
-- return 0;
--}
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_71.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_71.c
-deleted file mode 100644
-index b15c8de3ed75..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_71.c
-+++ /dev/null
-@@ -1,71 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--# define BITSIZEOF_INT 32
--# define BITSIZEOF_LONG 64
--# define BITSIZEOF_LONG_LONG 64
--
--#define MAKE_FUNS(suffix, type) \
--__attribute__((noinline)) \
--int my_ffs##suffix(type x) { \
-- int i; \
-- if (x == 0) \
-- return 0; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- break; \
-- return i + 1; \
--}
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--
--unsigned int ints[] = NUMS32;
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
--#pragma GCC novector
-- for (i = 0; i < N(ints); i++)
-- {
-- if (__builtin_ffs (ints[i]) != my_ffs (ints[i]))
-- abort ();
-- }
--
-- exit (0);
--}
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_72.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_72.c
-deleted file mode 100644
-index c6d1e9f5fd26..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_72.c
-+++ /dev/null
-@@ -1,151 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--#if __INT_MAX__ > 2147483647L
--# if __INT_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_INT 64
--# else
--# define BITSIZEOF_INT 32
--# endif
--#else
--# if __INT_MAX__ >= 2147483647L
--# define BITSIZEOF_INT 32
--# else
--# define BITSIZEOF_INT 16
--# endif
--#endif
--
--#if __LONG_MAX__ > 2147483647L
--# if __LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG 64
--# else
--# define BITSIZEOF_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG 32
--#endif
--
--#if __LONG_LONG_MAX__ > 2147483647L
--# if __LONG_LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG_LONG 64
--# else
--# define BITSIZEOF_LONG_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG_LONG 32
--#endif
--
--#define MAKE_FUNS(suffix, type) \
--__attribute__((noinline)) \
--int my_ctz##suffix(type x) { \
-- int i; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- break; \
-- return i; \
--}
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS16 \
-- { \
-- 0x0000U, \
-- 0x0001U, \
-- 0x8000U, \
-- 0x0002U, \
-- 0x4000U, \
-- 0x0100U, \
-- 0x0080U, \
-- 0xa5a5U, \
-- 0x5a5aU, \
-- 0xcafeU, \
-- 0xffffU \
-- }
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--#define NUMS64 \
-- { \
-- 0x0000000000000000ULL, \
-- 0x0000000000000001ULL, \
-- 0x8000000000000000ULL, \
-- 0x0000000000000002ULL, \
-- 0x4000000000000000ULL, \
-- 0x0000000100000000ULL, \
-- 0x0000000080000000ULL, \
-- 0xa5a5a5a5a5a5a5a5ULL, \
-- 0x5a5a5a5a5a5a5a5aULL, \
-- 0xcafecafe00000000ULL, \
-- 0x0000cafecafe0000ULL, \
-- 0x00000000cafecafeULL, \
-- 0xffffffffffffffffULL \
-- }
--
--unsigned int ints[] =
--#if BITSIZEOF_INT == 64
--NUMS64;
--#elif BITSIZEOF_INT == 32
--NUMS32;
--#else
--NUMS16;
--#endif
--
--unsigned long longs[] =
--#if BITSIZEOF_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--unsigned long long longlongs[] =
--#if BITSIZEOF_LONG_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
--#pragma GCC novector
-- for (i = 0; i < N(ints); i++)
-- {
-- if (ints[i] != 0
-- && __builtin_ctz (ints[i]) != my_ctz (ints[i]))
-- abort ();
-- }
--
-- exit (0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_73.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_73.c
-deleted file mode 100644
-index 7f40dd07e543..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_73.c
-+++ /dev/null
-@@ -1,71 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--# define BITSIZEOF_INT 32
--# define BITSIZEOF_LONG 64
--# define BITSIZEOF_LONG_LONG 64
--
--#define MAKE_FUNS(suffix, type) \
--__attribute__((noinline)) \
--int my_clz##suffix(type x) { \
-- int i; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
-- break; \
-- return i; \
--}
--
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--
--unsigned int ints[] = NUMS32;
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
--#pragma GCC novector
-- for (i = 0; i < N(ints); i++)
-- {
-- if (ints[i] != 0
-- && __builtin_clz (ints[i]) != my_clz (ints[i]))
-- abort ();
-- }
--
-- exit (0);
--}
--
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_74.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_74.c
-deleted file mode 100644
-index afd238618b30..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_74.c
-+++ /dev/null
-@@ -1,165 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--#if __INT_MAX__ > 2147483647L
--# if __INT_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_INT 64
--# else
--# define BITSIZEOF_INT 32
--# endif
--#else
--# if __INT_MAX__ >= 2147483647L
--# define BITSIZEOF_INT 32
--# else
--# define BITSIZEOF_INT 16
--# endif
--#endif
--
--#if __LONG_MAX__ > 2147483647L
--# if __LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG 64
--# else
--# define BITSIZEOF_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG 32
--#endif
--
--#if __LONG_LONG_MAX__ > 2147483647L
--# if __LONG_LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG_LONG 64
--# else
--# define BITSIZEOF_LONG_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG_LONG 32
--#endif
--
--#define MAKE_FUNS(suffix, type) \
--int my_clrsb##suffix(type x) { \
-- int i; \
-- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
-- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
-- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
-- != leading) \
-- break; \
-- return i - 1; \
--}
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS16 \
-- { \
-- 0x0000U, \
-- 0x0001U, \
-- 0x8000U, \
-- 0x0002U, \
-- 0x4000U, \
-- 0x0100U, \
-- 0x0080U, \
-- 0xa5a5U, \
-- 0x5a5aU, \
-- 0xcafeU, \
-- 0xffffU \
-- }
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--#define NUMS64 \
-- { \
-- 0x0000000000000000ULL, \
-- 0x0000000000000001ULL, \
-- 0x8000000000000000ULL, \
-- 0x0000000000000002ULL, \
-- 0x4000000000000000ULL, \
-- 0x0000000100000000ULL, \
-- 0x0000000080000000ULL, \
-- 0xa5a5a5a5a5a5a5a5ULL, \
-- 0x5a5a5a5a5a5a5a5aULL, \
-- 0xcafecafe00000000ULL, \
-- 0x0000cafecafe0000ULL, \
-- 0x00000000cafecafeULL, \
-- 0xffffffffffffffffULL \
-- }
--
--unsigned int ints[] =
--#if BITSIZEOF_INT == 64
--NUMS64;
--#elif BITSIZEOF_INT == 32
--NUMS32;
--#else
--NUMS16;
--#endif
--
--unsigned long longs[] =
--#if BITSIZEOF_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--unsigned long long longlongs[] =
--#if BITSIZEOF_LONG_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
-- /* Test constant folding. */
--
--#define TEST(x, suffix) \
-- if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
-- abort ();
--
--#if BITSIZEOF_INT == 32
-- TEST(0x00000000UL,);
-- TEST(0x00000001UL,);
-- TEST(0x80000000UL,);
-- TEST(0x40000000UL,);
-- TEST(0x00010000UL,);
-- TEST(0x00008000UL,);
-- TEST(0xa5a5a5a5UL,);
-- TEST(0x5a5a5a5aUL,);
-- TEST(0xcafe0000UL,);
-- TEST(0x00cafe00UL,);
-- TEST(0x0000cafeUL,);
-- TEST(0xffffffffUL,);
--#endif
--
-- exit (0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
-deleted file mode 100644
-index ed27f8635730..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
-+++ /dev/null
-@@ -1,234 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-O3" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--#if __INT_MAX__ > 2147483647L
--# if __INT_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_INT 64
--# else
--# define BITSIZEOF_INT 32
--# endif
--#else
--# if __INT_MAX__ >= 2147483647L
--# define BITSIZEOF_INT 32
--# else
--# define BITSIZEOF_INT 16
--# endif
--#endif
--
--#if __LONG_MAX__ > 2147483647L
--# if __LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG 64
--# else
--# define BITSIZEOF_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG 32
--#endif
--
--#if __LONG_LONG_MAX__ > 2147483647L
--# if __LONG_LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG_LONG 64
--# else
--# define BITSIZEOF_LONG_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG_LONG 32
--#endif
--
--#define MAKE_FUNS(suffix, type) \
--__attribute__((noinline)) \
--int my_ffs##suffix(type x) { \
-- int i; \
-- if (x == 0) \
-- return 0; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- break; \
-- return i + 1; \
--} \
-- \
--int my_ctz##suffix(type x) { \
-- int i; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- break; \
-- return i; \
--} \
-- \
--__attribute__((noinline)) \
--int my_clz##suffix(type x) { \
-- int i; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
-- break; \
-- return i; \
--} \
-- \
--int my_clrsb##suffix(type x) { \
-- int i; \
-- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
-- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
-- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
-- != leading) \
-- break; \
-- return i - 1; \
--} \
-- \
--__attribute__((noinline)) \
--int my_popcount##suffix(type x) { \
-- int i; \
-- int count = 0; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- count++; \
-- return count; \
--} \
-- \
--__attribute__((noinline)) \
--int my_parity##suffix(type x) { \
-- int i; \
-- int count = 0; \
-- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
-- if (x & ((type) 1 << i)) \
-- count++; \
-- return count & 1; \
--}
--
--MAKE_FUNS (ll, unsigned long long);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS16 \
-- { \
-- 0x0000U, \
-- 0x0001U, \
-- 0x8000U, \
-- 0x0002U, \
-- 0x4000U, \
-- 0x0100U, \
-- 0x0080U, \
-- 0xa5a5U, \
-- 0x5a5aU, \
-- 0xcafeU, \
-- 0xffffU \
-- }
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--#define NUMS64 \
-- { \
-- 0x0000000000000000ULL, \
-- 0x0000000000000001ULL, \
-- 0x8000000000000000ULL, \
-- 0x0000000000000002ULL, \
-- 0x4000000000000000ULL, \
-- 0x0000000100000000ULL, \
-- 0x0000000080000000ULL, \
-- 0xa5a5a5a5a5a5a5a5ULL, \
-- 0x5a5a5a5a5a5a5a5aULL, \
-- 0xcafecafe00000000ULL, \
-- 0x0000cafecafe0000ULL, \
-- 0x00000000cafecafeULL, \
-- 0xffffffffffffffffULL \
-- }
--
--unsigned int ints[] =
--#if BITSIZEOF_INT == 64
--NUMS64;
--#elif BITSIZEOF_INT == 32
--NUMS32;
--#else
--NUMS16;
--#endif
--
--unsigned long longs[] =
--#if BITSIZEOF_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--unsigned long long longlongs[] =
--#if BITSIZEOF_LONG_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
--#pragma GCC novector
-- for (i = 0; i < N(longlongs); i++)
-- {
-- if (__builtin_ffsll (longlongs[i]) != my_ffsll (longlongs[i]))
-- abort ();
-- if (longlongs[i] != 0
-- && __builtin_clzll (longlongs[i]) != my_clzll (longlongs[i]))
-- abort ();
-- if (longlongs[i] != 0
-- && __builtin_ctzll (longlongs[i]) != my_ctzll (longlongs[i]))
-- abort ();
-- if (__builtin_clrsbll (longlongs[i]) != my_clrsbll (longlongs[i]))
-- abort ();
-- if (__builtin_popcountll (longlongs[i]) != my_popcountll (longlongs[i]))
-- abort ();
-- if (__builtin_parityll (longlongs[i]) != my_parityll (longlongs[i]))
-- abort ();
-- }
--
-- /* Test constant folding. */
--
--#define TEST(x, suffix) \
-- if (__builtin_ffs##suffix (x) != my_ffs##suffix (x)) \
-- abort (); \
--
--#if BITSIZEOF_LONG_LONG == 64
-- TEST(0x0000000000000000ULL, ll);
-- TEST(0x0000000000000001ULL, ll);
-- TEST(0x8000000000000000ULL, ll);
-- TEST(0x0000000000000002ULL, ll);
-- TEST(0x4000000000000000ULL, ll);
-- TEST(0x0000000100000000ULL, ll);
-- TEST(0x0000000080000000ULL, ll);
-- TEST(0xa5a5a5a5a5a5a5a5ULL, ll);
-- TEST(0x5a5a5a5a5a5a5a5aULL, ll);
-- TEST(0xcafecafe00000000ULL, ll);
-- TEST(0x0000cafecafe0000ULL, ll);
-- TEST(0x00000000cafecafeULL, ll);
-- TEST(0xffffffffffffffffULL, ll);
--#endif
--
-- exit (0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_76.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_76.c
-deleted file mode 100644
-index a7d8e279c670..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_76.c
-+++ /dev/null
-@@ -1,169 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-O3" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--#if __INT_MAX__ > 2147483647L
--# if __INT_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_INT 64
--# else
--# define BITSIZEOF_INT 32
--# endif
--#else
--# if __INT_MAX__ >= 2147483647L
--# define BITSIZEOF_INT 32
--# else
--# define BITSIZEOF_INT 16
--# endif
--#endif
--
--#if __LONG_MAX__ > 2147483647L
--# if __LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG 64
--# else
--# define BITSIZEOF_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG 32
--#endif
--
--#if __LONG_LONG_MAX__ > 2147483647L
--# if __LONG_LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG_LONG 64
--# else
--# define BITSIZEOF_LONG_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG_LONG 32
--#endif
--
--#define MAKE_FUNS(suffix, type) \
--int my_clrsb##suffix(type x) { \
-- int i; \
-- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
-- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
-- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
-- != leading) \
-- break; \
-- return i - 1; \
--} \
-- \
--
--MAKE_FUNS (, unsigned);
--MAKE_FUNS (ll, unsigned long long);
--
--extern void abort (void);
--extern void exit (int);
--
--#define NUMS16 \
-- { \
-- 0x0000U, \
-- 0x0001U, \
-- 0x8000U, \
-- 0x0002U, \
-- 0x4000U, \
-- 0x0100U, \
-- 0x0080U, \
-- 0xa5a5U, \
-- 0x5a5aU, \
-- 0xcafeU, \
-- 0xffffU \
-- }
--
--#define NUMS32 \
-- { \
-- 0x00000000UL, \
-- 0x00000001UL, \
-- 0x80000000UL, \
-- 0x00000002UL, \
-- 0x40000000UL, \
-- 0x00010000UL, \
-- 0x00008000UL, \
-- 0xa5a5a5a5UL, \
-- 0x5a5a5a5aUL, \
-- 0xcafe0000UL, \
-- 0x00cafe00UL, \
-- 0x0000cafeUL, \
-- 0xffffffffUL \
-- }
--
--#define NUMS64 \
-- { \
-- 0x0000000000000000ULL, \
-- 0x0000000000000001ULL, \
-- 0x8000000000000000ULL, \
-- 0x0000000000000002ULL, \
-- 0x4000000000000000ULL, \
-- 0x0000000100000000ULL, \
-- 0x0000000080000000ULL, \
-- 0xa5a5a5a5a5a5a5a5ULL, \
-- 0x5a5a5a5a5a5a5a5aULL, \
-- 0xcafecafe00000000ULL, \
-- 0x0000cafecafe0000ULL, \
-- 0x00000000cafecafeULL, \
-- 0xffffffffffffffffULL \
-- }
--
--unsigned int ints[] =
--#if BITSIZEOF_INT == 64
--NUMS64;
--#elif BITSIZEOF_INT == 32
--NUMS32;
--#else
--NUMS16;
--#endif
--
--unsigned long longs[] =
--#if BITSIZEOF_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--unsigned long long longlongs[] =
--#if BITSIZEOF_LONG_LONG == 64
--NUMS64;
--#else
--NUMS32;
--#endif
--
--#define N(table) (sizeof (table) / sizeof (table[0]))
--
--int
--main (void)
--{
-- int i;
--
-- check_vect ();
--
--#pragma GCC novector
-- for (i = 0; i < N(ints); i++)
-- {
-- if (__builtin_clrsb (ints[i]) != my_clrsb (ints[i]))
-- abort ();
-- }
--
-- /* Test constant folding. */
--
--#define TEST(x, suffix) \
-- if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
-- abort ();
--
--#if BITSIZEOF_LONG_LONG == 64
-- TEST(0xffffffffffffffffULL, ll);
-- TEST(0xffffffffffffffffULL, ll);
-- TEST(0xffffffffffffffffULL, ll);
-- TEST(0xffffffffffffffffULL, ll);
-- TEST(0xffffffffffffffffULL, ll);
-- TEST(0xffffffffffffffffULL, ll);
--#endif
--
-- exit (0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
-deleted file mode 100644
-index 225106aab0a3..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
-+++ /dev/null
-@@ -1,34 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-O3" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--double x[1024];
--int a[1024];
--double __attribute__((noipa)) foo ()
--{
-- double sum = 0.0;
-- for (int i = 0 ; i < 1023; ++i)
-- {
-- sum += x[i];
-- if (a[i])
-- break;
-- }
-- return sum;
--}
--
--int main()
--{
-- check_vect ();
--
-- for (int i = 0; i < 1024; ++i)
-- x[i] = i;
-- a[19] = 1;
-- if (foo () != 190.)
-- __builtin_abort ();
-- return 0;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_78.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_78.c
-deleted file mode 100644
-index f93babc069e1..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_78.c
-+++ /dev/null
-@@ -1,77 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-O3" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <limits.h>
--#include <assert.h>
--
--#include "tree-vect.h"
--
--#if __INT_MAX__ > 2147483647L
--# if __INT_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_INT 64
--# else
--# define BITSIZEOF_INT 32
--# endif
--#else
--# if __INT_MAX__ >= 2147483647L
--# define BITSIZEOF_INT 32
--# else
--# define BITSIZEOF_INT 16
--# endif
--#endif
--
--#if __LONG_MAX__ > 2147483647L
--# if __LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG 64
--# else
--# define BITSIZEOF_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG 32
--#endif
--
--#if __LONG_LONG_MAX__ > 2147483647L
--# if __LONG_LONG_MAX__ >= 9223372036854775807L
--# define BITSIZEOF_LONG_LONG 64
--# else
--# define BITSIZEOF_LONG_LONG 32
--# endif
--#else
--# define BITSIZEOF_LONG_LONG 32
--#endif
--
--#define MAKE_FUNS(suffix, type) \
--int my_clrsb##suffix(type x) { \
-- int i; \
-- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
-- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
-- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
-- != leading) \
-- break; \
-- return i - 1; \
--}
--
--MAKE_FUNS (, unsigned);
--
--extern void abort (void);
--extern void exit (int);
--
--
--int
--main (void)
--{
-- check_vect ();
--
--#define TEST(x, suffix) \
-- if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
-- abort ();
--
--#if BITSIZEOF_INT == 32
-- TEST(0xffffffffUL,);
--#endif
-- exit (0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_79.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_79.c
-deleted file mode 100644
-index 3f21be762514..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_79.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
--
--#undef N
--#define N 32
--
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < 1024; i++)
-- {
-- vect_b[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_8.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_8.c
-deleted file mode 100644
-index 84e19423e2e6..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_8.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
--
--#include <complex.h>
--
--#define N 1024
--char vect_a[N];
--char vect_b[N];
--
--char test4(char x, char * restrict res)
--{
-- char ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_b[i] += x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] += x * vect_b[i];
-- res[i] *= vect_b[i];
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_80.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_80.c
-deleted file mode 100644
-index 7f563b788ac7..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_80.c
-+++ /dev/null
-@@ -1,49 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--extern void abort ();
--
--int x;
--__attribute__ ((noinline, noipa))
--void foo (int *a, int *b)
--{
-- int local_x = x;
-- for (int i = 0; i < 1024; ++i)
-- {
-- if (i + local_x == 13)
-- break;
-- a[i] = 2 * b[i];
-- }
--}
--
--int main ()
--{
--
-- check_vect ();
--
-- int a[1024] = {0};
-- int b[1024] = {0};
--
-- for (int i = 0; i < 1024; i++)
-- b[i] = i;
--
-- x = -512;
-- foo (a, b);
--
-- if (a[524] != 1048)
-- abort ();
--
-- if (a[525] != 0)
-- abort ();
--
-- if (a[1023] != 0)
-- abort ();
-- return 0;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_81.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_81.c
-deleted file mode 100644
-index 8a8c076ba92c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_81.c
-+++ /dev/null
-@@ -1,31 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--/* { dg-final { scan-tree-dump "epilog loop required" "vect" } } */
--void abort ();
--
--unsigned short sa[32];
--unsigned short sc[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
--unsigned short sb[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
-- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
--unsigned int ia[32];
--unsigned int ic[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
-- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
--unsigned int ib[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
-- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
--
--int main2 (int n)
--{
-- int i;
-- for (i = 0; i < n - 3; i++)
-- {
-- if (sa[i+3] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
-- abort ();
-- }
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
-deleted file mode 100644
-index 0e9b2d8d385c..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include <complex.h>
--
--#define N 1024
--complex double vect_a[N];
--complex double vect_b[N];
--
--complex double test4(complex double x, complex double t)
--{
-- complex double ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_a[i] = t + i;
-- if (vect_a[i] == x)
-- return i;
-- vect_a[i] += x * vect_a[i];
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_83.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_83.c
-deleted file mode 100644
-index 8b0e3fd6c5f5..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_83.c
-+++ /dev/null
-@@ -1,29 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
--
--#include <complex.h>
--
--#define N 1024
--complex double vect_a[N];
--complex double vect_b[N];
--
--complex double test4(complex double x)
--{
-- complex double ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- volatile complex double z = vect_b[i];
-- vect_b[i] = x + i + z;
-- if (vect_a[i] == x)
-- return i;
-- vect_a[i] += x * vect_b[i];
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_84.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_84.c
-deleted file mode 100644
-index 242ba453533e..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_84.c
-+++ /dev/null
-@@ -1,44 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include <stdbool.h>
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 17
--#endif
--bool vect_a[N] = { false, false, true, false, false, false,
-- false, false, false, false, false, false,
-- false, false, false, false, false };
--unsigned vect_b[N] = { 0 };
--
--__attribute__ ((noinline, noipa))
--unsigned test4(bool x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- if (vect_a[i] == x)
-- return 1;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- if (test4 (true) != 1)
-- abort ();
--
-- if (vect_b[2] != 0 && vect_b[1] == 0)
-- abort ();
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_85.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_85.c
-deleted file mode 100644
-index 3df376935735..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_85.c
-+++ /dev/null
-@@ -1,40 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 5
--#endif
--int vect_a[N] = { 5, 4, 8, 4, 6 };
--unsigned vect_b[N] = { 0 };
--
--__attribute__ ((noinline, noipa))
--unsigned test4(int x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- if (vect_a[i] > x)
-- return 1;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- if (test4 (7) != 1)
-- abort ();
--
-- if (vect_b[2] != 0 && vect_b[1] == 0)
-- abort ();
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_86.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_86.c
-deleted file mode 100644
-index 85c0d3a92772..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_86.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-additional-options "-std=gnu89" } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include "tree-vect.h"
--
--extern void abort ();
--extern void exit (int);
--
--__attribute__((noinline, noipa))
--int f(x) {
-- int i;
-- for (i = 0; i < 8 && (x & 1) == 1; i++)
-- x >>= 1;
-- return i;
--}
--main() {
-- check_vect ();
--
-- if (f(4) != 0)
-- abort();
-- exit(0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_87.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_87.c
-deleted file mode 100644
-index 3dce0c439bff..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_87.c
-+++ /dev/null
-@@ -1,26 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-additional-options "-std=gnu89" } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
--
--#include "tree-vect.h"
--
--extern void abort ();
--extern void exit (int);
--
--__attribute__((noinline, noipa))
--int f(x) {
-- int i;
-- for (i = 0; i < 8 && (x & 1) == 0; i++)
-- x >>= 1;
-- return i;
--}
--main() {
-- check_vect ();
--
-- if (f(4) != 2)
-- abort();
-- exit(0);
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
-deleted file mode 100644
-index b392dd465539..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
-+++ /dev/null
-@@ -1,41 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast --param vect-partial-vector-usage=2" } */
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 5
--#endif
--float vect_a[N] = { 5.1f, 4.2f, 8.0f, 4.25f, 6.5f };
--unsigned vect_b[N] = { 0 };
--
--__attribute__ ((noinline, noipa))
--unsigned test4(double x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- if (test4 (7.0) != 0)
-- abort ();
--
-- if (vect_b[2] != 0 && vect_b[1] == 0)
-- abort ();
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_89.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_89.c
-deleted file mode 100644
-index 39b6313b3a15..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_89.c
-+++ /dev/null
-@@ -1,21 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_int } */
--/* { dg-additional-options "-w" } */
--
--char *a;
--extern void d();
--void b() {
-- int c = 0;
-- while (c < 16) {
-- switch (a[c]) {
-- case '"':
-- case '\'':
-- c++;
-- continue;
-- }
-- break;
-- }
-- if (c)
-- d();
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_9.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_9.c
-deleted file mode 100644
-index 12f09c61c331..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_9.c
-+++ /dev/null
-@@ -1,28 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-do compile } */
--/* { dg-require-effective-target vect_early_break } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-additional-options "-Ofast" } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#ifndef N
--#define N 803
--#endif
--unsigned vect_a[N];
--unsigned vect_b[N];
--
--unsigned test4(unsigned x)
--{
-- unsigned ret = 0;
-- for (int i = 0; i < N; i++)
-- {
-- vect_a[i] = x + i;
-- if (vect_a[i] > x)
-- break;
-- vect_a[i] = x;
--
-- }
-- return ret;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_90.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_90.c
-deleted file mode 100644
-index ac390b6ede47..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_90.c
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 30
--#endif
--
--#ifndef IDX
--#define IDX 1
--#endif
--
--int n_earlyclobbers;
--
--typedef void* rtx;
--rtx reload_earlyclobbers[N] = {0};
--
--rtx foo = (void*)0xbadf00d;
--
--int
--__attribute__((noinline, noipa))
--earlyclobber_operand_p (rtx x)
--{
-- int i;
--
-- for (i = 0; i < n_earlyclobbers; i++)
-- if (reload_earlyclobbers[i] == x)
-- return 1;
--
-- return 0;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- n_earlyclobbers = IDX;
-- if (earlyclobber_operand_p (foo))
-- abort ();
--
-- return 0;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_91.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_91.c
-deleted file mode 100644
-index 4b1c558f8a33..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_91.c
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 30
--#endif
--
--#ifndef IDX
--#define IDX 0
--#endif
--
--int n_earlyclobbers;
--
--typedef void* rtx;
--rtx reload_earlyclobbers[N] = {0};
--
--rtx foo = (void*)0xbadf00d;
--
--int
--__attribute__((noinline, noipa))
--earlyclobber_operand_p (rtx x)
--{
-- int i;
--
-- for (i = 0; i < n_earlyclobbers; i++)
-- if (reload_earlyclobbers[i] == x)
-- return 1;
--
-- return 0;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- n_earlyclobbers = IDX;
-- if (earlyclobber_operand_p (foo))
-- abort ();
--
-- return 0;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_92.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_92.c
-deleted file mode 100644
-index 1b2403b338fd..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_92.c
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 30
--#endif
--
--#ifndef IDX
--#define IDX 15
--#endif
--
--int n_earlyclobbers;
--
--typedef void* rtx;
--rtx reload_earlyclobbers[N] = {0};
--
--rtx foo = (void*)0xbadf00d;
--
--int
--__attribute__((noinline, noipa))
--earlyclobber_operand_p (rtx x)
--{
-- int i;
--
-- for (i = 0; i < n_earlyclobbers; i++)
-- if (reload_earlyclobbers[i] == x)
-- return 1;
--
-- return 0;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- n_earlyclobbers = IDX;
-- if (earlyclobber_operand_p (foo))
-- abort ();
--
-- return 0;
--}
-diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_93.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
-deleted file mode 100644
-index 656a7788896d..000000000000
---- a/gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
-+++ /dev/null
-@@ -1,48 +0,0 @@
--/* { dg-add-options vect_early_break } */
--/* { dg-require-effective-target vect_early_break_hw } */
--/* { dg-require-effective-target vect_int } */
--
--/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
--
--#include "tree-vect.h"
--
--#ifndef N
--#define N 30
--#endif
--
--#ifndef IDX
--#define IDX 29
--#endif
--
--int n_earlyclobbers;
--
--typedef void* rtx;
--rtx reload_earlyclobbers[N] = {0};
--
--rtx foo = (void*)0xbadf00d;
--
--int
--__attribute__((noinline, noipa))
--earlyclobber_operand_p (rtx x)
--{
-- int i;
--
-- for (i = 0; i < n_earlyclobbers; i++)
-- if (reload_earlyclobbers[i] == x)
-- return 1;
--
-- return 0;
--}
--
--extern void abort ();
--
--int main ()
--{
-- check_vect ();
--
-- n_earlyclobbers = IDX;
-- if (earlyclobber_operand_p (foo))
-- abort ();
--
-- return 0;
--}
-diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
-index d65953158651..dc8e0bc7c2bd 100644
---- a/gcc/testsuite/lib/target-supports.exp
-+++ b/gcc/testsuite/lib/target-supports.exp
-@@ -4060,44 +4060,6 @@ proc check_effective_target_vect_int { } {
- }}]
- }
-
--# Return 1 if the target supports vectorization of early breaks,
--# 0 otherwise.
--#
--# This won't change for different subtargets so cache the result.
--
--proc check_effective_target_vect_early_break { } {
-- return [check_cached_effective_target_indexed vect_early_break {
-- expr {
-- [istarget aarch64*-*-*]
-- || [check_effective_target_sse4]
-- }}]
--}
--
--# Return 1 if the target supports hardware execution of early breaks,
--# 0 otherwise.
--#
--# This won't change for different subtargets so cache the result.
--
--proc check_effective_target_vect_early_break_hw { } {
-- return [check_cached_effective_target_indexed vect_early_break_hw {
-- expr {
-- [istarget aarch64*-*-*]
-- || [check_sse4_hw_available]
-- }}]
--}
--
--proc add_options_for_vect_early_break { flags } {
-- if { ! [check_effective_target_vect_early_break] } {
-- return "$flags"
-- }
--
-- if { [check_effective_target_sse4] } {
-- return "$flags -msse4.1"
-- }
--
-- return "$flags"
--}
--
- # Return 1 if the target supports hardware vectorization of complex additions of
- # byte, 0 otherwise.
- #
---
-2.43.0
-
diff --git a/14.0.0/gentoo/79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch b/14.0.0/gentoo/79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
deleted file mode 100644
index 3a6aa30..0000000
--- a/14.0.0/gentoo/79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-From 31b1a8e79e86712d87ebe8de201636c8bd83a6be Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:13 +0000
-Subject: [PATCH 5/8] Revert "AArch64: Add implementation for vector cbranch
- for Advanced SIMD"
-
-This reverts commit 1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/config/aarch64/aarch64-simd.md | 42 ------
- .../aarch64/sve/vect-early-break-cbranch.c | 108 ---------------
- .../aarch64/vect-early-break-cbranch.c | 124 ------------------
- 3 files changed, 274 deletions(-)
- delete mode 100644 gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
- delete mode 100644 gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
-
-diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
-index 3cd184f46fa9..8aa55c641e1c 100644
---- a/gcc/config/aarch64/aarch64-simd.md
-+++ b/gcc/config/aarch64/aarch64-simd.md
-@@ -3885,48 +3885,6 @@ (define_expand "vcond_mask_<mode><v_int_equiv>"
- DONE;
- })
-
--;; Patterns comparing two vectors and conditionally jump
--
--(define_expand "cbranch<mode>4"
-- [(set (pc)
-- (if_then_else
-- (match_operator 0 "aarch64_equality_operator"
-- [(match_operand:VDQ_I 1 "register_operand")
-- (match_operand:VDQ_I 2 "aarch64_simd_reg_or_zero")])
-- (label_ref (match_operand 3 ""))
-- (pc)))]
-- "TARGET_SIMD"
--{
-- auto code = GET_CODE (operands[0]);
-- rtx tmp = operands[1];
--
-- /* If comparing against a non-zero vector we have to do a comparison first
-- so we can have a != 0 comparison with the result. */
-- if (operands[2] != CONST0_RTX (<MODE>mode))
-- {
-- tmp = gen_reg_rtx (<MODE>mode);
-- emit_insn (gen_xor<mode>3 (tmp, operands[1], operands[2]));
-- }
--
-- /* For 64-bit vectors we need no reductions. */
-- if (known_eq (128, GET_MODE_BITSIZE (<MODE>mode)))
-- {
-- /* Always reduce using a V4SI. */
-- rtx reduc = gen_lowpart (V4SImode, tmp);
-- rtx res = gen_reg_rtx (V4SImode);
-- emit_insn (gen_aarch64_umaxpv4si (res, reduc, reduc));
-- emit_move_insn (tmp, gen_lowpart (<MODE>mode, res));
-- }
--
-- rtx val = gen_reg_rtx (DImode);
-- emit_move_insn (val, gen_lowpart (DImode, tmp));
--
-- rtx cc_reg = aarch64_gen_compare_reg (code, val, const0_rtx);
-- rtx cmp_rtx = gen_rtx_fmt_ee (code, DImode, cc_reg, const0_rtx);
-- emit_jump_insn (gen_condjump (cmp_rtx, cc_reg, operands[3]));
-- DONE;
--})
--
- ;; Patterns comparing two vectors to produce a mask.
-
- (define_expand "vec_cmp<mode><mode>"
-diff --git a/gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
-deleted file mode 100644
-index d15053553f94..000000000000
---- a/gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
-+++ /dev/null
-@@ -1,108 +0,0 @@
--/* { dg-do compile } */
--/* { dg-options "-O3 -fno-schedule-insns -fno-reorder-blocks -fno-schedule-insns2" } */
--/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
--#define N 640
--int a[N] = {0};
--int b[N] = {0};
--/*
--** f1:
--** ...
--** cmpgt p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
--** ptest p[0-9]+, p[0-9]+.b
--** b.any \.L[0-9]+
--** ...
--*/
--void f1 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] > 0)
-- break;
-- }
--}
--/*
--** f2:
--** ...
--** cmpge p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
--** ptest p[0-9]+, p[0-9]+.b
--** b.any \.L[0-9]+
--** ...
--*/
--void f2 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] >= 0)
-- break;
-- }
--}
--/*
--** f3:
--** ...
--** cmpeq p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
--** ptest p[0-9]+, p[0-9]+.b
--** b.any \.L[0-9]+
--** ...
--*/
--void f3 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] == 0)
-- break;
-- }
--}
--/*
--** f4:
--** ...
--** cmpne p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
--** ptest p[0-9]+, p[0-9]+.b
--** b.any \.L[0-9]+
--** ...
--*/
--void f4 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] != 0)
-- break;
-- }
--}
--/*
--** f5:
--** ...
--** cmplt p[0-9]+.s, p7/z, z[0-9]+.s, #0
--** ptest p[0-9]+, p[0-9]+.b
--** b.any .L[0-9]+
--** ...
--*/
--void f5 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] < 0)
-- break;
-- }
--}
--/*
--** f6:
--** ...
--** cmple p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
--** ptest p[0-9]+, p[0-9]+.b
--** b.any \.L[0-9]+
--** ...
--*/
--void f6 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] <= 0)
-- break;
-- }
--}
-diff --git a/gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
-deleted file mode 100644
-index a5e7b94827dd..000000000000
---- a/gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
-+++ /dev/null
-@@ -1,124 +0,0 @@
--/* { dg-do compile } */
--/* { dg-options "-O3 -fno-schedule-insns -fno-reorder-blocks -fno-schedule-insns2" } */
--/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
--
--#pragma GCC target "+nosve"
--
--#define N 640
--int a[N] = {0};
--int b[N] = {0};
--
--
--/*
--** f1:
--** ...
--** cmgt v[0-9]+.4s, v[0-9]+.4s, #0
--** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** fmov x[0-9]+, d[0-9]+
--** cbnz x[0-9]+, \.L[0-9]+
--** ...
--*/
--void f1 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] > 0)
-- break;
-- }
--}
--
--/*
--** f2:
--** ...
--** cmge v[0-9]+.4s, v[0-9]+.4s, #0
--** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** fmov x[0-9]+, d[0-9]+
--** cbnz x[0-9]+, \.L[0-9]+
--** ...
--*/
--void f2 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] >= 0)
-- break;
-- }
--}
--
--/*
--** f3:
--** ...
--** cmeq v[0-9]+.4s, v[0-9]+.4s, #0
--** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** fmov x[0-9]+, d[0-9]+
--** cbnz x[0-9]+, \.L[0-9]+
--** ...
--*/
--void f3 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] == 0)
-- break;
-- }
--}
--
--/*
--** f4:
--** ...
--** cmtst v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** fmov x[0-9]+, d[0-9]+
--** cbnz x[0-9]+, \.L[0-9]+
--** ...
--*/
--void f4 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] != 0)
-- break;
-- }
--}
--
--/*
--** f5:
--** ...
--** cmlt v[0-9]+.4s, v[0-9]+.4s, #0
--** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** fmov x[0-9]+, d[0-9]+
--** cbnz x[0-9]+, \.L[0-9]+
--** ...
--*/
--void f5 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] < 0)
-- break;
-- }
--}
--
--/*
--** f6:
--** ...
--** cmle v[0-9]+.4s, v[0-9]+.4s, #0
--** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
--** fmov x[0-9]+, d[0-9]+
--** cbnz x[0-9]+, \.L[0-9]+
--** ...
--*/
--void f6 ()
--{
-- for (int i = 0; i < N; i++)
-- {
-- b[i] += a[i];
-- if (a[i] <= 0)
-- break;
-- }
--}
---
-2.43.0
-
diff --git a/14.0.0/gentoo/80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch b/14.0.0/gentoo/80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
deleted file mode 100644
index ac87127..0000000
--- a/14.0.0/gentoo/80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
+++ /dev/null
@@ -1,2426 +0,0 @@
-From 884068ec19c846246ab55b4820fd2badca329339 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:14 +0000
-Subject: [PATCH 6/8] Revert "middle-end: Support vectorization of loops with
- multiple exits."
-
-This reverts commit 01f4251b8775c832a92d55e2df57c9ac72eaceef.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/tree-if-conv.cc | 2 +-
- gcc/tree-vect-data-refs.cc | 237 ------------------
- gcc/tree-vect-loop-manip.cc | 331 +++++--------------------
- gcc/tree-vect-loop.cc | 482 ++++++++++--------------------------
- gcc/tree-vect-patterns.cc | 167 ++-----------
- gcc/tree-vect-stmts.cc | 305 ++---------------------
- gcc/tree-vectorizer.cc | 4 +-
- gcc/tree-vectorizer.h | 35 +--
- 8 files changed, 233 insertions(+), 1330 deletions(-)
-
-diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc
-index 8e79362f96ab..bb87db382086 100644
---- a/gcc/tree-if-conv.cc
-+++ b/gcc/tree-if-conv.cc
-@@ -844,7 +844,7 @@ idx_within_array_bound (tree ref, tree *idx, void *dta)
-
- /* Return TRUE if ref is a within bound array reference. */
-
--bool
-+static bool
- ref_within_array_bound (gimple *stmt, tree ref)
- {
- class loop *loop = loop_containing_stmt (stmt);
-diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
-index 752c34c26e9b..290303f198b5 100644
---- a/gcc/tree-vect-data-refs.cc
-+++ b/gcc/tree-vect-data-refs.cc
-@@ -613,238 +613,6 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
- return opt_result::success ();
- }
-
--/* Funcion vect_analyze_early_break_dependences.
--
-- Examime all the data references in the loop and make sure that if we have
-- mulitple exits that we are able to safely move stores such that they become
-- safe for vectorization. The function also calculates the place where to move
-- the instructions to and computes what the new vUSE chain should be.
--
-- This works in tandem with the CFG that will be produced by
-- slpeel_tree_duplicate_loop_to_edge_cfg later on.
--
-- This function tries to validate whether an early break vectorization
-- is possible for the current instruction sequence. Returns True i
-- possible, otherwise False.
--
-- Requirements:
-- - Any memory access must be to a fixed size buffer.
-- - There must not be any loads and stores to the same object.
-- - Multiple loads are allowed as long as they don't alias.
--
-- NOTE:
-- This implemementation is very conservative. Any overlappig loads/stores
-- that take place before the early break statement gets rejected aside from
-- WAR dependencies.
--
-- i.e.:
--
-- a[i] = 8
-- c = a[i]
-- if (b[i])
-- ...
--
-- is not allowed, but
--
-- c = a[i]
-- a[i] = 8
-- if (b[i])
-- ...
--
-- is which is the common case. */
--
--static opt_result
--vect_analyze_early_break_dependences (loop_vec_info loop_vinfo)
--{
-- DUMP_VECT_SCOPE ("vect_analyze_early_break_dependences");
--
-- /* List of all load data references found during traversal. */
-- auto_vec<data_reference *> bases;
-- basic_block dest_bb = NULL;
--
-- hash_set <gimple *> visited;
-- class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-- class loop *loop_nest = loop_outer (loop);
--
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "loop contains multiple exits, analyzing"
-- " statement dependencies.\n");
--
-- for (gimple *c : LOOP_VINFO_LOOP_CONDS (loop_vinfo))
-- {
-- stmt_vec_info loop_cond_info = loop_vinfo->lookup_stmt (c);
-- if (STMT_VINFO_TYPE (loop_cond_info) != loop_exit_ctrl_vec_info_type)
-- continue;
--
-- gimple_stmt_iterator gsi = gsi_for_stmt (c);
--
-- /* Now analyze all the remaining statements and try to determine which
-- instructions are allowed/needed to be moved. */
-- while (!gsi_end_p (gsi))
-- {
-- gimple *stmt = gsi_stmt (gsi);
-- gsi_prev (&gsi);
-- if (!gimple_has_ops (stmt)
-- || is_gimple_debug (stmt))
-- continue;
--
-- stmt_vec_info stmt_vinfo = loop_vinfo->lookup_stmt (stmt);
-- auto dr_ref = STMT_VINFO_DATA_REF (stmt_vinfo);
-- if (!dr_ref)
-- continue;
--
-- /* We currently only support statically allocated objects due to
-- not having first-faulting loads support or peeling for
-- alignment support. Compute the size of the referenced object
-- (it could be dynamically allocated). */
-- tree obj = DR_BASE_ADDRESS (dr_ref);
-- if (!obj || TREE_CODE (obj) != ADDR_EXPR)
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-- "early breaks only supported on statically"
-- " allocated objects.\n");
-- return opt_result::failure_at (c,
-- "can't safely apply code motion to "
-- "dependencies of %G to vectorize "
-- "the early exit.\n", c);
-- }
--
-- tree refop = TREE_OPERAND (obj, 0);
-- tree refbase = get_base_address (refop);
-- if (!refbase || !DECL_P (refbase) || !DECL_SIZE (refbase)
-- || TREE_CODE (DECL_SIZE (refbase)) != INTEGER_CST)
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-- "early breaks only supported on"
-- " statically allocated objects.\n");
-- return opt_result::failure_at (c,
-- "can't safely apply code motion to "
-- "dependencies of %G to vectorize "
-- "the early exit.\n", c);
-- }
--
-- /* Check if vector accesses to the object will be within bounds.
-- must be a constant or assume loop will be versioned or niters
-- bounded by VF so accesses are within range. */
-- if (!ref_within_array_bound (stmt, DR_REF (dr_ref)))
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-- "early breaks not supported: vectorization "
-- "would %s beyond size of obj.",
-- DR_IS_READ (dr_ref) ? "read" : "write");
-- return opt_result::failure_at (c,
-- "can't safely apply code motion to "
-- "dependencies of %G to vectorize "
-- "the early exit.\n", c);
-- }
--
-- if (DR_IS_READ (dr_ref))
-- bases.safe_push (dr_ref);
-- else if (DR_IS_WRITE (dr_ref))
-- {
-- /* We are moving writes down in the CFG. To be sure that this
-- is valid after vectorization we have to check all the loads
-- we are sinking the stores past to see if any of them may
-- alias or are the same object.
--
-- Same objects will not be an issue because unless the store
-- is marked volatile the value can be forwarded. If the
-- store is marked volatile we don't vectorize the loop
-- anyway.
--
-- That leaves the check for aliasing. We don't really need
-- to care about the stores aliasing with each other since the
-- stores are moved in order so the effects are still observed
-- correctly. This leaves the check for WAR dependencies
-- which we would be introducing here if the DR can alias.
-- The check is quadratic in loads/stores but I have not found
-- a better API to do this. I believe all loads and stores
-- must be checked. We also must check them when we
-- encountered the store, since we don't care about loads past
-- the store. */
--
-- for (auto dr_read : bases)
-- if (dr_may_alias_p (dr_ref, dr_read, loop_nest))
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION,
-- vect_location,
-- "early breaks not supported: "
-- "overlapping loads and stores "
-- "found before the break "
-- "statement.\n");
--
-- return opt_result::failure_at (stmt,
-- "can't safely apply code motion to dependencies"
-- " to vectorize the early exit. %G may alias with"
-- " %G\n", stmt, dr_read->stmt);
-- }
-- }
--
-- if (gimple_vdef (stmt))
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "==> recording stmt %G", stmt);
--
-- LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo).safe_push (stmt);
-- }
-- else if (gimple_vuse (stmt))
-- {
-- LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).safe_insert (0, stmt);
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "marked statement for vUSE update: %G", stmt);
-- }
-- }
--
-- /* Save destination as we go, BB are visited in order and the last one
-- is where statements should be moved to. */
-- if (!dest_bb)
-- dest_bb = gimple_bb (c);
-- else
-- {
-- basic_block curr_bb = gimple_bb (c);
-- if (dominated_by_p (CDI_DOMINATORS, curr_bb, dest_bb))
-- dest_bb = curr_bb;
-- }
-- }
--
-- basic_block dest_bb0 = EDGE_SUCC (dest_bb, 0)->dest;
-- basic_block dest_bb1 = EDGE_SUCC (dest_bb, 1)->dest;
-- dest_bb = flow_bb_inside_loop_p (loop, dest_bb0) ? dest_bb0 : dest_bb1;
-- /* We don't allow outer -> inner loop transitions which should have been
-- trapped already during loop form analysis. */
-- gcc_assert (dest_bb->loop_father == loop);
--
-- gcc_assert (dest_bb);
-- LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo) = dest_bb;
--
-- if (!LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).is_empty ())
-- {
-- /* All uses shall be updated to that of the first load. Entries are
-- stored in reverse order. */
-- tree vuse = gimple_vuse (LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).last ());
-- for (auto g : LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo))
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "will update use: %T, mem_ref: %G", vuse, g);
-- }
-- }
--
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "recorded statements to be moved to BB %d\n",
-- LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo)->index);
--
-- return opt_result::success ();
--}
--
- /* Function vect_analyze_data_ref_dependences.
-
- Examine all the data references in the loop, and make sure there do not
-@@ -889,11 +657,6 @@ vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo,
- return res;
- }
-
-- /* If we have early break statements in the loop, check to see if they
-- are of a form we can vectorizer. */
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- return vect_analyze_early_break_dependences (loop_vinfo);
--
- return opt_result::success ();
- }
-
-diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
-index 9330183bfb9e..9182192710eb 100644
---- a/gcc/tree-vect-loop-manip.cc
-+++ b/gcc/tree-vect-loop-manip.cc
-@@ -448,20 +448,6 @@ vect_adjust_loop_lens_control (tree iv_type, gimple_seq *seq,
- }
- }
-
--/* Stores the standard position for induction variable increment in belonging to
-- LOOP_EXIT (just before the exit condition of the given exit to BSI.
-- INSERT_AFTER is set to true if the increment should be inserted after
-- *BSI. */
--
--void
--vect_iv_increment_position (edge loop_exit, gimple_stmt_iterator *bsi,
-- bool *insert_after)
--{
-- basic_block bb = loop_exit->src;
-- *bsi = gsi_last_bb (bb);
-- *insert_after = false;
--}
--
- /* Helper for vect_set_loop_condition_partial_vectors. Generate definitions
- for all the rgroup controls in RGC and return a control that is nonzero
- when the loop needs to iterate. Add any new preheader statements to
-@@ -545,8 +531,7 @@ vect_set_loop_controls_directly (class loop *loop, loop_vec_info loop_vinfo,
- tree index_before_incr, index_after_incr;
- gimple_stmt_iterator incr_gsi;
- bool insert_after;
-- edge exit_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
-- vect_iv_increment_position (exit_e, &incr_gsi, &insert_after);
-+ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
- if (LOOP_VINFO_USING_DECREMENTING_IV_P (loop_vinfo))
- {
- /* Create an IV that counts down from niters_total and whose step
-@@ -951,18 +936,7 @@ vect_set_loop_condition_partial_vectors (class loop *loop, edge exit_edge,
-
- if (final_iv)
- {
-- gassign *assign;
-- /* If vectorizing an inverted early break loop we have to restart the
-- scalar loop at niters - vf. This matches what we do in
-- vect_gen_vector_loop_niters_mult_vf for non-masked loops. */
-- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
-- {
-- tree ftype = TREE_TYPE (orig_niters);
-- tree vf = build_int_cst (ftype, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
-- assign = gimple_build_assign (final_iv, MINUS_EXPR, orig_niters, vf);
-- }
-- else
-- assign = gimple_build_assign (final_iv, orig_niters);
-+ gassign *assign = gimple_build_assign (final_iv, orig_niters);
- gsi_insert_on_edge_immediate (exit_edge, assign);
- }
-
-@@ -1043,7 +1017,7 @@ vect_set_loop_condition_partial_vectors_avx512 (class loop *loop,
- tree index_before_incr, index_after_incr;
- gimple_stmt_iterator incr_gsi;
- bool insert_after;
-- vect_iv_increment_position (exit_edge, &incr_gsi, &insert_after);
-+ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
- create_iv (niters_adj, MINUS_EXPR, iv_step, NULL_TREE, loop,
- &incr_gsi, insert_after, &index_before_incr,
- &index_after_incr);
-@@ -1199,19 +1173,8 @@ vect_set_loop_condition_partial_vectors_avx512 (class loop *loop,
-
- if (final_iv)
- {
-- gassign *assign;
-- /* If vectorizing an inverted early break loop we have to restart the
-- scalar loop at niters - vf. This matches what we do in
-- vect_gen_vector_loop_niters_mult_vf for non-masked loops. */
-- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
-- {
-- tree ftype = TREE_TYPE (orig_niters);
-- tree vf = build_int_cst (ftype, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
-- assign = gimple_build_assign (final_iv, MINUS_EXPR, orig_niters, vf);
-- }
-- else
-- assign = gimple_build_assign (final_iv, orig_niters);
-- gsi_insert_on_edge_immediate (exit_edge, assign);
-+ gassign *assign = gimple_build_assign (final_iv, orig_niters);
-+ gsi_insert_on_edge_immediate (single_exit (loop), assign);
- }
-
- return cond_stmt;
-@@ -1315,7 +1278,7 @@ vect_set_loop_condition_normal (loop_vec_info /* loop_vinfo */, edge exit_edge,
- }
- }
-
-- vect_iv_increment_position (exit_edge, &incr_gsi, &insert_after);
-+ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
- create_iv (init, PLUS_EXPR, step, NULL_TREE, loop,
- &incr_gsi, insert_after, &indx_before_incr, &indx_after_incr);
- indx_after_incr = force_gimple_operand_gsi (&loop_cond_gsi, indx_after_incr,
-@@ -1440,16 +1403,13 @@ vect_set_loop_condition (class loop *loop, edge loop_e, loop_vec_info loop_vinfo
- copies remains the same.
-
- If UPDATED_DOMS is not NULL it is update with the list of basic blocks whoms
-- dominators were updated during the peeling. When doing early break vectorization
-- then LOOP_VINFO needs to be provided and is used to keep track of any newly created
-- memory references that need to be updated should we decide to vectorize. */
-+ dominators were updated during the peeling. */
-
- class loop *
- slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- class loop *scalar_loop,
- edge scalar_exit, edge e, edge *new_e,
-- bool flow_loops,
-- vec<basic_block> *updated_doms)
-+ bool flow_loops)
- {
- class loop *new_loop;
- basic_block *new_bbs, *bbs, *pbbs;
-@@ -1566,9 +1526,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- }
-
- auto loop_exits = get_loop_exit_edges (loop);
-- bool multiple_exits_p = loop_exits.length () > 1;
- auto_vec<basic_block> doms;
-- class loop *update_loop = NULL;
-
- if (at_exit) /* Add the loop copy at exit. */
- {
-@@ -1578,65 +1536,39 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- flush_pending_stmts (new_exit);
- }
-
-- bool multiple_exits_p = loop_exits.length () > 1;
-- basic_block main_loop_exit_block = new_preheader;
-- basic_block alt_loop_exit_block = NULL;
-- /* Create intermediate edge for main exit. But only useful for early
-- exits. */
-- if (multiple_exits_p)
-- {
-- edge loop_e = single_succ_edge (new_preheader);
-- new_preheader = split_edge (loop_e);
-- }
--
- auto_vec <gimple *> new_phis;
- hash_map <tree, tree> new_phi_args;
- /* First create the empty phi nodes so that when we flush the
- statements they can be filled in. However because there is no order
- between the PHI nodes in the exits and the loop headers we need to
- order them base on the order of the two headers. First record the new
-- phi nodes. Then redirect the edges and flush the changes. This writes
-- out the new SSA names. */
-- for (auto gsi_from = gsi_start_phis (loop_exit->dest);
-+ phi nodes. */
-+ for (auto gsi_from = gsi_start_phis (scalar_exit->dest);
- !gsi_end_p (gsi_from); gsi_next (&gsi_from))
- {
- gimple *from_phi = gsi_stmt (gsi_from);
- tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
-- gphi *res = create_phi_node (new_res, main_loop_exit_block);
-+ gphi *res = create_phi_node (new_res, new_preheader);
- new_phis.safe_push (res);
- }
-
-- for (auto exit : loop_exits)
-+ /* Then redirect the edges and flush the changes. This writes out the new
-+ SSA names. */
-+ for (edge exit : loop_exits)
- {
-- basic_block dest = main_loop_exit_block;
-- if (exit != loop_exit)
-- {
-- if (!alt_loop_exit_block)
-- {
-- alt_loop_exit_block = split_edge (exit);
-- edge res = redirect_edge_and_branch (
-- single_succ_edge (alt_loop_exit_block),
-- new_preheader);
-- flush_pending_stmts (res);
-- continue;
-- }
-- dest = alt_loop_exit_block;
-- }
-- edge e = redirect_edge_and_branch (exit, dest);
-- flush_pending_stmts (e);
-+ edge temp_e = redirect_edge_and_branch (exit, new_preheader);
-+ flush_pending_stmts (temp_e);
- }
--
- /* Record the new SSA names in the cache so that we can skip materializing
- them again when we fill in the rest of the LCSSA variables. */
- for (auto phi : new_phis)
- {
-- tree new_arg = gimple_phi_arg (phi, loop_exit->dest_idx)->def;
-+ tree new_arg = gimple_phi_arg (phi, 0)->def;
-
- if (!SSA_VAR_P (new_arg))
- continue;
--
- /* If the PHI MEM node dominates the loop then we shouldn't create
-- a new LC-SSSA PHI for it in the intermediate block. */
-+ a new LC-SSSA PHI for it in the intermediate block. */
- /* A MEM phi that consitutes a new DEF for the vUSE chain can either
- be a .VDEF or a PHI that operates on MEM. And said definition
- must not be inside the main loop. Or we must be a parameter.
-@@ -1652,9 +1584,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- remove_phi_node (&gsi, true);
- continue;
- }
--
-- /* If we decide to remove the PHI node we should also not
-- rematerialize it later on. */
- new_phi_args.put (new_arg, gimple_phi_result (phi));
-
- if (TREE_CODE (new_arg) != SSA_NAME)
-@@ -1666,77 +1595,34 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- preheader block and still find the right LC nodes. */
- edge loop_entry = single_succ_edge (new_preheader);
- if (flow_loops)
-- {
-- bool peeled_iters = single_pred (loop->latch) != loop_exit->src;
-- /* Link through the main exit first. */
-- for (auto gsi_from = gsi_start_phis (loop->header),
-- gsi_to = gsi_start_phis (new_loop->header);
-- !gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
-- gsi_next (&gsi_from), gsi_next (&gsi_to))
-- {
-- gimple *from_phi = gsi_stmt (gsi_from);
-- gimple *to_phi = gsi_stmt (gsi_to);
-- tree new_arg = PHI_ARG_DEF_FROM_EDGE (from_phi,
-- loop_latch_edge (loop));
--
-- /* Check if we've already created a new phi node during edge
-- redirection. If we have, only propagate the value
-- downwards. */
-- if (tree *res = new_phi_args.get (new_arg))
-- {
-- if (multiple_exits_p)
-- new_arg = *res;
-- else
-- {
-- adjust_phi_and_debug_stmts (to_phi, loop_entry, *res);
-- continue;
-- }
-- }
-- /* If we have multiple exits and the vector loop is peeled then we
-- need to use the value at start of loop. */
-- if (peeled_iters)
-- {
-- tree tmp_arg = gimple_phi_result (from_phi);
-- if (!new_phi_args.get (tmp_arg))
-- new_arg = tmp_arg;
-- }
--
-- tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
-- gphi *lcssa_phi = create_phi_node (new_res, new_preheader);
-+ for (auto gsi_from = gsi_start_phis (loop->header),
-+ gsi_to = gsi_start_phis (new_loop->header);
-+ !gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
-+ gsi_next (&gsi_from), gsi_next (&gsi_to))
-+ {
-+ gimple *from_phi = gsi_stmt (gsi_from);
-+ gimple *to_phi = gsi_stmt (gsi_to);
-+ tree new_arg = PHI_ARG_DEF_FROM_EDGE (from_phi,
-+ loop_latch_edge (loop));
-
-- /* Otherwise, main loop exit should use the final iter value. */
-- SET_PHI_ARG_DEF (lcssa_phi, loop_exit->dest_idx, new_arg);
-+ /* Check if we've already created a new phi node during edge
-+ redirection. If we have, only propagate the value downwards. */
-+ if (tree *res = new_phi_args.get (new_arg))
-+ {
-+ adjust_phi_and_debug_stmts (to_phi, loop_entry, *res);
-+ continue;
-+ }
-
-- adjust_phi_and_debug_stmts (to_phi, loop_entry, new_res);
-- }
-+ tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
-+ gphi *lcssa_phi = create_phi_node (new_res, new_preheader);
-
-- set_immediate_dominator (CDI_DOMINATORS, main_loop_exit_block,
-- loop_exit->src);
-+ /* Main loop exit should use the final iter value. */
-+ add_phi_arg (lcssa_phi, new_arg, loop_exit, UNKNOWN_LOCATION);
-
-- /* Now link the alternative exits. */
-- if (multiple_exits_p)
-- {
-- set_immediate_dominator (CDI_DOMINATORS, new_preheader,
-- main_loop_exit_block);
-- for (auto gsi_from = gsi_start_phis (loop->header),
-- gsi_to = gsi_start_phis (new_preheader);
-- !gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
-- gsi_next (&gsi_from), gsi_next (&gsi_to))
-- {
-- gimple *from_phi = gsi_stmt (gsi_from);
-- gimple *to_phi = gsi_stmt (gsi_to);
--
-- tree alt_arg = gimple_phi_result (from_phi);
-- edge main_e = single_succ_edge (alt_loop_exit_block);
-- for (edge e : loop_exits)
-- if (e != loop_exit)
-- SET_PHI_ARG_DEF (to_phi, main_e->dest_idx, alt_arg);
-- }
-+ adjust_phi_and_debug_stmts (to_phi, loop_entry, new_res);
-+ }
-
-- set_immediate_dominator (CDI_DOMINATORS, new_preheader,
-- loop->header);
-- }
-- }
-+ set_immediate_dominator (CDI_DOMINATORS, new_preheader, e->src);
-
- if (was_imm_dom || duplicate_outer_loop)
- set_immediate_dominator (CDI_DOMINATORS, exit_dest, new_exit->src);
-@@ -1748,21 +1634,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- delete_basic_block (preheader);
- set_immediate_dominator (CDI_DOMINATORS, scalar_loop->header,
- loop_preheader_edge (scalar_loop)->src);
--
-- /* Finally after wiring the new epilogue we need to update its main exit
-- to the original function exit we recorded. Other exits are already
-- correct. */
-- if (multiple_exits_p)
-- {
-- update_loop = new_loop;
-- for (edge e : get_loop_exit_edges (loop))
-- doms.safe_push (e->dest);
-- doms.safe_push (exit_dest);
--
-- /* Likely a fall-through edge, so update if needed. */
-- if (single_succ_p (exit_dest))
-- doms.safe_push (single_succ (exit_dest));
-- }
- }
- else /* Add the copy at entry. */
- {
-@@ -1810,34 +1681,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- delete_basic_block (new_preheader);
- set_immediate_dominator (CDI_DOMINATORS, new_loop->header,
- loop_preheader_edge (new_loop)->src);
--
-- if (multiple_exits_p)
-- update_loop = loop;
-- }
--
-- if (multiple_exits_p)
-- {
-- for (edge e : get_loop_exit_edges (update_loop))
-- {
-- edge ex;
-- edge_iterator ei;
-- FOR_EACH_EDGE (ex, ei, e->dest->succs)
-- {
-- /* Find the first non-fallthrough block as fall-throughs can't
-- dominate other blocks. */
-- if (single_succ_p (ex->dest))
-- {
-- doms.safe_push (ex->dest);
-- ex = single_succ_edge (ex->dest);
-- }
-- doms.safe_push (ex->dest);
-- }
-- doms.safe_push (e->dest);
-- }
--
-- iterate_fix_dominators (CDI_DOMINATORS, doms, false);
-- if (updated_doms)
-- updated_doms->safe_splice (doms);
- }
-
- free (new_bbs);
-@@ -1912,10 +1755,12 @@ slpeel_can_duplicate_loop_p (const class loop *loop, const_edge exit_e,
- edge entry_e = loop_preheader_edge (loop);
- gcond *orig_cond = get_loop_exit_condition (exit_e);
- gimple_stmt_iterator loop_exit_gsi = gsi_last_bb (exit_e->src);
-+ unsigned int num_bb = loop->inner? 5 : 2;
-
- /* All loops have an outer scope; the only case loop->outer is NULL is for
- the function itself. */
- if (!loop_outer (loop)
-+ || loop->num_nodes != num_bb
- || !empty_block_p (loop->latch)
- || !exit_e
- /* Verify that new loop exit condition can be trivially modified. */
-@@ -2204,8 +2049,12 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
- gphi_iterator gsi, gsi1;
- class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
- basic_block update_bb = update_e->dest;
-+
- basic_block exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
-- gimple_stmt_iterator last_gsi = gsi_last_bb (exit_bb);
-+
-+ /* Make sure there exists a single-predecessor exit bb: */
-+ gcc_assert (single_pred_p (exit_bb));
-+ gcc_assert (single_succ_edge (exit_bb) == update_e);
-
- for (gsi = gsi_start_phis (loop->header), gsi1 = gsi_start_phis (update_bb);
- !gsi_end_p (gsi) && !gsi_end_p (gsi1);
-@@ -2215,6 +2064,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
- tree step_expr, off;
- tree type;
- tree var, ni, ni_name;
-+ gimple_stmt_iterator last_gsi;
-
- gphi *phi = gsi.phi ();
- gphi *phi1 = gsi1.phi ();
-@@ -2250,8 +2100,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
- {
- tree stype = TREE_TYPE (step_expr);
- off = fold_build2 (MULT_EXPR, stype,
-- fold_convert (stype, niters), step_expr);
--
-+ fold_convert (stype, niters), step_expr);
- if (POINTER_TYPE_P (type))
- ni = fold_build_pointer_plus (init_expr, off);
- else
-@@ -2270,9 +2119,9 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
-
- var = create_tmp_var (type, "tmp");
-
-+ last_gsi = gsi_last_bb (exit_bb);
- gimple_seq new_stmts = NULL;
- ni_name = force_gimple_operand (ni, &new_stmts, false, var);
--
- /* Exit_bb shouldn't be empty. */
- if (!gsi_end_p (last_gsi))
- {
-@@ -2770,19 +2619,11 @@ vect_gen_vector_loop_niters_mult_vf (loop_vec_info loop_vinfo,
- int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo).to_constant ();
- tree type = TREE_TYPE (niters_vector);
- tree log_vf = build_int_cst (type, exact_log2 (vf));
-- tree tree_vf = build_int_cst (type, vf);
- basic_block exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
-
- gcc_assert (niters_vector_mult_vf_ptr != NULL);
- tree niters_vector_mult_vf = fold_build2 (LSHIFT_EXPR, type,
- niters_vector, log_vf);
--
-- /* If we've peeled a vector iteration then subtract one full vector
-- iteration. */
-- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
-- niters_vector_mult_vf = fold_build2 (MINUS_EXPR, type,
-- niters_vector_mult_vf, tree_vf);
--
- if (!is_gimple_val (niters_vector_mult_vf))
- {
- tree var = create_tmp_var (type, "niters_vector_mult_vf");
-@@ -3023,12 +2864,6 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
- bound_epilog += vf - 1;
- if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
- bound_epilog += 1;
--
-- /* For early breaks the scalar loop needs to execute at most VF times
-- to find the element that caused the break. */
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- bound_epilog = vf;
--
- bool epilog_peeling = maybe_ne (bound_epilog, 0U);
- poly_uint64 bound_scalar = bound_epilog;
-
-@@ -3163,17 +2998,14 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
- bound_prolog + bound_epilog)
- : (!LOOP_REQUIRES_VERSIONING (loop_vinfo)
- || vect_epilogues));
--
- /* Epilog loop must be executed if the number of iterations for epilog
- loop is known at compile time, otherwise we need to add a check at
- the end of vector loop and skip to the end of epilog loop. */
- bool skip_epilog = (prolog_peeling < 0
- || !LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
- || !vf.is_constant ());
-- /* PEELING_FOR_GAPS and peeling for early breaks are special because epilog
-- loop must be executed. */
-- if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)
-- || LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-+ /* PEELING_FOR_GAPS is special because epilog loop must be executed. */
-+ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
- skip_epilog = false;
-
- class loop *scalar_loop = LOOP_VINFO_SCALAR_LOOP (loop_vinfo);
-@@ -3302,14 +3134,11 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
- epilog = vect_epilogues ? get_loop_copy (loop) : scalar_loop;
- edge epilog_e = vect_epilogues ? e : scalar_e;
- edge new_epilog_e = NULL;
-- auto_vec<basic_block> doms;
-- epilog
-- = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e, epilog, epilog_e, e,
-- &new_epilog_e, true, &doms);
--
-+ epilog = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e, epilog,
-+ epilog_e, e,
-+ &new_epilog_e);
- LOOP_VINFO_EPILOGUE_IV_EXIT (loop_vinfo) = new_epilog_e;
- gcc_assert (epilog);
-- gcc_assert (new_epilog_e);
- epilog->force_vectorize = false;
- bb_before_epilog = loop_preheader_edge (epilog)->src;
-
-@@ -3360,11 +3189,10 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
-
- /* Only need to handle basic block before epilog loop if it's not
- the guard_bb, which is the case when skip_vector is true. */
-- if (guard_bb != bb_before_epilog && single_pred_p (bb_before_epilog))
-+ if (guard_bb != bb_before_epilog)
- bb_before_epilog->count = single_pred_edge (bb_before_epilog)->count ();
- bb_before_epilog = loop_preheader_edge (epilog)->src;
- }
--
- /* If loop is peeled for non-zero constant times, now niters refers to
- orig_niters - prolog_peeling, it won't overflow even the orig_niters
- overflows. */
-@@ -3388,22 +3216,13 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
- niters_vector_mult_vf steps. */
- gcc_checking_assert (vect_can_advance_ivs_p (loop_vinfo));
- update_e = skip_vector ? e : loop_preheader_edge (epilog);
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- update_e = single_succ_edge (LOOP_VINFO_IV_EXIT (loop_vinfo)->dest);
--
-- /* If we have a peeled vector iteration, all exits are the same, leave it
-- and so the main exit needs to be treated the same as the alternative
-- exits in that we leave their updates to vectorizable_live_operations.
-- */
-- if (!LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
-- vect_update_ivs_after_vectorizer (loop_vinfo, niters_vector_mult_vf,
-- update_e);
--
-- if (skip_epilog || LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-+ vect_update_ivs_after_vectorizer (loop_vinfo, niters_vector_mult_vf,
-+ update_e);
-+
-+ if (skip_epilog)
- {
- guard_cond = fold_build2 (EQ_EXPR, boolean_type_node,
- niters, niters_vector_mult_vf);
--
- guard_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
- edge epilog_e = LOOP_VINFO_EPILOGUE_IV_EXIT (loop_vinfo);
- guard_to = epilog_e->dest;
-@@ -3411,7 +3230,6 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
- skip_vector ? anchor : guard_bb,
- prob_epilog.invert (),
- irred_flag);
-- doms.safe_push (guard_to);
- if (vect_epilogues)
- epilogue_vinfo->skip_this_loop_edge = guard_e;
- edge main_iv = LOOP_VINFO_IV_EXIT (loop_vinfo);
-@@ -3450,20 +3268,10 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
- scale_loop_profile (epilog, prob_epilog, -1);
- }
-
-- /* Recalculate the dominators after adding the guard edge. */
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- iterate_fix_dominators (CDI_DOMINATORS, doms, false);
--
- unsigned HOST_WIDE_INT bound;
- if (bound_scalar.is_constant (&bound))
- {
- gcc_assert (bound != 0);
-- /* Adjust the upper bound by the extra peeled vector iteration if we
-- are an epilogue of an peeled vect loop and not VLA. For VLA the
-- loop bounds are unknown. */
-- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo)
-- && vf.is_constant ())
-- bound += vf.to_constant ();
- /* -1 to convert loop iterations to latch iterations. */
- record_niter_bound (epilog, bound - 1, false, true);
- scale_loop_profile (epilog, profile_probability::always (),
-@@ -4082,23 +3890,12 @@ vect_loop_versioning (loop_vec_info loop_vinfo,
- If loop versioning wasn't done from loop, but scalar_loop instead,
- merge_bb will have already just a single successor. */
-
-- /* When the loop has multiple exits then we can only version itself.
-- This is denoted by loop_to_version == loop. In this case we can
-- do the versioning by selecting the exit edge the vectorizer is
-- currently using. */
-- edge exit_edge;
-- if (loop_to_version == loop)
-- exit_edge = LOOP_VINFO_IV_EXIT (loop_vinfo);
-- else
-- exit_edge = single_exit (loop_to_version);
--
-- gcc_assert (exit_edge);
-- merge_bb = exit_edge->dest;
-+ merge_bb = single_exit (loop_to_version)->dest;
- if (EDGE_COUNT (merge_bb->preds) >= 2)
- {
- gcc_assert (EDGE_COUNT (merge_bb->preds) >= 2);
-- new_exit_bb = split_edge (exit_edge);
-- new_exit_e = exit_edge;
-+ new_exit_bb = split_edge (single_exit (loop_to_version));
-+ new_exit_e = single_exit (loop_to_version);
- e = EDGE_SUCC (new_exit_bb, 0);
-
- for (gsi = gsi_start_phis (merge_bb); !gsi_end_p (gsi);
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index 2bd96b56006a..5d5f57561741 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -1040,7 +1040,6 @@ _loop_vec_info::_loop_vec_info (class loop *loop_in, vec_info_shared *shared)
- partial_load_store_bias (0),
- peeling_for_gaps (false),
- peeling_for_niter (false),
-- early_breaks (false),
- no_data_dependencies (false),
- has_mask_store (false),
- scalar_loop_scaling (profile_probability::uninitialized ()),
-@@ -1695,12 +1694,12 @@ vect_compute_single_scalar_iteration_cost (loop_vec_info loop_vinfo)
- loop_vinfo->scalar_costs->finish_cost (nullptr);
- }
-
-+
- /* Function vect_analyze_loop_form.
-
- Verify that certain CFG restrictions hold, including:
- - the loop has a pre-header
-- - the loop has a single entry
-- - nested loops can have only a single exit.
-+ - the loop has a single entry and exit
- - the loop exit condition is simple enough
- - the number of iterations can be analyzed, i.e, a countable loop. The
- niter could be analyzed under some assumptions. */
-@@ -1722,17 +1721,6 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
- "using as main loop exit: %d -> %d [AUX: %p]\n",
- exit_e->src->index, exit_e->dest->index, exit_e->aux);
-
-- /* Check if we have any control flow that doesn't leave the loop. */
-- class loop *v_loop = loop->inner ? loop->inner : loop;
-- basic_block *bbs= get_loop_body (v_loop);
-- for (unsigned i = 0; i < v_loop->num_nodes; i++)
-- if (EDGE_COUNT (bbs[i]->succs) != 1
-- && (EDGE_COUNT (bbs[i]->succs) != 2
-- || !loop_exits_from_bb_p (bbs[i]->loop_father, bbs[i])))
-- return opt_result::failure_at (vect_location,
-- "not vectorized:"
-- " unsupported control flow in loop.\n");
--
- /* Different restrictions apply when we are considering an inner-most loop,
- vs. an outer (nested) loop.
- (FORNOW. May want to relax some of these restrictions in the future). */
-@@ -1752,6 +1740,11 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
- |
- (exit-bb) */
-
-+ if (loop->num_nodes != 2)
-+ return opt_result::failure_at (vect_location,
-+ "not vectorized:"
-+ " control flow in loop.\n");
-+
- if (empty_block_p (loop->header))
- return opt_result::failure_at (vect_location,
- "not vectorized: empty loop.\n");
-@@ -1783,6 +1776,11 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
- "not vectorized:"
- " multiple nested loops.\n");
-
-+ if (loop->num_nodes != 5)
-+ return opt_result::failure_at (vect_location,
-+ "not vectorized:"
-+ " control flow in loop.\n");
-+
- entryedge = loop_preheader_edge (innerloop);
- if (entryedge->src != loop->header
- || !single_exit (innerloop)
-@@ -1819,6 +1817,9 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
- info->inner_loop_cond = inner.conds[0];
- }
-
-+ if (!single_exit (loop))
-+ return opt_result::failure_at (vect_location,
-+ "not vectorized: multiple exits.\n");
- if (EDGE_COUNT (loop->header->preds) != 2)
- return opt_result::failure_at (vect_location,
- "not vectorized:"
-@@ -1834,14 +1835,10 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
- "not vectorized: latch block not empty.\n");
-
- /* Make sure the exit is not abnormal. */
-- auto_vec<edge> exits = get_loop_exit_edges (loop);
-- for (edge e : exits)
-- {
-- if (e->flags & EDGE_ABNORMAL)
-- return opt_result::failure_at (vect_location,
-- "not vectorized:"
-- " abnormal loop exit edge.\n");
-- }
-+ if (exit_e->flags & EDGE_ABNORMAL)
-+ return opt_result::failure_at (vect_location,
-+ "not vectorized:"
-+ " abnormal loop exit edge.\n");
-
- info->conds
- = vect_get_loop_niters (loop, exit_e, &info->assumptions,
-@@ -1909,8 +1906,6 @@ vect_create_loop_vinfo (class loop *loop, vec_info_shared *shared,
- {
- stmt_vec_info loop_cond_info = loop_vinfo->lookup_stmt (cond);
- STMT_VINFO_TYPE (loop_cond_info) = loop_exit_ctrl_vec_info_type;
-- /* Mark the statement as a condition. */
-- STMT_VINFO_DEF_TYPE (loop_cond_info) = vect_condition_def;
- }
-
- for (unsigned i = 1; i < info->conds.length (); i ++)
-@@ -1919,10 +1914,6 @@ vect_create_loop_vinfo (class loop *loop, vec_info_shared *shared,
-
- LOOP_VINFO_IV_EXIT (loop_vinfo) = info->loop_exit;
-
-- /* Check to see if we're vectorizing multiple exits. */
-- LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
-- = !LOOP_VINFO_LOOP_CONDS (loop_vinfo).is_empty ();
--
- if (info->inner_loop_cond)
- {
- stmt_vec_info inner_loop_cond_info
-@@ -3176,8 +3167,7 @@ start_over:
-
- /* If an epilogue loop is required make sure we can create one. */
- if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)
-- || LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo)
-- || LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-+ || LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_NOTE, vect_location, "epilog loop required\n");
-@@ -3687,9 +3677,6 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared)
- && loop->inner == NULL
- && param_vect_epilogues_nomask
- && LOOP_VINFO_PEELING_FOR_NITER (first_loop_vinfo)
-- /* No code motion support for multiple epilogues so for now
-- not supported when multiple exits. */
-- && !LOOP_VINFO_EARLY_BREAKS (first_loop_vinfo)
- && !loop->simduid);
- if (!vect_epilogues)
- return first_loop_vinfo;
-@@ -5870,34 +5857,6 @@ vect_create_partial_epilog (tree vec_def, tree vectype, code_helper code,
- return new_temp;
- }
-
--/* Retrieves the definining statement to be used for a reduction.
-- For MAIN_EXIT_P we use the current VEC_STMTs and otherwise we look at
-- the reduction definitions. */
--
--tree
--vect_get_vect_def (stmt_vec_info reduc_info, slp_tree slp_node,
-- slp_instance slp_node_instance, bool main_exit_p, unsigned i,
-- vec <gimple *> &vec_stmts)
--{
-- tree def;
--
-- if (slp_node)
-- {
-- if (!main_exit_p)
-- slp_node = slp_node_instance->reduc_phis;
-- def = vect_get_slp_vect_def (slp_node, i);
-- }
-- else
-- {
-- if (!main_exit_p)
-- reduc_info = STMT_VINFO_REDUC_DEF (vect_orig_stmt (reduc_info));
-- vec_stmts = STMT_VINFO_VEC_STMTS (reduc_info);
-- def = gimple_get_lhs (vec_stmts[0]);
-- }
--
-- return def;
--}
--
- /* Function vect_create_epilog_for_reduction
-
- Create code at the loop-epilog to finalize the result of a reduction
-@@ -5909,8 +5868,6 @@ vect_get_vect_def (stmt_vec_info reduc_info, slp_tree slp_node,
- SLP_NODE_INSTANCE is the SLP node instance containing SLP_NODE
- REDUC_INDEX says which rhs operand of the STMT_INFO is the reduction phi
- (counting from 0)
-- LOOP_EXIT is the edge to update in the merge block. In the case of a single
-- exit this edge is always the main loop exit.
-
- This function:
- 1. Completes the reduction def-use cycles.
-@@ -5951,8 +5908,7 @@ static void
- vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- stmt_vec_info stmt_info,
- slp_tree slp_node,
-- slp_instance slp_node_instance,
-- edge loop_exit)
-+ slp_instance slp_node_instance)
- {
- stmt_vec_info reduc_info = info_for_reduction (loop_vinfo, stmt_info);
- gcc_assert (reduc_info->is_reduc_info);
-@@ -5961,7 +5917,6 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- loop-closed PHI of the inner loop which we remember as
- def for the reduction PHI generation. */
- bool double_reduc = false;
-- bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit;
- stmt_vec_info rdef_info = stmt_info;
- if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
- {
-@@ -6124,7 +6079,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- /* Create an induction variable. */
- gimple_stmt_iterator incr_gsi;
- bool insert_after;
-- vect_iv_increment_position (loop_exit, &incr_gsi, &insert_after);
-+ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
- create_iv (series_vect, PLUS_EXPR, vec_step, NULL_TREE, loop, &incr_gsi,
- insert_after, &indx_before_incr, &indx_after_incr);
-
-@@ -6203,23 +6158,23 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- Store them in NEW_PHIS. */
- if (double_reduc)
- loop = outer_loop;
-- /* We need to reduce values in all exits. */
-- exit_bb = loop_exit->dest;
-+ exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
- exit_gsi = gsi_after_labels (exit_bb);
- reduc_inputs.create (slp_node ? vec_num : ncopies);
-- vec <gimple *> vec_stmts;
- for (unsigned i = 0; i < vec_num; i++)
- {
- gimple_seq stmts = NULL;
-- def = vect_get_vect_def (rdef_info, slp_node, slp_node_instance,
-- main_exit_p, i, vec_stmts);
-+ if (slp_node)
-+ def = vect_get_slp_vect_def (slp_node, i);
-+ else
-+ def = gimple_get_lhs (STMT_VINFO_VEC_STMTS (rdef_info)[0]);
- for (j = 0; j < ncopies; j++)
- {
- tree new_def = copy_ssa_name (def);
- phi = create_phi_node (new_def, exit_bb);
- if (j)
-- def = gimple_get_lhs (vec_stmts[j]);
-- SET_PHI_ARG_DEF (phi, loop_exit->dest_idx, def);
-+ def = gimple_get_lhs (STMT_VINFO_VEC_STMTS (rdef_info)[j]);
-+ SET_PHI_ARG_DEF (phi, LOOP_VINFO_IV_EXIT (loop_vinfo)->dest_idx, def);
- new_def = gimple_convert (&stmts, vectype, new_def);
- reduc_inputs.quick_push (new_def);
- }
-@@ -10569,146 +10524,6 @@ vectorizable_induction (loop_vec_info loop_vinfo,
- return true;
- }
-
--/* Function vectorizable_live_operation_1.
--
-- helper function for vectorizable_live_operation. */
--
--tree
--vectorizable_live_operation_1 (loop_vec_info loop_vinfo,
-- stmt_vec_info stmt_info, basic_block exit_bb,
-- tree vectype, int ncopies, slp_tree slp_node,
-- tree bitsize, tree bitstart, tree vec_lhs,
-- tree lhs_type, bool restart_loop,
-- gimple_stmt_iterator *exit_gsi)
--{
-- gcc_assert (single_pred_p (exit_bb) || LOOP_VINFO_EARLY_BREAKS (loop_vinfo));
--
-- tree vec_lhs_phi = copy_ssa_name (vec_lhs);
-- gimple *phi = create_phi_node (vec_lhs_phi, exit_bb);
-- for (unsigned i = 0; i < gimple_phi_num_args (phi); i++)
-- SET_PHI_ARG_DEF (phi, i, vec_lhs);
--
-- gimple_seq stmts = NULL;
-- tree new_tree;
-- if (LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo))
-- {
-- /* Emit:
--
-- SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>
--
-- where VEC_LHS is the vectorized live-out result and MASK is
-- the loop mask for the final iteration. */
-- gcc_assert (ncopies == 1 && !slp_node);
-- gimple_seq tem = NULL;
-- gimple_stmt_iterator gsi = gsi_last (tem);
-- tree len = vect_get_loop_len (loop_vinfo, &gsi,
-- &LOOP_VINFO_LENS (loop_vinfo),
-- 1, vectype, 0, 0);
--
-- /* BIAS - 1. */
-- signed char biasval = LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo);
-- tree bias_minus_one
-- = int_const_binop (MINUS_EXPR,
-- build_int_cst (TREE_TYPE (len), biasval),
-- build_one_cst (TREE_TYPE (len)));
--
-- /* LAST_INDEX = LEN + (BIAS - 1). */
-- tree last_index = gimple_build (&stmts, PLUS_EXPR, TREE_TYPE (len),
-- len, bias_minus_one);
--
-- /* This needs to implement extraction of the first index, but not sure
-- how the LEN stuff works. At the moment we shouldn't get here since
-- there's no LEN support for early breaks. But guard this so there's
-- no incorrect codegen. */
-- gcc_assert (!LOOP_VINFO_EARLY_BREAKS (loop_vinfo));
--
-- /* SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>. */
-- tree scalar_res
-- = gimple_build (&stmts, CFN_VEC_EXTRACT, TREE_TYPE (vectype),
-- vec_lhs_phi, last_index);
--
-- /* Convert the extracted vector element to the scalar type. */
-- new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
-- }
-- else if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))
-- {
-- /* Emit:
--
-- SCALAR_RES = EXTRACT_LAST <VEC_LHS, MASK>
--
-- where VEC_LHS is the vectorized live-out result and MASK is
-- the loop mask for the final iteration. */
-- gcc_assert (!slp_node);
-- tree scalar_type = TREE_TYPE (STMT_VINFO_VECTYPE (stmt_info));
-- gimple_seq tem = NULL;
-- gimple_stmt_iterator gsi = gsi_last (tem);
-- tree mask = vect_get_loop_mask (loop_vinfo, &gsi,
-- &LOOP_VINFO_MASKS (loop_vinfo),
-- 1, vectype, 0);
-- tree scalar_res;
--
-- /* For an inverted control flow with early breaks we want EXTRACT_FIRST
-- instead of EXTRACT_LAST. Emulate by reversing the vector and mask. */
-- if (restart_loop && LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- {
-- /* First create the permuted mask. */
-- tree perm_mask = perm_mask_for_reverse (TREE_TYPE (mask));
-- tree perm_dest = copy_ssa_name (mask);
-- gimple *perm_stmt
-- = gimple_build_assign (perm_dest, VEC_PERM_EXPR, mask,
-- mask, perm_mask);
-- vect_finish_stmt_generation (loop_vinfo, stmt_info, perm_stmt,
-- &gsi);
-- mask = perm_dest;
--
-- /* Then permute the vector contents. */
-- tree perm_elem = perm_mask_for_reverse (vectype);
-- perm_dest = copy_ssa_name (vec_lhs_phi);
-- perm_stmt
-- = gimple_build_assign (perm_dest, VEC_PERM_EXPR, vec_lhs_phi,
-- vec_lhs_phi, perm_elem);
-- vect_finish_stmt_generation (loop_vinfo, stmt_info, perm_stmt,
-- &gsi);
-- vec_lhs_phi = perm_dest;
-- }
--
-- gimple_seq_add_seq (&stmts, tem);
--
-- scalar_res = gimple_build (&stmts, CFN_EXTRACT_LAST, scalar_type,
-- mask, vec_lhs_phi);
--
-- /* Convert the extracted vector element to the scalar type. */
-- new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
-- }
-- else
-- {
-- tree bftype = TREE_TYPE (vectype);
-- if (VECTOR_BOOLEAN_TYPE_P (vectype))
-- bftype = build_nonstandard_integer_type (tree_to_uhwi (bitsize), 1);
-- new_tree = build3 (BIT_FIELD_REF, bftype, vec_lhs_phi, bitsize, bitstart);
-- new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree),
-- &stmts, true, NULL_TREE);
-- }
--
-- *exit_gsi = gsi_after_labels (exit_bb);
-- if (stmts)
-- gsi_insert_seq_before (exit_gsi, stmts, GSI_SAME_STMT);
--
-- return new_tree;
--}
--
--/* Find the edge that's the final one in the path from SRC to DEST and
-- return it. This edge must exist in at most one forwarder edge between. */
--
--static edge
--find_connected_edge (edge src, basic_block dest)
--{
-- if (src->dest == dest)
-- return src;
--
-- return find_edge (src->dest, dest);
--}
--
- /* Function vectorizable_live_operation.
-
- STMT_INFO computes a value that is used outside the loop. Check if
-@@ -10729,13 +10544,11 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
- int ncopies;
- gimple *use_stmt;
-- use_operand_p use_p;
- auto_vec<tree> vec_oprnds;
- int vec_entry = 0;
- poly_uint64 vec_index = 0;
-
-- gcc_assert (STMT_VINFO_LIVE_P (stmt_info)
-- || LOOP_VINFO_EARLY_BREAKS (loop_vinfo));
-+ gcc_assert (STMT_VINFO_LIVE_P (stmt_info));
-
- /* If a stmt of a reduction is live, vectorize it via
- vect_create_epilog_for_reduction. vectorizable_reduction assessed
-@@ -10760,25 +10573,8 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- if (STMT_VINFO_REDUC_TYPE (reduc_info) == FOLD_LEFT_REDUCTION
- || STMT_VINFO_REDUC_TYPE (reduc_info) == EXTRACT_LAST_REDUCTION)
- return true;
--
- vect_create_epilog_for_reduction (loop_vinfo, stmt_info, slp_node,
-- slp_node_instance,
-- LOOP_VINFO_IV_EXIT (loop_vinfo));
--
-- /* If early break we only have to materialize the reduction on the merge
-- block, but we have to find an alternate exit first. */
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- {
-- for (auto exit : get_loop_exit_edges (LOOP_VINFO_LOOP (loop_vinfo)))
-- if (exit != LOOP_VINFO_IV_EXIT (loop_vinfo))
-- {
-- vect_create_epilog_for_reduction (loop_vinfo, stmt_info,
-- slp_node, slp_node_instance,
-- exit);
-- break;
-- }
-- }
--
-+ slp_node_instance);
- return true;
- }
-
-@@ -10889,8 +10685,8 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- bitsize = vector_element_bits_tree (vectype);
-
- /* Get the vectorized lhs of STMT and the lane to use (counted in bits). */
-- tree vec_lhs, vec_lhs0, bitstart;
-- gimple *vec_stmt, *vec_stmt0;
-+ tree vec_lhs, bitstart;
-+ gimple *vec_stmt;
- if (slp_node)
- {
- gcc_assert (!loop_vinfo
-@@ -10901,10 +10697,6 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- vec_lhs = SLP_TREE_VEC_DEFS (slp_node)[vec_entry];
- vec_stmt = SSA_NAME_DEF_STMT (vec_lhs);
-
-- /* In case we need to early break vectorize also get the first stmt. */
-- vec_lhs0 = SLP_TREE_VEC_DEFS (slp_node)[0];
-- vec_stmt0 = SSA_NAME_DEF_STMT (vec_lhs0);
--
- /* Get entry to use. */
- bitstart = bitsize_int (vec_index);
- bitstart = int_const_binop (MULT_EXPR, bitsize, bitstart);
-@@ -10915,10 +10707,6 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- vec_stmt = STMT_VINFO_VEC_STMTS (stmt_info).last ();
- vec_lhs = gimple_get_lhs (vec_stmt);
-
-- /* In case we need to early break vectorize also get the first stmt. */
-- vec_stmt0 = STMT_VINFO_VEC_STMTS (stmt_info)[0];
-- vec_lhs0 = gimple_get_lhs (vec_stmt0);
--
- /* Get the last lane in the vector. */
- bitstart = int_const_binop (MULT_EXPR, bitsize, bitsize_int (nunits - 1));
- }
-@@ -10938,60 +10726,103 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
- lhs' = new_tree; */
-
- class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
-- /* Check if we have a loop where the chosen exit is not the main exit,
-- in these cases for an early break we restart the iteration the vector code
-- did. For the live values we want the value at the start of the iteration
-- rather than at the end. */
-- edge main_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
-- bool restart_loop = LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
-- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
-- if (!is_gimple_debug (use_stmt)
-- && !flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
-- FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
-- {
-- edge e = gimple_phi_arg_edge (as_a <gphi *> (use_stmt),
-- phi_arg_index_from_use (use_p));
-- bool main_exit_edge = e == main_e
-- || find_connected_edge (main_e, e->src);
--
-- /* Early exits have an merge block, we want the merge block itself
-- so use ->src. For main exit the merge block is the
-- destination. */
-- basic_block dest = main_exit_edge ? main_e->dest : e->src;
-- tree tmp_vec_lhs = vec_lhs;
-- tree tmp_bitstart = bitstart;
--
-- /* For early exit where the exit is not in the BB that leads
-- to the latch then we're restarting the iteration in the
-- scalar loop. So get the first live value. */
-- restart_loop = restart_loop || !main_exit_edge;
-- if (restart_loop
-- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
-- {
-- tmp_vec_lhs = vec_lhs0;
-- tmp_bitstart = build_zero_cst (TREE_TYPE (bitstart));
-- }
-+ basic_block exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
-+ gcc_assert (single_pred_p (exit_bb));
-
-- gimple_stmt_iterator exit_gsi;
-- tree new_tree
-- = vectorizable_live_operation_1 (loop_vinfo, stmt_info,
-- dest, vectype, ncopies,
-- slp_node, bitsize,
-- tmp_bitstart, tmp_vec_lhs,
-- lhs_type, restart_loop,
-- &exit_gsi);
-+ tree vec_lhs_phi = copy_ssa_name (vec_lhs);
-+ gimple *phi = create_phi_node (vec_lhs_phi, exit_bb);
-+ SET_PHI_ARG_DEF (phi, LOOP_VINFO_IV_EXIT (loop_vinfo)->dest_idx, vec_lhs);
-
-- if (gimple_phi_num_args (use_stmt) == 1)
-- {
-- auto gsi = gsi_for_stmt (use_stmt);
-- remove_phi_node (&gsi, false);
-- tree lhs_phi = gimple_phi_result (use_stmt);
-- gimple *copy = gimple_build_assign (lhs_phi, new_tree);
-- gsi_insert_before (&exit_gsi, copy, GSI_SAME_STMT);
-- }
-- else
-- SET_PHI_ARG_DEF (use_stmt, e->dest_idx, new_tree);
-- }
-+ gimple_seq stmts = NULL;
-+ tree new_tree;
-+ if (LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo))
-+ {
-+ /* Emit:
-+
-+ SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>
-+
-+ where VEC_LHS is the vectorized live-out result and MASK is
-+ the loop mask for the final iteration. */
-+ gcc_assert (ncopies == 1 && !slp_node);
-+ gimple_seq tem = NULL;
-+ gimple_stmt_iterator gsi = gsi_last (tem);
-+ tree len
-+ = vect_get_loop_len (loop_vinfo, &gsi,
-+ &LOOP_VINFO_LENS (loop_vinfo),
-+ 1, vectype, 0, 0);
-+
-+ /* BIAS - 1. */
-+ signed char biasval = LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo);
-+ tree bias_minus_one
-+ = int_const_binop (MINUS_EXPR,
-+ build_int_cst (TREE_TYPE (len), biasval),
-+ build_one_cst (TREE_TYPE (len)));
-+
-+ /* LAST_INDEX = LEN + (BIAS - 1). */
-+ tree last_index = gimple_build (&stmts, PLUS_EXPR, TREE_TYPE (len),
-+ len, bias_minus_one);
-+
-+ /* SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>. */
-+ tree scalar_res
-+ = gimple_build (&stmts, CFN_VEC_EXTRACT, TREE_TYPE (vectype),
-+ vec_lhs_phi, last_index);
-+
-+ /* Convert the extracted vector element to the scalar type. */
-+ new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
-+ }
-+ else if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))
-+ {
-+ /* Emit:
-+
-+ SCALAR_RES = EXTRACT_LAST <VEC_LHS, MASK>
-+
-+ where VEC_LHS is the vectorized live-out result and MASK is
-+ the loop mask for the final iteration. */
-+ gcc_assert (ncopies == 1 && !slp_node);
-+ tree scalar_type = TREE_TYPE (STMT_VINFO_VECTYPE (stmt_info));
-+ gimple_seq tem = NULL;
-+ gimple_stmt_iterator gsi = gsi_last (tem);
-+ tree mask = vect_get_loop_mask (loop_vinfo, &gsi,
-+ &LOOP_VINFO_MASKS (loop_vinfo),
-+ 1, vectype, 0);
-+ gimple_seq_add_seq (&stmts, tem);
-+ tree scalar_res = gimple_build (&stmts, CFN_EXTRACT_LAST, scalar_type,
-+ mask, vec_lhs_phi);
-+
-+ /* Convert the extracted vector element to the scalar type. */
-+ new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
-+ }
-+ else
-+ {
-+ tree bftype = TREE_TYPE (vectype);
-+ if (VECTOR_BOOLEAN_TYPE_P (vectype))
-+ bftype = build_nonstandard_integer_type (tree_to_uhwi (bitsize), 1);
-+ new_tree = build3 (BIT_FIELD_REF, bftype,
-+ vec_lhs_phi, bitsize, bitstart);
-+ new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree),
-+ &stmts, true, NULL_TREE);
-+ }
-+
-+ gimple_stmt_iterator exit_gsi = gsi_after_labels (exit_bb);
-+ if (stmts)
-+ gsi_insert_seq_before (&exit_gsi, stmts, GSI_SAME_STMT);
-+
-+ /* Remove existing phis that copy from lhs and create copies
-+ from new_tree. */
-+ gimple_stmt_iterator gsi;
-+ for (gsi = gsi_start_phis (exit_bb); !gsi_end_p (gsi);)
-+ {
-+ gimple *phi = gsi_stmt (gsi);
-+ if ((gimple_phi_arg_def (phi, 0) == lhs))
-+ {
-+ remove_phi_node (&gsi, false);
-+ tree lhs_phi = gimple_phi_result (phi);
-+ gimple *copy = gimple_build_assign (lhs_phi, new_tree);
-+ gsi_insert_before (&exit_gsi, copy, GSI_SAME_STMT);
-+ }
-+ else
-+ gsi_next (&gsi);
-+ }
-
- /* There a no further out-of-loop uses of lhs by LC-SSA construction. */
- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
-@@ -11770,56 +11601,6 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance)
- epilogue_vinfo->shared->save_datarefs ();
- }
-
--/* When vectorizing early break statements instructions that happen before
-- the early break in the current BB need to be moved to after the early
-- break. This function deals with that and assumes that any validity
-- checks has already been performed.
--
-- While moving the instructions if it encounters a VUSE or VDEF it then
-- corrects the VUSES as it moves the statements along. GDEST is the location
-- in which to insert the new statements. */
--
--static void
--move_early_exit_stmts (loop_vec_info loop_vinfo)
--{
-- DUMP_VECT_SCOPE ("move_early_exit_stmts");
--
-- if (LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo).is_empty ())
-- return;
--
-- /* Move all stmts that need moving. */
-- basic_block dest_bb = LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo);
-- gimple_stmt_iterator dest_gsi = gsi_start_bb (dest_bb);
--
-- for (gimple *stmt : LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo))
-- {
-- /* Check to see if statement is still required for vect or has been
-- elided. */
-- auto stmt_info = loop_vinfo->lookup_stmt (stmt);
-- if (!stmt_info)
-- continue;
--
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location, "moving stmt %G", stmt);
--
-- gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
-- gsi_move_before (&stmt_gsi, &dest_gsi);
-- gsi_prev (&dest_gsi);
-- }
--
-- /* Update all the stmts with their new reaching VUSES. */
-- tree vuse
-- = gimple_vuse (LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo).last ());
-- for (auto p : LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo))
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "updating vuse to %T for load %G", vuse, p);
-- gimple_set_vuse (p, vuse);
-- update_stmt (p);
-- }
--}
--
- /* Function vect_transform_loop.
-
- The analysis phase has determined that the loop is vectorizable.
-@@ -11867,7 +11648,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
- /* Make sure there exists a single-predecessor exit bb. Do this before
- versioning. */
- edge e = LOOP_VINFO_IV_EXIT (loop_vinfo);
-- if (! single_pred_p (e->dest) && !LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-+ if (! single_pred_p (e->dest))
- {
- split_loop_exit_edge (e, true);
- if (dump_enabled_p ())
-@@ -11961,11 +11742,6 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
- /* This will deal with any possible peeling. */
- vect_prepare_for_masked_peels (loop_vinfo);
-
-- /* Handle any code motion that we need to for early-break vectorization after
-- we've done peeling but just before we start vectorizing. */
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- move_early_exit_stmts (loop_vinfo);
--
- /* Schedule the SLP instances first, then handle loop vectorization
- below. */
- if (!loop_vinfo->slp_instances.is_empty ())
-diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
-index f1a95ef34b93..b0ceb1007bd4 100644
---- a/gcc/tree-vect-patterns.cc
-+++ b/gcc/tree-vect-patterns.cc
-@@ -132,7 +132,6 @@ vect_init_pattern_stmt (vec_info *vinfo, gimple *pattern_stmt,
- if (!STMT_VINFO_VECTYPE (pattern_stmt_info))
- {
- gcc_assert (!vectype
-- || is_a <gcond *> (pattern_stmt)
- || (VECTOR_BOOLEAN_TYPE_P (vectype)
- == vect_use_mask_type_p (orig_stmt_info)));
- STMT_VINFO_VECTYPE (pattern_stmt_info) = vectype;
-@@ -2787,30 +2786,15 @@ vect_recog_bitfield_ref_pattern (vec_info *vinfo, stmt_vec_info stmt_info,
-
- if (!lhs)
- {
-- if (!vectype)
-- return NULL;
--
- append_pattern_def_seq (vinfo, stmt_info, pattern_stmt, vectype);
-- vectype = truth_type_for (vectype);
--
-- /* FIXME: This part extracts the boolean value out of the bitfield in the
-- same way as vect_recog_gcond_pattern does. However because
-- patterns cannot match the same root twice, when we handle and
-- lower the bitfield in the gcond, vect_recog_gcond_pattern can't
-- apply anymore. We should really fix it so that we don't need to
-- duplicate transformations like these. */
-- tree new_lhs = vect_recog_temp_ssa_var (boolean_type_node, NULL);
- gcond *cond_stmt = dyn_cast <gcond *> (stmt_info->stmt);
- tree cond_cst = gimple_cond_rhs (cond_stmt);
-- gimple *new_stmt
-- = gimple_build_assign (new_lhs, gimple_cond_code (cond_stmt),
-- gimple_get_lhs (pattern_stmt),
-- fold_convert (container_type, cond_cst));
-- append_pattern_def_seq (vinfo, stmt_info, new_stmt, vectype, container_type);
- pattern_stmt
-- = gimple_build_cond (NE_EXPR, new_lhs,
-- build_zero_cst (TREE_TYPE (new_lhs)),
-- NULL_TREE, NULL_TREE);
-+ = gimple_build_cond (gimple_cond_code (cond_stmt),
-+ gimple_get_lhs (pattern_stmt),
-+ fold_convert (ret_type, cond_cst),
-+ gimple_cond_true_label (cond_stmt),
-+ gimple_cond_false_label (cond_stmt));
- }
-
- *type_out = STMT_VINFO_VECTYPE (stmt_info);
-@@ -5569,78 +5553,6 @@ integer_type_for_mask (tree var, vec_info *vinfo)
- return build_nonstandard_integer_type (def_stmt_info->mask_precision, 1);
- }
-
--/* Function vect_recog_gcond_pattern
--
-- Try to find pattern like following:
--
-- if (a op b)
--
-- where operator 'op' is not != and convert it to an adjusted boolean pattern
--
-- mask = a op b
-- if (mask != 0)
--
-- and set the mask type on MASK.
--
-- Input:
--
-- * STMT_VINFO: The stmt at the end from which the pattern
-- search begins, i.e. cast of a bool to
-- an integer type.
--
-- Output:
--
-- * TYPE_OUT: The type of the output of this pattern.
--
-- * Return value: A new stmt that will be used to replace the pattern. */
--
--static gimple *
--vect_recog_gcond_pattern (vec_info *vinfo,
-- stmt_vec_info stmt_vinfo, tree *type_out)
--{
-- /* Currently we only support this for loop vectorization and when multiple
-- exits. */
-- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
-- if (!loop_vinfo || !LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
-- return NULL;
--
-- gimple *last_stmt = STMT_VINFO_STMT (stmt_vinfo);
-- gcond* cond = NULL;
-- if (!(cond = dyn_cast <gcond *> (last_stmt)))
-- return NULL;
--
-- auto lhs = gimple_cond_lhs (cond);
-- auto rhs = gimple_cond_rhs (cond);
-- auto code = gimple_cond_code (cond);
--
-- tree scalar_type = TREE_TYPE (lhs);
-- if (VECTOR_TYPE_P (scalar_type))
-- return NULL;
--
-- if (code == NE_EXPR
-- && zerop (rhs)
-- && VECT_SCALAR_BOOLEAN_TYPE_P (scalar_type))
-- return NULL;
--
-- tree vecitype = get_vectype_for_scalar_type (vinfo, scalar_type);
-- if (vecitype == NULL_TREE)
-- return NULL;
--
-- tree vectype = truth_type_for (vecitype);
--
-- tree new_lhs = vect_recog_temp_ssa_var (boolean_type_node, NULL);
-- gimple *new_stmt = gimple_build_assign (new_lhs, code, lhs, rhs);
-- append_pattern_def_seq (vinfo, stmt_vinfo, new_stmt, vectype, scalar_type);
--
-- gimple *pattern_stmt
-- = gimple_build_cond (NE_EXPR, new_lhs,
-- build_int_cst (TREE_TYPE (new_lhs), 0),
-- NULL_TREE, NULL_TREE);
-- *type_out = vectype;
-- vect_pattern_detected ("vect_recog_gcond_pattern", last_stmt);
-- return pattern_stmt;
--}
--
- /* Function vect_recog_bool_pattern
-
- Try to find pattern like following:
-@@ -6679,26 +6591,15 @@ static bool
- possible_vector_mask_operation_p (stmt_vec_info stmt_info)
- {
- tree lhs = gimple_get_lhs (stmt_info->stmt);
-- tree_code code = ERROR_MARK;
-- gassign *assign = NULL;
-- gcond *cond = NULL;
--
-- if ((assign = dyn_cast <gassign *> (stmt_info->stmt)))
-- code = gimple_assign_rhs_code (assign);
-- else if ((cond = dyn_cast <gcond *> (stmt_info->stmt)))
-- {
-- lhs = gimple_cond_lhs (cond);
-- code = gimple_cond_code (cond);
-- }
--
- if (!lhs
- || TREE_CODE (lhs) != SSA_NAME
- || !VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (lhs)))
- return false;
-
-- if (code != ERROR_MARK)
-+ if (gassign *assign = dyn_cast <gassign *> (stmt_info->stmt))
- {
-- switch (code)
-+ tree_code rhs_code = gimple_assign_rhs_code (assign);
-+ switch (rhs_code)
- {
- CASE_CONVERT:
- case SSA_NAME:
-@@ -6709,7 +6610,7 @@ possible_vector_mask_operation_p (stmt_vec_info stmt_info)
- return true;
-
- default:
-- return TREE_CODE_CLASS (code) == tcc_comparison;
-+ return TREE_CODE_CLASS (rhs_code) == tcc_comparison;
- }
- }
- else if (is_a <gphi *> (stmt_info->stmt))
-@@ -6756,35 +6657,12 @@ vect_determine_mask_precision (vec_info *vinfo, stmt_vec_info stmt_info)
- The number of operations are equal, but M16 would have given
- a shorter dependency chain and allowed more ILP. */
- unsigned int precision = ~0U;
-- gimple *stmt = STMT_VINFO_STMT (stmt_info);
--
-- /* If the statement compares two values that shouldn't use vector masks,
-- try comparing the values as normal scalars instead. */
-- tree_code code = ERROR_MARK;
-- tree op0_type;
-- unsigned int nops = -1;
-- unsigned int ops_start = 0;
--
-- if (gassign *assign = dyn_cast <gassign *> (stmt))
-- {
-- code = gimple_assign_rhs_code (assign);
-- op0_type = TREE_TYPE (gimple_assign_rhs1 (assign));
-- nops = gimple_num_ops (assign);
-- ops_start = 1;
-- }
-- else if (gcond *cond = dyn_cast <gcond *> (stmt))
-+ if (gassign *assign = dyn_cast <gassign *> (stmt_info->stmt))
- {
-- code = gimple_cond_code (cond);
-- op0_type = TREE_TYPE (gimple_cond_lhs (cond));
-- nops = 2;
-- ops_start = 0;
-- }
--
-- if (code != ERROR_MARK)
-- {
-- for (unsigned int i = ops_start; i < nops; ++i)
-+ unsigned int nops = gimple_num_ops (assign);
-+ for (unsigned int i = 1; i < nops; ++i)
- {
-- tree rhs = gimple_op (stmt, i);
-+ tree rhs = gimple_op (assign, i);
- if (!VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (rhs)))
- continue;
-
-@@ -6801,15 +6679,19 @@ vect_determine_mask_precision (vec_info *vinfo, stmt_vec_info stmt_info)
- }
- }
-
-+ /* If the statement compares two values that shouldn't use vector masks,
-+ try comparing the values as normal scalars instead. */
-+ tree_code rhs_code = gimple_assign_rhs_code (assign);
- if (precision == ~0U
-- && TREE_CODE_CLASS (code) == tcc_comparison)
-+ && TREE_CODE_CLASS (rhs_code) == tcc_comparison)
- {
-+ tree rhs1_type = TREE_TYPE (gimple_assign_rhs1 (assign));
- scalar_mode mode;
- tree vectype, mask_type;
-- if (is_a <scalar_mode> (TYPE_MODE (op0_type), &mode)
-- && (vectype = get_vectype_for_scalar_type (vinfo, op0_type))
-- && (mask_type = get_mask_type_for_scalar_type (vinfo, op0_type))
-- && expand_vec_cmp_expr_p (vectype, mask_type, code))
-+ if (is_a <scalar_mode> (TYPE_MODE (rhs1_type), &mode)
-+ && (vectype = get_vectype_for_scalar_type (vinfo, rhs1_type))
-+ && (mask_type = get_mask_type_for_scalar_type (vinfo, rhs1_type))
-+ && expand_vec_cmp_expr_p (vectype, mask_type, rhs_code))
- precision = GET_MODE_BITSIZE (mode);
- }
- }
-@@ -6988,7 +6870,6 @@ static vect_recog_func vect_vect_recog_func_ptrs[] = {
- { vect_recog_divmod_pattern, "divmod" },
- { vect_recog_mult_pattern, "mult" },
- { vect_recog_mixed_size_cond_pattern, "mixed_size_cond" },
-- { vect_recog_gcond_pattern, "gcond" },
- { vect_recog_bool_pattern, "bool" },
- /* This must come before mask conversion, and includes the parts
- of mask conversion that are needed for gather and scatter
-@@ -7076,10 +6957,6 @@ vect_mark_pattern_stmts (vec_info *vinfo,
- vect_set_pattern_stmt (vinfo,
- pattern_stmt, orig_stmt_info, pattern_vectype);
-
-- /* For any conditionals mark them as vect_condition_def. */
-- if (is_a <gcond *> (pattern_stmt))
-- STMT_VINFO_DEF_TYPE (STMT_VINFO_RELATED_STMT (orig_stmt_info)) = vect_condition_def;
--
- /* Transfer reduction path info to the pattern. */
- if (STMT_VINFO_REDUC_IDX (orig_stmt_info_saved) != -1)
- {
-diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
-index bdbf08c9d298..267bb444c284 100644
---- a/gcc/tree-vect-stmts.cc
-+++ b/gcc/tree-vect-stmts.cc
-@@ -342,7 +342,6 @@ is_simple_and_all_uses_invariant (stmt_vec_info stmt_info,
- - it has uses outside the loop.
- - it has vdefs (it alters memory).
- - control stmts in the loop (except for the exit condition).
-- - it is an induction and we have multiple exits.
-
- CHECKME: what other side effects would the vectorizer allow? */
-
-@@ -360,10 +359,8 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo,
- *live_p = false;
-
- /* cond stmt other than loop exit cond. */
-- gimple *stmt = STMT_VINFO_STMT (stmt_info);
-- if (is_ctrl_stmt (stmt)
-- && LOOP_VINFO_LOOP_IV_COND (loop_vinfo) != stmt
-- && (!loop->inner || gimple_bb (stmt)->loop_father == loop))
-+ if (is_ctrl_stmt (stmt_info->stmt)
-+ && STMT_VINFO_TYPE (stmt_info) != loop_exit_ctrl_vec_info_type)
- *relevant = vect_used_in_scope;
-
- /* changing memory. */
-@@ -395,25 +392,13 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo,
- /* We expect all such uses to be in the loop exit phis
- (because of loop closed form) */
- gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
-+ gcc_assert (bb == single_exit (loop)->dest);
-
- *live_p = true;
- }
- }
- }
-
-- /* Check if it's an induction and multiple exits. In this case there will be
-- a usage later on after peeling which is needed for the alternate exit. */
-- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
-- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location,
-- "vec_stmt_relevant_p: induction forced for "
-- "early break.\n");
-- *live_p = true;
--
-- }
--
- if (*live_p && *relevant == vect_unused_in_scope
- && !is_simple_and_all_uses_invariant (stmt_info, loop_vinfo))
- {
-@@ -808,20 +793,6 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal)
- return res;
- }
- }
-- }
-- else if (gcond *cond = dyn_cast <gcond *> (stmt_vinfo->stmt))
-- {
-- tree_code rhs_code = gimple_cond_code (cond);
-- gcc_assert (TREE_CODE_CLASS (rhs_code) == tcc_comparison);
-- opt_result res
-- = process_use (stmt_vinfo, gimple_cond_lhs (cond),
-- loop_vinfo, relevant, &worklist, false);
-- if (!res)
-- return res;
-- res = process_use (stmt_vinfo, gimple_cond_rhs (cond),
-- loop_vinfo, relevant, &worklist, false);
-- if (!res)
-- return res;
- }
- else if (gcall *call = dyn_cast <gcall *> (stmt_vinfo->stmt))
- {
-@@ -835,8 +806,6 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal)
- return res;
- }
- }
-- else
-- gcc_unreachable ();
- }
- else
- FOR_EACH_PHI_OR_STMT_USE (use_p, stmt_vinfo->stmt, iter, SSA_OP_USE)
-@@ -1805,7 +1774,7 @@ compare_step_with_zero (vec_info *vinfo, stmt_vec_info stmt_info)
- /* If the target supports a permute mask that reverses the elements in
- a vector of type VECTYPE, return that mask, otherwise return null. */
-
--tree
-+static tree
- perm_mask_for_reverse (tree vectype)
- {
- poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
-@@ -12573,7 +12542,7 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype,
- vec<tree> vec_oprnds0 = vNULL;
- vec<tree> vec_oprnds1 = vNULL;
- tree mask_type;
-- tree mask = NULL_TREE;
-+ tree mask;
-
- if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
- return false;
-@@ -12713,9 +12682,8 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype,
- /* Transform. */
-
- /* Handle def. */
-- lhs = gimple_get_lhs (STMT_VINFO_STMT (stmt_info));
-- if (lhs)
-- mask = vect_create_destination_var (lhs, mask_type);
-+ lhs = gimple_assign_lhs (STMT_VINFO_STMT (stmt_info));
-+ mask = vect_create_destination_var (lhs, mask_type);
-
- vect_get_vec_defs (vinfo, stmt_info, slp_node, ncopies,
- rhs1, vectype, &vec_oprnds0,
-@@ -12729,10 +12697,7 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype,
- gimple *new_stmt;
- vec_rhs2 = vec_oprnds1[i];
-
-- if (lhs)
-- new_temp = make_ssa_name (mask);
-- else
-- new_temp = make_temp_ssa_name (mask_type, NULL, "cmp");
-+ new_temp = make_ssa_name (mask);
- if (bitop1 == NOP_EXPR)
- {
- new_stmt = gimple_build_assign (new_temp, code,
-@@ -12811,213 +12776,6 @@ vectorizable_comparison (vec_info *vinfo,
- return true;
- }
-
--/* Check to see if the current early break given in STMT_INFO is valid for
-- vectorization. */
--
--static bool
--vectorizable_early_exit (vec_info *vinfo, stmt_vec_info stmt_info,
-- gimple_stmt_iterator *gsi, gimple **vec_stmt,
-- slp_tree slp_node, stmt_vector_for_cost *cost_vec)
--{
-- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
-- if (!loop_vinfo
-- || !is_a <gcond *> (STMT_VINFO_STMT (stmt_info)))
-- return false;
--
-- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_condition_def)
-- return false;
--
-- if (!STMT_VINFO_RELEVANT_P (stmt_info))
-- return false;
--
-- DUMP_VECT_SCOPE ("vectorizable_early_exit");
--
-- auto code = gimple_cond_code (STMT_VINFO_STMT (stmt_info));
--
-- tree vectype = NULL_TREE;
-- slp_tree slp_op0;
-- tree op0;
-- enum vect_def_type dt0;
-- if (!vect_is_simple_use (vinfo, stmt_info, slp_node, 0, &op0, &slp_op0, &dt0,
-- &vectype))
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-- "use not simple.\n");
-- return false;
-- }
--
-- if (!vectype)
-- return false;
--
-- machine_mode mode = TYPE_MODE (vectype);
-- int ncopies;
--
-- if (slp_node)
-- ncopies = 1;
-- else
-- ncopies = vect_get_num_copies (loop_vinfo, vectype);
--
-- vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo);
-- bool masked_loop_p = LOOP_VINFO_FULLY_MASKED_P (loop_vinfo);
--
-- /* Now build the new conditional. Pattern gimple_conds get dropped during
-- codegen so we must replace the original insn. */
-- gimple *orig_stmt = STMT_VINFO_STMT (vect_orig_stmt (stmt_info));
-- gcond *cond_stmt = as_a <gcond *>(orig_stmt);
-- /* When vectorizing we assume that if the branch edge is taken that we're
-- exiting the loop. This is not however always the case as the compiler will
-- rewrite conditions to always be a comparison against 0. To do this it
-- sometimes flips the edges. This is fine for scalar, but for vector we
-- then have to flip the test, as we're still assuming that if you take the
-- branch edge that we found the exit condition. */
-- auto new_code = NE_EXPR;
-- auto reduc_optab = ior_optab;
-- auto reduc_op = BIT_IOR_EXPR;
-- tree cst = build_zero_cst (vectype);
-- if (flow_bb_inside_loop_p (LOOP_VINFO_LOOP (loop_vinfo),
-- BRANCH_EDGE (gimple_bb (cond_stmt))->dest))
-- {
-- new_code = EQ_EXPR;
-- reduc_optab = and_optab;
-- reduc_op = BIT_AND_EXPR;
-- cst = build_minus_one_cst (vectype);
-- }
--
-- /* Analyze only. */
-- if (!vec_stmt)
-- {
-- if (direct_optab_handler (cbranch_optab, mode) == CODE_FOR_nothing)
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-- "can't vectorize early exit because the "
-- "target doesn't support flag setting vector "
-- "comparisons.\n");
-- return false;
-- }
--
-- if (ncopies > 1
-- && direct_optab_handler (reduc_optab, mode) == CODE_FOR_nothing)
-- {
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
-- "can't vectorize early exit because the "
-- "target does not support boolean vector %s "
-- "for type %T.\n",
-- reduc_optab == ior_optab ? "OR" : "AND",
-- vectype);
-- return false;
-- }
--
-- if (!vectorizable_comparison_1 (vinfo, vectype, stmt_info, code, gsi,
-- vec_stmt, slp_node, cost_vec))
-- return false;
--
-- if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
-- {
-- if (direct_internal_fn_supported_p (IFN_VCOND_MASK_LEN, vectype,
-- OPTIMIZE_FOR_SPEED))
-- return false;
-- else
-- vect_record_loop_mask (loop_vinfo, masks, ncopies, vectype, NULL);
-- }
--
--
-- return true;
-- }
--
-- /* Tranform. */
--
-- tree new_temp = NULL_TREE;
-- gimple *new_stmt = NULL;
--
-- if (dump_enabled_p ())
-- dump_printf_loc (MSG_NOTE, vect_location, "transform early-exit.\n");
--
-- if (!vectorizable_comparison_1 (vinfo, vectype, stmt_info, code, gsi,
-- vec_stmt, slp_node, cost_vec))
-- gcc_unreachable ();
--
-- gimple *stmt = STMT_VINFO_STMT (stmt_info);
-- basic_block cond_bb = gimple_bb (stmt);
-- gimple_stmt_iterator cond_gsi = gsi_last_bb (cond_bb);
--
-- auto_vec<tree> stmts;
--
-- if (slp_node)
-- stmts.safe_splice (SLP_TREE_VEC_DEFS (slp_node));
-- else
-- {
-- auto vec_stmts = STMT_VINFO_VEC_STMTS (stmt_info);
-- stmts.reserve_exact (vec_stmts.length ());
-- for (auto stmt : vec_stmts)
-- stmts.quick_push (gimple_assign_lhs (stmt));
-- }
--
-- /* Determine if we need to reduce the final value. */
-- if (stmts.length () > 1)
-- {
-- /* We build the reductions in a way to maintain as much parallelism as
-- possible. */
-- auto_vec<tree> workset (stmts.length ());
--
-- /* Mask the statements as we queue them up. Normally we loop over
-- vec_num, but since we inspect the exact results of vectorization
-- we don't need to and instead can just use the stmts themselves. */
-- if (masked_loop_p)
-- for (unsigned i = 0; i < stmts.length (); i++)
-- {
-- tree stmt_mask
-- = vect_get_loop_mask (loop_vinfo, gsi, masks, ncopies, vectype,
-- i);
-- stmt_mask
-- = prepare_vec_mask (loop_vinfo, TREE_TYPE (stmt_mask), stmt_mask,
-- stmts[i], &cond_gsi);
-- workset.quick_push (stmt_mask);
-- }
-- else
-- workset.splice (stmts);
--
-- while (workset.length () > 1)
-- {
-- new_temp = make_temp_ssa_name (vectype, NULL, "vexit_reduc");
-- tree arg0 = workset.pop ();
-- tree arg1 = workset.pop ();
-- new_stmt = gimple_build_assign (new_temp, reduc_op, arg0, arg1);
-- vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt,
-- &cond_gsi);
-- workset.quick_insert (0, new_temp);
-- }
-- }
-- else
-- {
-- new_temp = stmts[0];
-- if (masked_loop_p)
-- {
-- tree mask
-- = vect_get_loop_mask (loop_vinfo, gsi, masks, ncopies, vectype, 0);
-- new_temp = prepare_vec_mask (loop_vinfo, TREE_TYPE (mask), mask,
-- new_temp, &cond_gsi);
-- }
-- }
--
-- gcc_assert (new_temp);
--
-- gimple_cond_set_condition (cond_stmt, new_code, new_temp, cst);
-- update_stmt (orig_stmt);
--
-- if (slp_node)
-- SLP_TREE_VEC_DEFS (slp_node).truncate (0);
-- else
-- STMT_VINFO_VEC_STMTS (stmt_info).truncate (0);
--
-- if (!slp_node)
-- *vec_stmt = orig_stmt;
--
-- return true;
--}
--
- /* If SLP_NODE is nonnull, return true if vectorizable_live_operation
- can handle all live statements in the node. Otherwise return true
- if STMT_INFO is not live or if vectorizable_live_operation can handle it.
-@@ -13029,27 +12787,20 @@ can_vectorize_live_stmts (vec_info *vinfo, stmt_vec_info stmt_info,
- bool vec_stmt_p,
- stmt_vector_for_cost *cost_vec)
- {
-- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
- if (slp_node)
- {
- stmt_vec_info slp_stmt_info;
- unsigned int i;
- FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (slp_node), i, slp_stmt_info)
- {
-- if ((STMT_VINFO_LIVE_P (slp_stmt_info)
-- || (loop_vinfo
-- && LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
-- && STMT_VINFO_DEF_TYPE (slp_stmt_info)
-- == vect_induction_def))
-+ if (STMT_VINFO_LIVE_P (slp_stmt_info)
- && !vectorizable_live_operation (vinfo, slp_stmt_info, slp_node,
- slp_node_instance, i,
- vec_stmt_p, cost_vec))
- return false;
- }
- }
-- else if ((STMT_VINFO_LIVE_P (stmt_info)
-- || (LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
-- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def))
-+ else if (STMT_VINFO_LIVE_P (stmt_info)
- && !vectorizable_live_operation (vinfo, stmt_info,
- slp_node, slp_node_instance, -1,
- vec_stmt_p, cost_vec))
-@@ -13165,12 +12916,11 @@ vect_analyze_stmt (vec_info *vinfo,
- node_instance, cost_vec);
- if (!res)
- return res;
-- }
-+ }
-
- switch (STMT_VINFO_DEF_TYPE (stmt_info))
- {
- case vect_internal_def:
-- case vect_condition_def:
- break;
-
- case vect_reduction_def:
-@@ -13203,7 +12953,6 @@ vect_analyze_stmt (vec_info *vinfo,
- {
- gcall *call = dyn_cast <gcall *> (stmt_info->stmt);
- gcc_assert (STMT_VINFO_VECTYPE (stmt_info)
-- || gimple_code (stmt_info->stmt) == GIMPLE_COND
- || (call && gimple_call_lhs (call) == NULL_TREE));
- *need_to_vectorize = true;
- }
-@@ -13246,9 +12995,7 @@ vect_analyze_stmt (vec_info *vinfo,
- || vectorizable_lc_phi (as_a <loop_vec_info> (vinfo),
- stmt_info, NULL, node)
- || vectorizable_recurr (as_a <loop_vec_info> (vinfo),
-- stmt_info, NULL, node, cost_vec)
-- || vectorizable_early_exit (vinfo, stmt_info, NULL, NULL, node,
-- cost_vec));
-+ stmt_info, NULL, node, cost_vec));
- else
- {
- if (bb_vinfo)
-@@ -13271,10 +13018,7 @@ vect_analyze_stmt (vec_info *vinfo,
- NULL, NULL, node, cost_vec)
- || vectorizable_comparison (vinfo, stmt_info, NULL, NULL, node,
- cost_vec)
-- || vectorizable_phi (vinfo, stmt_info, NULL, node, cost_vec)
-- || vectorizable_early_exit (vinfo, stmt_info, NULL, NULL, node,
-- cost_vec));
--
-+ || vectorizable_phi (vinfo, stmt_info, NULL, node, cost_vec));
- }
-
- if (node)
-@@ -13433,12 +13177,6 @@ vect_transform_stmt (vec_info *vinfo,
- gcc_assert (done);
- break;
-
-- case loop_exit_ctrl_vec_info_type:
-- done = vectorizable_early_exit (vinfo, stmt_info, gsi, &vec_stmt,
-- slp_node, NULL);
-- gcc_assert (done);
-- break;
--
- default:
- if (!STMT_VINFO_LIVE_P (stmt_info))
- {
-@@ -13859,9 +13597,6 @@ vect_is_simple_use (tree operand, vec_info *vinfo, enum vect_def_type *dt,
- case vect_first_order_recurrence:
- dump_printf (MSG_NOTE, "first order recurrence\n");
- break;
-- case vect_condition_def:
-- dump_printf (MSG_NOTE, "control flow\n");
-- break;
- case vect_unknown_def_type:
- dump_printf (MSG_NOTE, "unknown\n");
- break;
-@@ -13978,8 +13713,6 @@ vect_is_simple_use (vec_info *vinfo, stmt_vec_info stmt, slp_tree slp_node,
- else
- *op = gimple_op (ass, operand + 1);
- }
-- else if (gcond *cond = dyn_cast <gcond *> (stmt->stmt))
-- *op = gimple_op (cond, operand);
- else if (gcall *call = dyn_cast <gcall *> (stmt->stmt))
- *op = gimple_call_arg (call, operand);
- else
-@@ -14590,8 +14323,6 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
- *nunits_vectype_out = NULL_TREE;
-
- if (gimple_get_lhs (stmt) == NULL_TREE
-- /* Allow vector conditionals through here. */
-- && !is_a <gcond *> (stmt)
- /* MASK_STORE has no lhs, but is ok. */
- && !gimple_call_internal_p (stmt, IFN_MASK_STORE))
- {
-@@ -14608,7 +14339,7 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
- }
-
- return opt_result::failure_at (stmt,
-- "not vectorized: irregular stmt: %G", stmt);
-+ "not vectorized: irregular stmt.%G", stmt);
- }
-
- tree vectype;
-@@ -14633,14 +14364,6 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
- }
- else
- {
-- /* If we got here with a gcond it means that the target had no available vector
-- mode for the scalar type. We can't vectorize so abort. */
-- if (is_a <gcond *> (stmt))
-- return opt_result::failure_at (stmt,
-- "not vectorized:"
-- " unsupported data-type for gcond %T\n",
-- scalar_type);
--
- if (data_reference *dr = STMT_VINFO_DATA_REF (stmt_info))
- scalar_type = TREE_TYPE (DR_REF (dr));
- else if (gimple_call_internal_p (stmt, IFN_MASK_STORE))
-diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
-index 9001b738bf31..8e34549b1775 100644
---- a/gcc/tree-vectorizer.cc
-+++ b/gcc/tree-vectorizer.cc
-@@ -1381,9 +1381,7 @@ pass_vectorize::execute (function *fun)
- predicates that need to be shared for optimal predicate usage.
- However reassoc will re-order them and prevent CSE from working
- as it should. CSE only the loop body, not the entry. */
-- auto_vec<edge> exits = get_loop_exit_edges (loop);
-- for (edge exit : exits)
-- bitmap_set_bit (exit_bbs, exit->dest->index);
-+ bitmap_set_bit (exit_bbs, single_exit (loop)->dest->index);
-
- edge entry = EDGE_PRED (loop_preheader_edge (loop)->src, 0);
- do_rpo_vn (fun, entry, exit_bbs);
-diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
-index db44d730b702..62c9818ee0dd 100644
---- a/gcc/tree-vectorizer.h
-+++ b/gcc/tree-vectorizer.h
-@@ -66,7 +66,6 @@ enum vect_def_type {
- vect_double_reduction_def,
- vect_nested_cycle,
- vect_first_order_recurrence,
-- vect_condition_def,
- vect_unknown_def_type
- };
-
-@@ -889,10 +888,6 @@ public:
- we need to peel off iterations at the end to form an epilogue loop. */
- bool peeling_for_niter;
-
-- /* When the loop has early breaks that we can vectorize we need to peel
-- the loop for the break finding loop. */
-- bool early_breaks;
--
- /* List of loop additional IV conditionals found in the loop. */
- auto_vec<gcond *> conds;
-
-@@ -947,20 +942,6 @@ public:
- /* The controlling loop IV for the scalar loop being vectorized. This IV
- controls the natural exits of the loop. */
- edge scalar_loop_iv_exit;
--
-- /* Used to store the list of stores needing to be moved if doing early
-- break vectorization as they would violate the scalar loop semantics if
-- vectorized in their current location. These are stored in order that they
-- need to be moved. */
-- auto_vec<gimple *> early_break_stores;
--
-- /* The final basic block where to move statements to. In the case of
-- multiple exits this could be pretty far away. */
-- basic_block early_break_dest_bb;
--
-- /* Statements whose VUSES need updating if early break vectorization is to
-- happen. */
-- auto_vec<gimple*> early_break_vuses;
- } *loop_vec_info;
-
- /* Access Functions. */
-@@ -1015,12 +996,6 @@ public:
- #define LOOP_VINFO_REDUCTION_CHAINS(L) (L)->reduction_chains
- #define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps
- #define LOOP_VINFO_PEELING_FOR_NITER(L) (L)->peeling_for_niter
--#define LOOP_VINFO_EARLY_BREAKS(L) (L)->early_breaks
--#define LOOP_VINFO_EARLY_BRK_STORES(L) (L)->early_break_stores
--#define LOOP_VINFO_EARLY_BREAKS_VECT_PEELED(L) \
-- (single_pred ((L)->loop->latch) != (L)->vec_loop_iv_exit->src)
--#define LOOP_VINFO_EARLY_BRK_DEST_BB(L) (L)->early_break_dest_bb
--#define LOOP_VINFO_EARLY_BRK_VUSES(L) (L)->early_break_vuses
- #define LOOP_VINFO_LOOP_CONDS(L) (L)->conds
- #define LOOP_VINFO_LOOP_IV_COND(L) (L)->loop_iv_cond
- #define LOOP_VINFO_NO_DATA_DEPENDENCIES(L) (L)->no_data_dependencies
-@@ -1823,7 +1798,7 @@ is_loop_header_bb_p (basic_block bb)
- {
- if (bb == (bb->loop_father)->header)
- return true;
--
-+ gcc_checking_assert (EDGE_COUNT (bb->preds) == 1);
- return false;
- }
-
-@@ -2214,8 +2189,7 @@ extern bool slpeel_can_duplicate_loop_p (const class loop *, const_edge,
- const_edge);
- class loop *slpeel_tree_duplicate_loop_to_edge_cfg (class loop *, edge,
- class loop *, edge,
-- edge, edge *, bool = true,
-- vec<basic_block> * = NULL);
-+ edge, edge *, bool = true);
- class loop *vect_loop_versioning (loop_vec_info, gimple *);
- extern class loop *vect_do_peeling (loop_vec_info, tree, tree,
- tree *, tree *, tree *, int, bool, bool,
-@@ -2226,7 +2200,6 @@ extern dump_user_location_t find_loop_location (class loop *);
- extern bool vect_can_advance_ivs_p (loop_vec_info);
- extern void vect_update_inits_of_drs (loop_vec_info, tree, tree_code);
- extern edge vec_init_loop_exit_info (class loop *);
--extern void vect_iv_increment_position (edge, gimple_stmt_iterator *, bool *);
-
- /* In tree-vect-stmts.cc. */
- extern tree get_related_vectype_for_scalar_type (machine_mode, tree,
-@@ -2248,7 +2221,6 @@ extern bool vect_is_simple_use (vec_info *, stmt_vec_info, slp_tree,
- enum vect_def_type *,
- tree *, stmt_vec_info * = NULL);
- extern bool vect_maybe_update_slp_op_vectype (slp_tree, tree);
--extern tree perm_mask_for_reverse (tree);
- extern bool supportable_widening_operation (vec_info*, code_helper,
- stmt_vec_info, tree, tree,
- code_helper*, code_helper*,
-@@ -2326,9 +2298,6 @@ extern opt_result vect_get_vector_types_for_stmt (vec_info *,
- tree *, unsigned int = 0);
- extern opt_tree vect_get_mask_type_for_stmt (stmt_vec_info, unsigned int = 0);
-
--/* In tree-if-conv.cc. */
--extern bool ref_within_array_bound (gimple *, tree);
--
- /* In tree-vect-data-refs.cc. */
- extern bool vect_can_force_dr_alignment_p (const_tree, poly_uint64);
- extern enum dr_alignment_support vect_supportable_dr_alignment
---
-2.43.0
-
diff --git a/14.0.0/gentoo/81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch b/14.0.0/gentoo/81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
deleted file mode 100644
index 42c1f15..0000000
--- a/14.0.0/gentoo/81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 596b268da13ffc54200075212eadba01ac73a847 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:15 +0000
-Subject: [PATCH 7/8] Revert "middle-end: prevent LIM from hoising vector
- compares from gconds if target does not support it."
-
-This reverts commit f1dcc0fe371e3cb10d2cbe3f6c88db6f72edddda.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/tree-ssa-loop-im.cc | 13 -------------
- 1 file changed, 13 deletions(-)
-
-diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc
-index f3fda2bd7ce1..dd2aacaeee43 100644
---- a/gcc/tree-ssa-loop-im.cc
-+++ b/gcc/tree-ssa-loop-im.cc
-@@ -48,8 +48,6 @@ along with GCC; see the file COPYING3. If not see
- #include "tree-dfa.h"
- #include "tree-ssa.h"
- #include "dbgcnt.h"
--#include "insn-codes.h"
--#include "optabs-tree.h"
-
- /* TODO: Support for predicated code motion. I.e.
-
-@@ -854,17 +852,6 @@ determine_max_movement (gimple *stmt, bool must_preserve_exec)
- if (!extract_true_false_args_from_phi (dom, phi, NULL, NULL))
- return false;
-
-- /* Check if one of the depedent statement is a vector compare whether
-- the target supports it, otherwise it's invalid to hoist it out of
-- the gcond it belonged to. */
-- if (VECTOR_TYPE_P (TREE_TYPE (gimple_cond_lhs (cond))))
-- {
-- tree type = TREE_TYPE (gimple_cond_lhs (cond));
-- auto code = gimple_cond_code (cond);
-- if (!target_supports_op_p (type, code, optab_vector))
-- return false;
-- }
--
- /* Fold in dependencies and cost of the condition. */
- FOR_EACH_SSA_TREE_OPERAND (val, cond, iter, SSA_OP_USE)
- {
---
-2.43.0
-
diff --git a/14.0.0/gentoo/82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch b/14.0.0/gentoo/82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
deleted file mode 100644
index 0586a1c..0000000
--- a/14.0.0/gentoo/82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
+++ /dev/null
@@ -1,457 +0,0 @@
-From f4636b37ea9c34b2f3fc7efa04fd34fa4b8b2542 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:15 +0000
-Subject: [PATCH 8/8] Revert "testsuite: Add more pragma novector to new tests"
-
-This reverts commit 0994ddd86f9c3d829b06009d9e706ff72b07001a.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c | 2 +-
- gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c | 1 -
- gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c | 4 ++--
- gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c | 2 --
- gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c | 1 -
- gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c | 5 -----
- gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c | 5 -----
- gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c | 1 -
- gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c | 1 -
- gcc/testsuite/gcc.target/i386/vect-perm-even-1.c | 1 -
- gcc/testsuite/gcc.target/i386/vect-unpack-1.c | 1 -
- 27 files changed, 3 insertions(+), 37 deletions(-)
-
-diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c
-index 534bee4a1669..00d0eca56eec 100644
---- a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c
-+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c
-@@ -24,9 +24,9 @@ main1 ()
- }
-
- /* check results: */
-+#pragma GCC novector
- for (j = 0; j < N; j++)
- {
--#pragma GCC novector
- for (i = 0; i < N; i++)
- {
- if (out[i*4] != 8
-diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c
-index 22817a57ef81..48b6a9b0681c 100644
---- a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c
-+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c
-@@ -27,7 +27,6 @@ main1 ()
- #pragma GCC novector
- for (i = 0; i < N; i++)
- {
--#pragma GCC novector
- for (j = 0; j < N; j++)
- {
- if (a[i][j] != 8)
-diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
-index 0861d488e134..a0e53d5fef91 100644
---- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
-+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
-@@ -83,9 +83,9 @@ int main1 ()
- }
-
- /* check results: */
-+#pragma GCC novector
- for (i = 0; i < N; i++)
- {
--#pragma GCC novector
- for (j = 0; j < N; j++)
- {
- if (tmp1[2].e.n[1][i][j] != 8)
-@@ -103,9 +103,9 @@ int main1 ()
- }
-
- /* check results: */
-+#pragma GCC novector
- for (i = 0; i < N - NINTS; i++)
- {
--#pragma GCC novector
- for (j = 0; j < N - NINTS; j++)
- {
- if (tmp2[2].e.n[1][i][j] != 8)
-diff --git a/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c b/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
-index 84f33d3f6cce..cfa221158312 100644
---- a/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
-+++ b/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
-@@ -33,7 +33,6 @@ main (void)
- r[i] = a[i] * __builtin_copysignf (1.0f, b[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < N; i++)
- if (r[i] != a[i] * __builtin_copysignf (1.0f, b[i]))
- abort ();
-@@ -42,7 +41,6 @@ main (void)
- rd[i] = ad[i] * __builtin_copysign (1.0d, bd[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < N; i++)
- if (rd[i] != ad[i] * __builtin_copysign (1.0d, bd[i]))
- abort ();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c
-index 1e68926a3180..c0b1f7b31027 100644
---- a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c
-@@ -41,7 +41,6 @@ avx512er_test (void)
- compute_rcp_ref (a, b, ref);
- compute_rcp_exp (a, b, exp);
-
--#pragma GCC novector
- for (int i = 0; i < MAX; i++)
- {
- float rel_err = (ref[i] - exp[i]) / ref[i];
-diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c
-index b922fa285b5f..a8ab49ed6c38 100644
---- a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c
-@@ -38,7 +38,6 @@ avx512er_test (void)
- compute_rsqrt_ref (in, ref);
- compute_rsqrt_exp (in, exp);
-
--#pragma GCC novector
- for (int i = 0; i < MAX; i++)
- {
- float rel_err = (ref[i] - exp[i]) / ref[i];
-diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c
-index 3c0066f7ea44..9a8a88ae2b57 100644
---- a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c
-@@ -38,7 +38,6 @@ avx512er_test (void)
- compute_sqrt_ref (in, ref);
- compute_sqrt_exp (in, exp);
-
--#pragma GCC novector
- for (int i = 0; i < MAX; i++)
- {
- float rel_err = (ref[i] - exp[i]) / ref[i];
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
-index 291907c8f9d0..ab058334a8c9 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
-@@ -47,7 +47,6 @@ avx512f_test (void)
- r[i] = (int) ceil (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) ceil (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
-index c372631a211f..3ab64559cd28 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = ceil (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != ceil (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
-index be19e753026e..27a4bb95342c 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = (int) ceilf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) ceilf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
-index ad1e8e12d5c7..54222da76f42 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = ceilf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != ceilf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
-index 1c8a107d15ae..9eff15f5006c 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
-@@ -47,7 +47,6 @@ avx512f_test (void)
- r[i] = (int) floor (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) floor (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
-index b8bcb79a7a53..be9709951f7a 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = floor (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != floor (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
-index 4ae6e36acef5..7a84fcbc7314 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = (int) floorf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) floorf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
-index 7c43f414763c..fcc0b275860f 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = floorf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != floorf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
-index b7e6759cb8e8..d22385c95e52 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = (int) rint (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) rint (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
-index e36c9a5d4f9f..6a627ab4ac82 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = (int) rintf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) rintf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
-index 0a6f9b2d235a..4c83e7b05126 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = (int) round (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) round (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
-index d40f7d9f7bdd..1341a5bbe537 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = (int) roundf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != (int) roundf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
-index 3802078d2cda..b8b5d0730a8c 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = trunc (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != trunc (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
-index d9b6a4d0fdd2..7dfd575f019c 100644
---- a/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
-+++ b/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
-@@ -45,7 +45,6 @@ avx512f_test (void)
- r[i] = truncf (a[i]);
-
- /* check results: */
--#pragma GCC novector
- for (i = 0; i < NUM; i++)
- if (r[i] != truncf (a[i]))
- abort();
-diff --git a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c
-index cec959f3e078..4aa536ba86c9 100644
---- a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c
-+++ b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c
-@@ -40,7 +40,6 @@ int main()
- b[i] = i;
- }
- foo1 ();
--#pragma GCC novector
- for (int i = 2; i < 508; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -51,7 +50,6 @@ int main()
- b[i] = i;
- }
- foo2 ();
--#pragma GCC novector
- for (int i = 2; i < 507; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -62,7 +60,6 @@ int main()
- b[i] = i;
- }
- foo3 ();
--#pragma GCC novector
- for (int i = 2; i < 506; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -73,7 +70,6 @@ int main()
- b[i] = i;
- }
- foo4 ();
--#pragma GCC novector
- for (int i = 2; i < 505; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -84,7 +80,6 @@ int main()
- b[i] = i;
- }
- foo5 (505);
--#pragma GCC novector
- for (int i = 2; i < 506; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-diff --git a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c
-index 0317c77a3890..834bf0f770d6 100644
---- a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c
-+++ b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c
-@@ -40,7 +40,6 @@ int main()
- b[i] = i;
- }
- foo1 ();
--#pragma GCC novector
- for (int i = 2; i < 508; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -51,7 +50,6 @@ int main()
- b[i] = i;
- }
- foo2 ();
--#pragma GCC novector
- for (int i = 3; i < 508; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -62,7 +60,6 @@ int main()
- b[i] = i;
- }
- foo3 ();
--#pragma GCC novector
- for (int i = 4; i < 508; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -73,7 +70,6 @@ int main()
- b[i] = i;
- }
- foo4 ();
--#pragma GCC novector
- for (int i = 5; i < 508; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-@@ -84,7 +80,6 @@ int main()
- b[i] = i;
- }
- foo5 (3);
--#pragma GCC novector
- for (int i = 3; i < 508; ++i)
- if (a[i] != 2*i)
- __builtin_abort ();
-diff --git a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c
-index 915b604ebff9..1b468e47754c 100644
---- a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c
-+++ b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c
-@@ -21,7 +21,6 @@ avx512bw_test ()
- unsigned short i;
- foo (N);
-
--#pragma GCC novector
- for (i = 0; i < N; i++)
- if ( (unsigned char)i != yy [i] )
- abort ();
-diff --git a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c
-index c42f317ddf4f..3503deaa9d9b 100644
---- a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c
-+++ b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c
-@@ -20,7 +20,6 @@ avx512bw_test ()
- {
- unsigned int i;
- foo (N);
--#pragma GCC novector
- for (i = 0; i < N; i++)
- if ( (unsigned short)i != yy [i] )
- abort ();
-diff --git a/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c b/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
-index bed8621e5d49..3de4dfabeea0 100644
---- a/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
-+++ b/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
-@@ -26,7 +26,6 @@ avx512bw_test ()
-
- foo (N);
-
--#pragma GCC novector
- for (i = 0; i < N; i++)
- if ( (unsigned char)(2*i+1) != yy [i] )
- abort ();
-diff --git a/gcc/testsuite/gcc.target/i386/vect-unpack-1.c b/gcc/testsuite/gcc.target/i386/vect-unpack-1.c
-index fd85650bf8c6..84521e313e52 100644
---- a/gcc/testsuite/gcc.target/i386/vect-unpack-1.c
-+++ b/gcc/testsuite/gcc.target/i386/vect-unpack-1.c
-@@ -20,7 +20,6 @@ avx512bw_test ()
- {
- unsigned char i;
- foo (N);
--#pragma GCC novector
- for (i = 0; i < N; i++)
- if ( (unsigned int)i != yy [i] )
- abort ();
---
-2.43.0
-
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 24aaad3..8e1b87e 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,14 @@
+?? ?? ??? ????
+
+ - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+ - 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
+ - 77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch
+ - 78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
+ - 79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
+ - 80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
+ - 81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
+ - 82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
+
15 8 Jan 2024
U 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2024-01-08 8:10 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2024-01-08 8:10 UTC (permalink / raw
To: gentoo-commits
commit: 31de670a01566db841c795577bbdc3f2a5d35f21
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 8 08:10:06 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 8 08:10:06 2024 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=31de670a
14.0.0: cut patchset 15
richi is back this week so this should be the last time we need to keep
reverting these as the fixes are pending his review.
Signed-off-by: Sam James <sam <AT> gentoo.org>
...le-end-explicitly-initialize-vec_stmts-PR.patch | 6 +-
...suite-un-xfail-TSVC-loops-that-check-for-.patch | 4 +-
..._Add_Advanced_SIMD_cbranch_implementation.patch | 341 +++++++++++++++++++++
..._add_tests_for_early_break_vectorization.patch} | 14 +-
...64_add_implementation_for_vector_cbranch.patch} | 6 +-
...support_vectorization_of_loops_with_mult.patch} | 20 +-
...e-end-prevent-LIM-from-hoising-vector-co.patch} | 6 +-
...te_Add_more_pragma_novector_to_new_tests.patch} | 4 +-
14.0.0/gentoo/README.history | 11 +
9 files changed, 382 insertions(+), 30 deletions(-)
diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
index b113f1e..93bf96b 100644
--- a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+++ b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
@@ -1,7 +1,7 @@
-From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001
+From 0d9351ff8ab23e79edc7a468a255a7c009695f21 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:10 +0000
-Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts
+Subject: [PATCH 1/8] Revert "middle-end: explicitly initialize vec_stmts
[PR113132]"
This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a.
@@ -15,7 +15,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index f51ae3e719e7..88261a3a4f57 100644
+index a06771611ac8..2bd96b56006a 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
diff --git a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
index 1e4b825..d22a7ae 100644
--- a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
+++ b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
@@ -1,7 +1,7 @@
-From 846bfbdd30d437e40e10ce8bcd896f263436dfc1 Mon Sep 17 00:00:00 2001
+From 21f952dd33ae6037ff1a18cfe1c52dcc9becce19 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:12 +0000
-Subject: [PATCH 2/7] Revert "testsuite: un-xfail TSVC loops that check for
+Subject: [PATCH 2/8] Revert "testsuite: un-xfail TSVC loops that check for
exit control flow vectorization"
This reverts commit a657c7e3518fcfc796f223d47385cad5e97dc9a5.
diff --git a/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch b/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch
new file mode 100644
index 0000000..e284b9d
--- /dev/null
+++ b/14.0.0/gentoo/77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch
@@ -0,0 +1,341 @@
+From f7dfd5052edeaa7f433bc296fd3c8b9c5239edb3 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 8 Jan 2024 07:09:10 +0000
+Subject: [PATCH 3/8] Revert "arm: Add Advanced SIMD cbranch implementation"
+
+This reverts commit d9dd04f9f17e36854387899eb630c64a0c8d1a17.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/config/arm/neon.md | 49 -------
+ .../gcc.dg/vect/vect-early-break_2.c | 2 +-
+ .../gcc.dg/vect/vect-early-break_7.c | 2 +-
+ .../gcc.dg/vect/vect-early-break_75.c | 2 +-
+ .../gcc.dg/vect/vect-early-break_77.c | 2 +-
+ .../gcc.dg/vect/vect-early-break_82.c | 2 +-
+ .../gcc.dg/vect/vect-early-break_88.c | 2 +-
+ .../gcc.target/arm/vect-early-break-cbranch.c | 138 ------------------
+ gcc/testsuite/lib/target-supports.exp | 7 -
+ 9 files changed, 6 insertions(+), 200 deletions(-)
+ delete mode 100644 gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c
+
+diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
+index bb6e28ff4e74..91ca7e804555 100644
+--- a/gcc/config/arm/neon.md
++++ b/gcc/config/arm/neon.md
+@@ -408,55 +408,6 @@ (define_insn "vec_extract<mode><V_elem_l>"
+ [(set_attr "type" "neon_store1_one_lane<q>,neon_to_gp<q>")]
+ )
+
+-;; Patterns comparing two vectors and conditionally jump.
+-;; Avdanced SIMD lacks a vector != comparison, but this is a quite common
+-;; operation. To not pay the penalty for inverting == we can map our any
+-;; comparisons to all i.e. any(~x) => all(x).
+-;;
+-;; However unlike the AArch64 version, we can't optimize this further as the
+-;; chain is too long for combine due to these being unspecs so it doesn't fold
+-;; the operation to something simpler.
+-(define_expand "cbranch<mode>4"
+- [(set (pc) (if_then_else
+- (match_operator 0 "expandable_comparison_operator"
+- [(match_operand:VDQI 1 "register_operand")
+- (match_operand:VDQI 2 "reg_or_zero_operand")])
+- (label_ref (match_operand 3 "" ""))
+- (pc)))]
+- "TARGET_NEON"
+-{
+- rtx mask = operands[1];
+-
+- /* If comparing against a non-zero vector we have to do a comparison first
+- so we can have a != 0 comparison with the result. */
+- if (operands[2] != CONST0_RTX (<MODE>mode))
+- {
+- mask = gen_reg_rtx (<MODE>mode);
+- emit_insn (gen_xor<mode>3 (mask, operands[1], operands[2]));
+- }
+-
+- /* For 128-bit vectors we need an additional reductions. */
+- if (known_eq (128, GET_MODE_BITSIZE (<MODE>mode)))
+- {
+- /* Always reduce using a V4SI. */
+- rtx op1 = lowpart_subreg (V4SImode, mask, <MODE>mode);
+- mask = gen_reg_rtx (V2SImode);
+- rtx low = gen_reg_rtx (V2SImode);
+- rtx high = gen_reg_rtx (V2SImode);
+- emit_insn (gen_neon_vget_lowv4si (low, op1));
+- emit_insn (gen_neon_vget_highv4si (high, op1));
+- emit_insn (gen_neon_vpumaxv2si (mask, low, high));
+- }
+-
+- rtx op1 = lowpart_subreg (V2SImode, mask, GET_MODE (mask));
+- emit_insn (gen_neon_vpumaxv2si (op1, op1, op1));
+-
+- rtx val = gen_reg_rtx (SImode);
+- emit_move_insn (val, gen_lowpart (SImode, mask));
+- emit_jump_insn (gen_cbranch_cc (operands[0], val, const0_rtx, operands[3]));
+- DONE;
+-})
+-
+ ;; This pattern is renamed from "vec_extract<mode><V_elem_l>" to
+ ;; "neon_vec_extract<mode><V_elem_l>" and this pattern is called
+ ;; by define_expand in vec-common.md file.
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
+index dec0b492ab88..5c32bf94409e 100644
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
+@@ -5,7 +5,7 @@
+
+ /* { dg-additional-options "-Ofast" } */
+
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+
+ #include <complex.h>
+
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
+index d218a0686719..8c86c5034d75 100644
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
+@@ -5,7 +5,7 @@
+
+ /* { dg-additional-options "-Ofast" } */
+
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+
+ #include <complex.h>
+
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
+index 9dcc3372acd6..ed27f8635730 100644
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
+@@ -3,7 +3,7 @@
+ /* { dg-require-effective-target vect_int } */
+
+ /* { dg-additional-options "-O3" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-* arm*-*-*" } } } } */
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+
+ #include <limits.h>
+ #include <assert.h>
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
+index 9fa7e6948ebf..225106aab0a3 100644
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
+@@ -3,7 +3,7 @@
+ /* { dg-require-effective-target vect_int } */
+
+ /* { dg-additional-options "-O3" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+
+ #include "tree-vect.h"
+
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
+index 7cd21d33485f..0e9b2d8d385c 100644
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
+@@ -5,7 +5,7 @@
+
+ /* { dg-additional-options "-Ofast" } */
+
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+
+ #include <complex.h>
+
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
+index 59ed57c5fb5f..b392dd465539 100644
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
++++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
+@@ -3,7 +3,7 @@
+ /* { dg-require-effective-target vect_int } */
+
+ /* { dg-additional-options "-Ofast --param vect-partial-vector-usage=2" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "arm*-*-*" } } } } */
++/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+
+ #include "tree-vect.h"
+
+diff --git a/gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c
+deleted file mode 100644
+index f57bbd8be428..000000000000
+--- a/gcc/testsuite/gcc.target/arm/vect-early-break-cbranch.c
++++ /dev/null
+@@ -1,138 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target arm_neon_ok } */
+-/* { dg-require-effective-target arm32 } */
+-/* { dg-options "-O3 -march=armv8-a+simd -mfpu=auto -mfloat-abi=hard -fno-schedule-insns -fno-reorder-blocks -fno-schedule-insns2" } */
+-/* { dg-final { check-function-bodies "**" "" "" } } */
+-
+-#define N 640
+-int a[N] = {0};
+-int b[N] = {0};
+-
+-/*
+-** f1:
+-** ...
+-** vcgt.s32 q[0-9]+, q[0-9]+, #0
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vmov r[0-9]+, s[0-9]+ @ int
+-** cmp r[0-9]+, #0
+-** bne \.L[0-9]+
+-** ...
+-*/
+-void f1 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] > 0)
+- break;
+- }
+-}
+-
+-/*
+-** f2:
+-** ...
+-** vcge.s32 q[0-9]+, q[0-9]+, #0
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vmov r[0-9]+, s[0-9]+ @ int
+-** cmp r[0-9]+, #0
+-** bne \.L[0-9]+
+-** ...
+-*/
+-void f2 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] >= 0)
+- break;
+- }
+-}
+-
+-/*
+-** f3:
+-** ...
+-** vceq.i32 q[0-9]+, q[0-9]+, #0
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vmov r[0-9]+, s[0-9]+ @ int
+-** cmp r[0-9]+, #0
+-** bne \.L[0-9]+
+-** ...
+-*/
+-void f3 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] == 0)
+- break;
+- }
+-}
+-
+-/*
+-** f4:
+-** ...
+-** vceq.i32 q[0-9]+, q[0-9]+, #0
+-** vmvn q[0-9]+, q[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vmov r[0-9]+, s[0-9]+ @ int
+-** cmp r[0-9]+, #0
+-** bne \.L[0-9]+
+-** ...
+-*/
+-void f4 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] != 0)
+- break;
+- }
+-}
+-
+-/*
+-** f5:
+-** ...
+-** vclt.s32 q[0-9]+, q[0-9]+, #0
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vmov r[0-9]+, s[0-9]+ @ int
+-** cmp r[0-9]+, #0
+-** bne \.L[0-9]+
+-** ...
+-*/
+-void f5 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] < 0)
+- break;
+- }
+-}
+-
+-/*
+-** f6:
+-** ...
+-** vcle.s32 q[0-9]+, q[0-9]+, #0
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vpmax.u32 d[0-9]+, d[0-9]+, d[0-9]+
+-** vmov r[0-9]+, s[0-9]+ @ int
+-** cmp r[0-9]+, #0
+-** bne \.L[0-9]+
+-** ...
+-*/
+-void f6 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] <= 0)
+- break;
+- }
+-}
+-
+diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
+index b27c30b8c51b..d65953158651 100644
+--- a/gcc/testsuite/lib/target-supports.exp
++++ b/gcc/testsuite/lib/target-supports.exp
+@@ -4069,7 +4069,6 @@ proc check_effective_target_vect_early_break { } {
+ return [check_cached_effective_target_indexed vect_early_break {
+ expr {
+ [istarget aarch64*-*-*]
+- || [check_effective_target_arm_v8_neon_ok]
+ || [check_effective_target_sse4]
+ }}]
+ }
+@@ -4083,7 +4082,6 @@ proc check_effective_target_vect_early_break_hw { } {
+ return [check_cached_effective_target_indexed vect_early_break_hw {
+ expr {
+ [istarget aarch64*-*-*]
+- || [check_effective_target_arm_v8_neon_hw]
+ || [check_sse4_hw_available]
+ }}]
+ }
+@@ -4093,11 +4091,6 @@ proc add_options_for_vect_early_break { flags } {
+ return "$flags"
+ }
+
+- if { [check_effective_target_arm_v8_neon_ok] } {
+- global et_arm_v8_neon_flags
+- return "$flags $et_arm_v8_neon_flags -march=armv8-a"
+- }
+-
+ if { [check_effective_target_sse4] } {
+ return "$flags -msse4.1"
+ }
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch b/14.0.0/gentoo/78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
similarity index 99%
rename from 14.0.0/gentoo/77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch
rename to 14.0.0/gentoo/78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
index f4e6b84..6fbdd54 100644
--- a/14.0.0/gentoo/77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch
+++ b/14.0.0/gentoo/78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
@@ -1,7 +1,7 @@
-From 3283ec82265c4bd51a2d113ebe44310169614650 Mon Sep 17 00:00:00 2001
+From 2fe83ac81d631810a520e5938224c5d10ffbc269 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:13 +0000
-Subject: [PATCH 3/7] Revert "testsuite: Add tests for early break
+Subject: [PATCH 4/8] Revert "testsuite: Add tests for early break
vectorization"
This reverts commit c5232ec14937a34e599e9e386a5975fab9a5e283.
@@ -232,10 +232,10 @@ Signed-off-by: Sam James <sam@gentoo.org>
delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
-index bd62b21f3b72..4be67daedb20 100644
+index 3a394e7739b6..35da6c11a5a9 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
-@@ -1636,14 +1636,6 @@ Target supports hardware vectors of @code{float} when
+@@ -1645,14 +1645,6 @@ Target supports hardware vectors of @code{float} when
@option{-funsafe-math-optimizations} is not in effect.
This implies @code{vect_float}.
@@ -250,7 +250,7 @@ index bd62b21f3b72..4be67daedb20 100644
@item vect_int
Target supports hardware vectors of @code{int}.
-@@ -3213,11 +3205,6 @@ instructions, if any.
+@@ -3222,11 +3214,6 @@ instructions, if any.
@item tls
Add the target-specific flags needed to use thread-local storage.
@@ -4902,10 +4902,10 @@ index 656a7788896d..000000000000
- return 0;
-}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
-index 05fc417877bc..7f13ff0ca565 100644
+index d65953158651..dc8e0bc7c2bd 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
-@@ -4050,44 +4050,6 @@ proc check_effective_target_vect_int { } {
+@@ -4060,44 +4060,6 @@ proc check_effective_target_vect_int { } {
}}]
}
diff --git a/14.0.0/gentoo/78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch b/14.0.0/gentoo/79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
similarity index 97%
rename from 14.0.0/gentoo/78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
rename to 14.0.0/gentoo/79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
index 42a06f1..3a6aa30 100644
--- a/14.0.0/gentoo/78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
+++ b/14.0.0/gentoo/79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
@@ -1,7 +1,7 @@
-From d85db7a7354005e99a143453e103f784614cef0e Mon Sep 17 00:00:00 2001
+From 31b1a8e79e86712d87ebe8de201636c8bd83a6be Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:13 +0000
-Subject: [PATCH 4/7] Revert "AArch64: Add implementation for vector cbranch
+Subject: [PATCH 5/8] Revert "AArch64: Add implementation for vector cbranch
for Advanced SIMD"
This reverts commit 1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab.
@@ -19,7 +19,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
delete mode 100644 gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
-index f88b5bde254e..7c5fd4238357 100644
+index 3cd184f46fa9..8aa55c641e1c 100644
--- a/gcc/config/aarch64/aarch64-simd.md
+++ b/gcc/config/aarch64/aarch64-simd.md
@@ -3885,48 +3885,6 @@ (define_expand "vcond_mask_<mode><v_int_equiv>"
diff --git a/14.0.0/gentoo/79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch b/14.0.0/gentoo/80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
similarity index 99%
rename from 14.0.0/gentoo/79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch
rename to 14.0.0/gentoo/80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
index 549472b..ac87127 100644
--- a/14.0.0/gentoo/79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch
+++ b/14.0.0/gentoo/80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
@@ -1,7 +1,7 @@
-From 3385d9b56e25b75a2e0fe3286b329b82b703362d Mon Sep 17 00:00:00 2001
+From 884068ec19c846246ab55b4820fd2badca329339 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:14 +0000
-Subject: [PATCH 5/7] Revert "middle-end: Support vectorization of loops with
+Subject: [PATCH 6/8] Revert "middle-end: Support vectorization of loops with
multiple exits."
This reverts commit 01f4251b8775c832a92d55e2df57c9ac72eaceef.
@@ -22,7 +22,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
8 files changed, 233 insertions(+), 1330 deletions(-)
diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc
-index 9638d3cc869a..e169413bb44c 100644
+index 8e79362f96ab..bb87db382086 100644
--- a/gcc/tree-if-conv.cc
+++ b/gcc/tree-if-conv.cc
@@ -844,7 +844,7 @@ idx_within_array_bound (tree ref, tree *idx, void *dta)
@@ -35,7 +35,7 @@ index 9638d3cc869a..e169413bb44c 100644
{
class loop *loop = loop_containing_stmt (stmt);
diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
-index 3d9673fb0b58..d5c9c4a11c2e 100644
+index 752c34c26e9b..290303f198b5 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -613,238 +613,6 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
@@ -290,7 +290,7 @@ index 3d9673fb0b58..d5c9c4a11c2e 100644
}
diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
-index 295e1c916874..bcd90a331f5a 100644
+index 9330183bfb9e..9182192710eb 100644
--- a/gcc/tree-vect-loop-manip.cc
+++ b/gcc/tree-vect-loop-manip.cc
@@ -448,20 +448,6 @@ vect_adjust_loop_lens_control (tree iv_type, gimple_seq *seq,
@@ -881,7 +881,7 @@ index 295e1c916874..bcd90a331f5a 100644
for (gsi = gsi_start_phis (merge_bb); !gsi_end_p (gsi);
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index 88261a3a4f57..7a3db5f098ba 100644
+index 2bd96b56006a..5d5f57561741 100644
--- a/gcc/tree-vect-loop.cc
+++ b/gcc/tree-vect-loop.cc
@@ -1040,7 +1040,6 @@ _loop_vec_info::_loop_vec_info (class loop *loop_in, vec_info_shared *shared)
@@ -1577,7 +1577,7 @@ index 88261a3a4f57..7a3db5f098ba 100644
below. */
if (!loop_vinfo->slp_instances.is_empty ())
diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
-index 2053673debe9..696b70b76a82 100644
+index f1a95ef34b93..b0ceb1007bd4 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -132,7 +132,6 @@ vect_init_pattern_stmt (vec_info *vinfo, gimple *pattern_stmt,
@@ -1827,7 +1827,7 @@ index 2053673debe9..696b70b76a82 100644
if (STMT_VINFO_REDUC_IDX (orig_stmt_info_saved) != -1)
{
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
-index 1333d8934783..e9ff728dfd40 100644
+index bdbf08c9d298..267bb444c284 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -342,7 +342,6 @@ is_simple_and_all_uses_invariant (stmt_vec_info stmt_info,
@@ -2305,7 +2305,7 @@ index 1333d8934783..e9ff728dfd40 100644
scalar_type = TREE_TYPE (DR_REF (dr));
else if (gimple_call_internal_p (stmt, IFN_MASK_STORE))
diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
-index 8b495fc7ca13..d97e2b54c25a 100644
+index 9001b738bf31..8e34549b1775 100644
--- a/gcc/tree-vectorizer.cc
+++ b/gcc/tree-vectorizer.cc
@@ -1381,9 +1381,7 @@ pass_vectorize::execute (function *fun)
@@ -2320,7 +2320,7 @@ index 8b495fc7ca13..d97e2b54c25a 100644
edge entry = EDGE_PRED (loop_preheader_edge (loop)->src, 0);
do_rpo_vn (fun, entry, exit_bbs);
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
-index 785fc99ca27a..1810833a324a 100644
+index db44d730b702..62c9818ee0dd 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -66,7 +66,6 @@ enum vect_def_type {
diff --git a/14.0.0/gentoo/80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch b/14.0.0/gentoo/81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
similarity index 90%
rename from 14.0.0/gentoo/80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
rename to 14.0.0/gentoo/81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
index 2473ce4..42c1f15 100644
--- a/14.0.0/gentoo/80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
+++ b/14.0.0/gentoo/81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
@@ -1,7 +1,7 @@
-From eccc75285320e5c4a4c21ec48ac2ab8bf8ca3580 Mon Sep 17 00:00:00 2001
+From 596b268da13ffc54200075212eadba01ac73a847 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:15 +0000
-Subject: [PATCH 6/7] Revert "middle-end: prevent LIM from hoising vector
+Subject: [PATCH 7/8] Revert "middle-end: prevent LIM from hoising vector
compares from gconds if target does not support it."
This reverts commit f1dcc0fe371e3cb10d2cbe3f6c88db6f72edddda.
@@ -15,7 +15,7 @@ Signed-off-by: Sam James <sam@gentoo.org>
1 file changed, 13 deletions(-)
diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc
-index 2ebf6d6548c4..396963b6754c 100644
+index f3fda2bd7ce1..dd2aacaeee43 100644
--- a/gcc/tree-ssa-loop-im.cc
+++ b/gcc/tree-ssa-loop-im.cc
@@ -48,8 +48,6 @@ along with GCC; see the file COPYING3. If not see
diff --git a/14.0.0/gentoo/81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch b/14.0.0/gentoo/82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
similarity index 99%
rename from 14.0.0/gentoo/81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch
rename to 14.0.0/gentoo/82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
index 88e414e..0586a1c 100644
--- a/14.0.0/gentoo/81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch
+++ b/14.0.0/gentoo/82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
@@ -1,7 +1,7 @@
-From aa2a8d5c6f86e0b61e92b1ca02859cd480647f72 Mon Sep 17 00:00:00 2001
+From f4636b37ea9c34b2f3fc7efa04fd34fa4b8b2542 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Mon, 25 Dec 2023 16:57:15 +0000
-Subject: [PATCH 7/7] Revert "testsuite: Add more pragma novector to new tests"
+Subject: [PATCH 8/8] Revert "testsuite: Add more pragma novector to new tests"
This reverts commit 0994ddd86f9c3d829b06009d9e706ff72b07001a.
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index b3ba265..24aaad3 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,14 @@
+15 8 Jan 2024
+
+ U 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+ U 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
+ U 77_all_Revert_arm_Add_Advanced_SIMD_cbranch_implementation.patch
+ + 78_all_Revert_testsuite_add_tests_for_early_break_vectorization.patch
+ + 79_all_Revert_AArch64_add_implementation_for_vector_cbranch.patch
+ + 80_all_Revert_middle-end_support_vectorization_of_loops_with_mult.patch
+ + 81_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
+ + 82_all_testsuite_Add_more_pragma_novector_to_new_tests.patch
+
14 31 Dec 2023
+ 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-31 23:11 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-31 23:11 UTC (permalink / raw
To: gentoo-commits
commit: ff3336c450f32a41e1907a87b2e12aedbdc2c209
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 31 22:45:26 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 31 23:02:35 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ff3336c4
14.0.0: cut patchset 14
13 seems to have been a mess where I'd already done it and used it in
14.0.0_pre20231224-r1.
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index b0f3170..b3ba265 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,6 +1,10 @@
-13 ?? ??? ????
+14 31 Dec 2023
- + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+ + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+
+13 25 Dec 2023
+
+ N/A
12 25 Dec 2023
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-26 18:51 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-26 18:51 UTC (permalink / raw
To: gentoo-commits
commit: 3dc22ec055dae66d6f92b138ae946f284d0a6abb
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 26 18:51:09 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 26 18:51:31 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=3dc22ec0
Revert "14.0.0: drop erroneous patch"
This reverts commit 5055fa1426b3a9ebab80d799ea30b6c65ad2ac74.
We need this for master/9999.
Signed-off-by: Sam James <sam <AT> gentoo.org>
...le-end-explicitly-initialize-vec_stmts-PR.patch | 32 ++++++++++++++++++++++
14.0.0/gentoo/README.history | 5 ++--
2 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
new file mode 100644
index 0000000..b113f1e
--- /dev/null
+++ b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
@@ -0,0 +1,32 @@
+From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:10 +0000
+Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts
+ [PR113132]"
+
+This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/tree-vect-loop.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index f51ae3e719e7..88261a3a4f57 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ exit_bb = loop_exit->dest;
+ exit_gsi = gsi_after_labels (exit_bb);
+ reduc_inputs.create (slp_node ? vec_num : ncopies);
+- vec <gimple *> vec_stmts = vNULL;
++ vec <gimple *> vec_stmts;
+ for (unsigned i = 0; i < vec_num; i++)
+ {
+ gimple_seq stmts = NULL;
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 90ab9ed..b0f3170 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,10 +1,9 @@
-13 25 Dec 2023
+13 ?? ??? ????
- - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+ + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
12 25 Dec 2023
- + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+ 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
+ 77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch
+ 78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-25 17:18 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-25 17:18 UTC (permalink / raw
To: gentoo-commits
commit: 5055fa1426b3a9ebab80d799ea30b6c65ad2ac74
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 17:09:58 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 17:09:58 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=5055fa14
14.0.0: drop erroneous patch
75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch reverts
something which wasn't in the snapshot (but is a fix for the vect stuff).
Signed-off-by: Sam James <sam <AT> gentoo.org>
...le-end-explicitly-initialize-vec_stmts-PR.patch | 32 ----------------------
14.0.0/gentoo/README.history | 4 +++
2 files changed, 4 insertions(+), 32 deletions(-)
diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
deleted file mode 100644
index b113f1e..0000000
--- a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Mon, 25 Dec 2023 16:57:10 +0000
-Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts
- [PR113132]"
-
-This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a.
-
-Bug: https://gcc.gnu.org/PR113135
-Bug: https://gcc.gnu.org/PR113136
-Bug: https://gcc.gnu.org/PR113137
-Signed-off-by: Sam James <sam@gentoo.org>
----
- gcc/tree-vect-loop.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
-index f51ae3e719e7..88261a3a4f57 100644
---- a/gcc/tree-vect-loop.cc
-+++ b/gcc/tree-vect-loop.cc
-@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
- exit_bb = loop_exit->dest;
- exit_gsi = gsi_after_labels (exit_bb);
- reduc_inputs.create (slp_node ? vec_num : ncopies);
-- vec <gimple *> vec_stmts = vNULL;
-+ vec <gimple *> vec_stmts;
- for (unsigned i = 0; i < vec_num; i++)
- {
- gimple_seq stmts = NULL;
---
-2.43.0
-
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index ad540db..90ab9ed 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+13 25 Dec 2023
+
+ - 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+
12 25 Dec 2023
+ 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-25 17:04 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-25 17:04 UTC (permalink / raw
To: gentoo-commits
commit: bcae6fba2b7ef6d741db7da389e6cfccd3acaf53
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 17:03:15 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 17:04:29 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=bcae6fba
14.0.0: cut patchset 12 with early abort vectorization reverts
Bug: https://gcc.gnu.org/PR113135
Bug: https://gcc.gnu.org/PR113136
Bug: https://gcc.gnu.org/PR113137
Signed-off-by: Sam James <sam <AT> gentoo.org>
...le-end-explicitly-initialize-vec_stmts-PR.patch | 32 +
...suite-un-xfail-TSVC-loops-that-check-for-.patch | 75 +
...suite-Add-tests-for-early-break-vectoriza.patch | 4955 ++++++++++++++++++++
...h64-Add-implementation-for-vector-cbranch.patch | 320 ++
...le-end-Support-vectorization-of-loops-wit.patch | 2426 ++++++++++
...le-end-prevent-LIM-from-hoising-vector-co.patch | 50 +
...suite-Add-more-pragma-novector-to-new-tes.patch | 457 ++
14.0.0/gentoo/README.history | 10 +
8 files changed, 8325 insertions(+)
diff --git a/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
new file mode 100644
index 0000000..b113f1e
--- /dev/null
+++ b/14.0.0/gentoo/75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
@@ -0,0 +1,32 @@
+From a648fe2c0121414ac82926e9f8a70b33e347b930 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:10 +0000
+Subject: [PATCH 1/7] Revert "middle-end: explicitly initialize vec_stmts
+ [PR113132]"
+
+This reverts commit fd032cce216e003d58b2394f7e61b03dee27e81a.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/tree-vect-loop.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index f51ae3e719e7..88261a3a4f57 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -6207,7 +6207,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ exit_bb = loop_exit->dest;
+ exit_gsi = gsi_after_labels (exit_bb);
+ reduc_inputs.create (slp_node ? vec_num : ncopies);
+- vec <gimple *> vec_stmts = vNULL;
++ vec <gimple *> vec_stmts;
+ for (unsigned i = 0; i < vec_num; i++)
+ {
+ gimple_seq stmts = NULL;
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
new file mode 100644
index 0000000..1e4b825
--- /dev/null
+++ b/14.0.0/gentoo/76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
@@ -0,0 +1,75 @@
+From 846bfbdd30d437e40e10ce8bcd896f263436dfc1 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:12 +0000
+Subject: [PATCH 2/7] Revert "testsuite: un-xfail TSVC loops that check for
+ exit control flow vectorization"
+
+This reverts commit a657c7e3518fcfc796f223d47385cad5e97dc9a5.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c | 3 +--
+ gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c | 3 +--
+ gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c | 3 +--
+ 3 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
+index 0d55d0dd67c3..3fd490b3797d 100644
+--- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
++++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s332.c
+@@ -3,7 +3,6 @@
+
+ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+ /* { dg-require-effective-target vect_float } */
+-/* { dg-add-options vect_early_break } */
+
+ #include "tsvc.h"
+
+@@ -50,4 +49,4 @@ int main (int argc, char **argv)
+ return 0;
+ }
+
+-/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break } } } } */
++/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
+index 5539f0f08411..bf98e173d2e6 100644
+--- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
++++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s481.c
+@@ -3,7 +3,6 @@
+
+ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+ /* { dg-require-effective-target vect_float } */
+-/* { dg-add-options vect_early_break } */
+
+ #include "tsvc.h"
+
+@@ -40,4 +39,4 @@ int main (int argc, char **argv)
+ return 0;
+ }
+
+-/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break} } } } */
++/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
+index 73bed5d4c57a..c4e26806292a 100644
+--- a/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
++++ b/gcc/testsuite/gcc.dg/vect/tsvc/vect-tsvc-s482.c
+@@ -3,7 +3,6 @@
+
+ /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+ /* { dg-require-effective-target vect_float } */
+-/* { dg-add-options vect_early_break } */
+
+ #include "tsvc.h"
+
+@@ -38,4 +37,4 @@ int main (int argc, char **argv)
+ return 0;
+ }
+
+-/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { ! vect_early_break } } } } */
++/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch b/14.0.0/gentoo/77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch
new file mode 100644
index 0000000..f4e6b84
--- /dev/null
+++ b/14.0.0/gentoo/77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch
@@ -0,0 +1,4955 @@
+From 3283ec82265c4bd51a2d113ebe44310169614650 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:13 +0000
+Subject: [PATCH 3/7] Revert "testsuite: Add tests for early break
+ vectorization"
+
+This reverts commit c5232ec14937a34e599e9e386a5975fab9a5e283.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/doc/sourcebuild.texi | 13 -
+ .../g++.dg/vect/vect-early-break_1.cc | 62 -----
+ .../g++.dg/vect/vect-early-break_2.cc | 61 -----
+ .../g++.dg/vect/vect-early-break_3.cc | 17 --
+ .../gcc.dg/vect/vect-early-break-run_1.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_10.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_2.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_3.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_4.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_5.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_6.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_7.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_8.c | 11 -
+ .../gcc.dg/vect/vect-early-break-run_9.c | 11 -
+ .../gcc.dg/vect/vect-early-break-template_1.c | 50 ----
+ .../gcc.dg/vect/vect-early-break-template_2.c | 53 ----
+ .../gcc.dg/vect/vect-early-break_1.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_10.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_11.c | 32 ---
+ .../gcc.dg/vect/vect-early-break_12.c | 32 ---
+ .../gcc.dg/vect/vect-early-break_13.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_14.c | 26 --
+ .../gcc.dg/vect/vect-early-break_15.c | 26 --
+ .../gcc.dg/vect/vect-early-break_16.c | 26 --
+ .../gcc.dg/vect/vect-early-break_17.c | 26 --
+ .../gcc.dg/vect/vect-early-break_18.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_19.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_2.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_20.c | 38 ---
+ .../gcc.dg/vect/vect-early-break_21.c | 38 ---
+ .../gcc.dg/vect/vect-early-break_22.c | 45 ----
+ .../gcc.dg/vect/vect-early-break_23.c | 65 -----
+ .../gcc.dg/vect/vect-early-break_24.c | 46 ----
+ .../gcc.dg/vect/vect-early-break_25.c | 11 -
+ .../gcc.dg/vect/vect-early-break_26.c | 44 ----
+ .../gcc.dg/vect/vect-early-break_27.c | 19 --
+ .../gcc.dg/vect/vect-early-break_28.c | 16 --
+ .../gcc.dg/vect/vect-early-break_29.c | 17 --
+ .../gcc.dg/vect/vect-early-break_3.c | 21 --
+ .../gcc.dg/vect/vect-early-break_30.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_31.c | 30 ---
+ .../gcc.dg/vect/vect-early-break_32.c | 30 ---
+ .../gcc.dg/vect/vect-early-break_33.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_34.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_35.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_36.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_37.c | 26 --
+ .../gcc.dg/vect/vect-early-break_38.c | 26 --
+ .../gcc.dg/vect/vect-early-break_39.c | 26 --
+ .../gcc.dg/vect/vect-early-break_4.c | 24 --
+ .../gcc.dg/vect/vect-early-break_40.c | 27 --
+ .../gcc.dg/vect/vect-early-break_41.c | 25 --
+ .../gcc.dg/vect/vect-early-break_42.c | 26 --
+ .../gcc.dg/vect/vect-early-break_43.c | 30 ---
+ .../gcc.dg/vect/vect-early-break_44.c | 30 ---
+ .../gcc.dg/vect/vect-early-break_45.c | 26 --
+ .../gcc.dg/vect/vect-early-break_46.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_47.c | 26 --
+ .../gcc.dg/vect/vect-early-break_48.c | 14 --
+ .../gcc.dg/vect/vect-early-break_49.c | 25 --
+ .../gcc.dg/vect/vect-early-break_5.c | 25 --
+ .../gcc.dg/vect/vect-early-break_50.c | 18 --
+ .../gcc.dg/vect/vect-early-break_51.c | 26 --
+ .../gcc.dg/vect/vect-early-break_52.c | 21 --
+ .../gcc.dg/vect/vect-early-break_53.c | 18 --
+ .../gcc.dg/vect/vect-early-break_54.c | 30 ---
+ .../gcc.dg/vect/vect-early-break_55.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_56.c | 102 --------
+ .../gcc.dg/vect/vect-early-break_57.c | 32 ---
+ .../gcc.dg/vect/vect-early-break_58.c | 19 --
+ .../gcc.dg/vect/vect-early-break_59.c | 18 --
+ .../gcc.dg/vect/vect-early-break_6.c | 27 --
+ .../gcc.dg/vect/vect-early-break_60.c | 18 --
+ .../gcc.dg/vect/vect-early-break_61.c | 18 --
+ .../gcc.dg/vect/vect-early-break_62.c | 21 --
+ .../gcc.dg/vect/vect-early-break_63.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_64.c | 18 --
+ .../gcc.dg/vect/vect-early-break_65.c | 20 --
+ .../gcc.dg/vect/vect-early-break_66.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_67.c | 42 ----
+ .../gcc.dg/vect/vect-early-break_68.c | 42 ----
+ .../gcc.dg/vect/vect-early-break_69.c | 80 ------
+ .../gcc.dg/vect/vect-early-break_7.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_70.c | 69 ------
+ .../gcc.dg/vect/vect-early-break_71.c | 71 ------
+ .../gcc.dg/vect/vect-early-break_72.c | 151 -----------
+ .../gcc.dg/vect/vect-early-break_73.c | 71 ------
+ .../gcc.dg/vect/vect-early-break_74.c | 165 ------------
+ .../gcc.dg/vect/vect-early-break_75.c | 234 ------------------
+ .../gcc.dg/vect/vect-early-break_76.c | 169 -------------
+ .../gcc.dg/vect/vect-early-break_77.c | 34 ---
+ .../gcc.dg/vect/vect-early-break_78.c | 77 ------
+ .../gcc.dg/vect/vect-early-break_79.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_8.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_80.c | 49 ----
+ .../gcc.dg/vect/vect-early-break_81.c | 31 ---
+ .../gcc.dg/vect/vect-early-break_82.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_83.c | 29 ---
+ .../gcc.dg/vect/vect-early-break_84.c | 44 ----
+ .../gcc.dg/vect/vect-early-break_85.c | 40 ---
+ .../gcc.dg/vect/vect-early-break_86.c | 26 --
+ .../gcc.dg/vect/vect-early-break_87.c | 26 --
+ .../gcc.dg/vect/vect-early-break_88.c | 41 ---
+ .../gcc.dg/vect/vect-early-break_89.c | 21 --
+ .../gcc.dg/vect/vect-early-break_9.c | 28 ---
+ .../gcc.dg/vect/vect-early-break_90.c | 48 ----
+ .../gcc.dg/vect/vect-early-break_91.c | 48 ----
+ .../gcc.dg/vect/vect-early-break_92.c | 48 ----
+ .../gcc.dg/vect/vect-early-break_93.c | 48 ----
+ gcc/testsuite/lib/target-supports.exp | 38 ---
+ 110 files changed, 4025 deletions(-)
+ delete mode 100644 gcc/testsuite/g++.dg/vect/vect-early-break_1.cc
+ delete mode 100644 gcc/testsuite/g++.dg/vect/vect-early-break_2.cc
+ delete mode 100644 gcc/testsuite/g++.dg/vect/vect-early-break_3.cc
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_1.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_10.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_11.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_12.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_13.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_14.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_15.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_16.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_17.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_19.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_20.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_21.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_22.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_23.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_24.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_25.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_26.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_27.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_28.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_29.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_3.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_30.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_31.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_32.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_33.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_34.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_35.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_36.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_37.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_39.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_4.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_40.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_41.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_42.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_43.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_44.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_45.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_46.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_47.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_48.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_49.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_5.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_50.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_51.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_52.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_53.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_54.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_55.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_56.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_57.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_58.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_59.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_6.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_60.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_61.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_62.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_63.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_64.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_66.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_67.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_68.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_69.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_70.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_71.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_72.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_73.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_74.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_76.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_78.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_79.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_8.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_80.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_81.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_83.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_84.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_85.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_86.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_87.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_89.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_9.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_90.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_91.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_92.c
+ delete mode 100644 gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
+
+diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
+index bd62b21f3b72..4be67daedb20 100644
+--- a/gcc/doc/sourcebuild.texi
++++ b/gcc/doc/sourcebuild.texi
+@@ -1636,14 +1636,6 @@ Target supports hardware vectors of @code{float} when
+ @option{-funsafe-math-optimizations} is not in effect.
+ This implies @code{vect_float}.
+
+-@item vect_early_break
+-Target supports vectorization codegen of loops with early breaks.
+-This requires an implementation of the cbranch optab for vectors.
+-
+-@item vect_early_break_hw
+-Target supports hardware vectorization and running of loops with early breaks.
+-This requires an implementation of the cbranch optab for vectors.
+-
+ @item vect_int
+ Target supports hardware vectors of @code{int}.
+
+@@ -3213,11 +3205,6 @@ instructions, if any.
+ @item tls
+ Add the target-specific flags needed to use thread-local storage.
+
+-@item vect_early_break
+-Add the target-specific flags needed to enable early break vectorization for
+-a target, if any. This requires the target to have an implementation of the
+-@code{cbranch} optab.
+-
+ @item weak_undefined
+ Add the flags needed to enable support for weak undefined symbols.
+ @end table
+diff --git a/gcc/testsuite/g++.dg/vect/vect-early-break_1.cc b/gcc/testsuite/g++.dg/vect/vect-early-break_1.cc
+deleted file mode 100644
+index fce8e67f20b3..000000000000
+--- a/gcc/testsuite/g++.dg/vect/vect-early-break_1.cc
++++ /dev/null
+@@ -1,62 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-
+-/* { dg-additional-options "-w -O2" } */
+-
+-void fancy_abort(char *, int, const char *) __attribute__((__noreturn__));
+-template <unsigned N, typename> struct poly_int_pod { int coeffs[N]; };
+-template <unsigned N, typename> class poly_int : public poly_int_pod<N, int> {
+-public:
+- template <typename Ca> poly_int &operator+=(const poly_int_pod<N, Ca> &);
+-};
+-template <unsigned N, typename C>
+-template <typename Ca>
+-poly_int<N, C> &poly_int<N, C>::operator+=(const poly_int_pod<N, Ca> &a) {
+- for (int i = 0; i < N; i++)
+- this->coeffs[i] += a.coeffs[i];
+- return *this;
+-}
+-template <unsigned N, typename Ca, typename Cb>
+-poly_int<N, long> exact_div(poly_int_pod<N, Ca>, Cb) {
+- poly_int<N, long> r;
+- return r;
+-}
+-struct vec_prefix {
+- unsigned m_num;
+-};
+-struct vl_ptr;
+-struct va_heap {
+- typedef vl_ptr default_layout;
+-};
+-template <typename, typename A, typename = typename A::default_layout>
+-struct vec;
+-template <typename T, typename A> struct vec<T, A, int> {
+- T &operator[](unsigned);
+- vec_prefix m_vecpfx;
+- T m_vecdata[];
+-};
+-template <typename T, typename A> T &vec<T, A, int>::operator[](unsigned ix) {
+- m_vecpfx.m_num ? fancy_abort("", 9, __FUNCTION__), 0 : 0;
+- return m_vecdata[ix];
+-}
+-template <typename T> struct vec<T, va_heap> {
+- T &operator[](unsigned ix) { return m_vec[ix]; }
+- vec<T, va_heap, int> m_vec;
+-};
+-class auto_vec : public vec<poly_int<2, long>, va_heap> {};
+-template <typename> class vector_builder : public auto_vec {};
+-class int_vector_builder : public vector_builder<int> {
+-public:
+- int_vector_builder(poly_int<2, long>, int, int);
+-};
+-bool vect_grouped_store_supported() {
+- int i;
+- poly_int<2, long> nelt;
+- int_vector_builder sel(nelt, 2, 3);
+- for (i = 0; i < 6; i++)
+- sel[i] += exact_div(nelt, 2);
+-}
+-
+diff --git a/gcc/testsuite/g++.dg/vect/vect-early-break_2.cc b/gcc/testsuite/g++.dg/vect/vect-early-break_2.cc
+deleted file mode 100644
+index dad175a336f7..000000000000
+--- a/gcc/testsuite/g++.dg/vect/vect-early-break_2.cc
++++ /dev/null
+@@ -1,61 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-w -O2" } */
+-
+-void fancy_abort(char *, int, const char *) __attribute__((__noreturn__));
+-template <unsigned N, typename> struct poly_int_pod { int coeffs[N]; };
+-template <unsigned N, typename> class poly_int : public poly_int_pod<N, int> {
+-public:
+- template <typename Ca> poly_int &operator+=(const poly_int_pod<N, Ca> &);
+-};
+-template <unsigned N, typename C>
+-template <typename Ca>
+-poly_int<N, C> &poly_int<N, C>::operator+=(const poly_int_pod<N, Ca> &a) {
+- for (int i = 0; i < N; i++)
+- this->coeffs[i] += a.coeffs[i];
+- return *this;
+-}
+-template <unsigned N, typename Ca, typename Cb>
+-poly_int<N, long> exact_div(poly_int_pod<N, Ca>, Cb) {
+- poly_int<N, long> r;
+- return r;
+-}
+-struct vec_prefix {
+- unsigned m_num;
+-};
+-struct vl_ptr;
+-struct va_heap {
+- typedef vl_ptr default_layout;
+-};
+-template <typename, typename A, typename = typename A::default_layout>
+-struct vec;
+-template <typename T, typename A> struct vec<T, A, int> {
+- T &operator[](unsigned);
+- vec_prefix m_vecpfx;
+- T m_vecdata[];
+-};
+-template <typename T, typename A> T &vec<T, A, int>::operator[](unsigned ix) {
+- m_vecpfx.m_num ? fancy_abort("", 9, __FUNCTION__), 0 : 0;
+- return m_vecdata[ix];
+-}
+-template <typename T> struct vec<T, va_heap> {
+- T &operator[](unsigned ix) { return m_vec[ix]; }
+- vec<T, va_heap, int> m_vec;
+-};
+-class auto_vec : public vec<poly_int<2, long>, va_heap> {};
+-template <typename> class vector_builder : public auto_vec {};
+-class int_vector_builder : public vector_builder<int> {
+-public:
+- int_vector_builder(poly_int<2, long>, int, int);
+-};
+-bool vect_grouped_store_supported() {
+- int i;
+- poly_int<2, long> nelt;
+- int_vector_builder sel(nelt, 2, 3);
+- for (i = 0; i < 6; i++)
+- sel[i] += exact_div(nelt, 2);
+-}
+-
+diff --git a/gcc/testsuite/g++.dg/vect/vect-early-break_3.cc b/gcc/testsuite/g++.dg/vect/vect-early-break_3.cc
+deleted file mode 100644
+index 8a4e33b0925b..000000000000
+--- a/gcc/testsuite/g++.dg/vect/vect-early-break_3.cc
++++ /dev/null
+@@ -1,17 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-w -O2" } */
+-
+-int aarch64_advsimd_valid_immediate_hs_val32;
+-bool aarch64_advsimd_valid_immediate_hs() {
+- for (int shift = 0; shift < 32; shift += 8)
+- if (aarch64_advsimd_valid_immediate_hs_val32 & shift)
+- return aarch64_advsimd_valid_immediate_hs_val32;
+- for (;;)
+- ;
+-}
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c
+deleted file mode 100644
+index fb8faea3221f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_1.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 0
+-#include "vect-early-break-template_1.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c
+deleted file mode 100644
+index 2fc8551db41e..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_10.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 800
+-#define P 799
+-#include "vect-early-break-template_2.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c
+deleted file mode 100644
+index 8c6d4cebb190..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_2.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 802
+-#include "vect-early-break-template_1.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c
+deleted file mode 100644
+index ad25db4e6e22..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_3.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 5
+-#include "vect-early-break-template_1.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c
+deleted file mode 100644
+index 804d640cd10b..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_4.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 278
+-#include "vect-early-break-template_1.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c
+deleted file mode 100644
+index fd8086aab0de..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_5.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 800
+-#define P 799
+-#include "vect-early-break-template_1.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c
+deleted file mode 100644
+index 3b4490df0ebd..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_6.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 0
+-#include "vect-early-break-template_2.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c
+deleted file mode 100644
+index ab9ff90c3d09..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_7.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 802
+-#include "vect-early-break-template_2.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c
+deleted file mode 100644
+index c2ea839d7167..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_8.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 5
+-#include "vect-early-break-template_2.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c
+deleted file mode 100644
+index a221c879387b..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-run_9.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast -save-temps" } */
+-
+-#define N 803
+-#define P 278
+-#include "vect-early-break-template_2.c"
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c
+deleted file mode 100644
+index acc088282ad0..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_1.c
++++ /dev/null
+@@ -1,50 +0,0 @@
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 803
+-#endif
+-
+-#ifndef P
+-#define P 0
+-#endif
+-
+-unsigned vect_a[N] = {0};
+-unsigned vect_b[N] = {0};
+-
+-__attribute__((noipa, noinline))
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- int x = 1;
+- int idx = P;
+- vect_a[idx] = x + 1;
+-
+- test4(x);
+-
+- if (vect_b[idx] != (x + idx))
+- abort ();
+-
+- if (vect_a[idx] != x + 1)
+- abort ();
+-
+- if (idx > 0 && vect_a[idx-1] != x)
+- abort ();
+-
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c
+deleted file mode 100644
+index dce852e760a2..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break-template_2.c
++++ /dev/null
+@@ -1,53 +0,0 @@
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 803
+-#endif
+-
+-#ifndef P
+-#define P 0
+-#endif
+-
+-unsigned vect_a[N] = {0};
+-unsigned vect_b[N] = {0};
+-
+-__attribute__((noipa, noinline))
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return i;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- int x = 1;
+- int idx = P;
+- vect_a[idx] = x + 1;
+-
+- unsigned res = test4(x);
+-
+- if (res != idx)
+- abort ();
+-
+- if (vect_b[idx] != (x + idx))
+- abort ();
+-
+- if (vect_a[idx] != x + 1)
+- abort ();
+-
+- if (idx > 0 && vect_a[idx-1] != x)
+- abort ();
+-
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_1.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_1.c
+deleted file mode 100644
+index c1da23e691cf..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_1.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_10.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_10.c
+deleted file mode 100644
+index 49bae484967f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_10.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x,int y, int z)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+- }
+-
+- ret = x + y * z;
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_11.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_11.c
+deleted file mode 100644
+index 8085383a5687..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_11.c
++++ /dev/null
+@@ -1,32 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x, int y)
+-{
+- unsigned ret = 0;
+-for (int o = 0; o < y; o++)
+-{
+- ret += o;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+-}
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_12.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_12.c
+deleted file mode 100644
+index 8eeec820be5c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_12.c
++++ /dev/null
+@@ -1,32 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x, int y)
+-{
+- unsigned ret = 0;
+-for (int o = 0; o < y; o++)
+-{
+- ret += o;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i];
+- vect_a[i] = x;
+-
+- }
+-}
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_13.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_13.c
+deleted file mode 100644
+index 58f5f0ae7e2e..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_13.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i] * x;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_14.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_14.c
+deleted file mode 100644
+index 3f0a61fe8b71..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_14.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 803
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-int test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return i;
+- vect_a[i] += x * vect_b[i];
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_15.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_15.c
+deleted file mode 100644
+index 08e7faf24023..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_15.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 803
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-int test4(unsigned x)
+-{
+- int ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return i;
+- vect_a[i] += x * vect_b[i];
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_16.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_16.c
+deleted file mode 100644
+index 6bb71555be20..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_16.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 1024
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i];
+- vect_a[i] = x;
+- ret += vect_a[i] + vect_b[i];
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_17.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_17.c
+deleted file mode 100644
+index 264031874eed..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_17.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 1024
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i];
+- vect_a[i] = x;
+- ret = vect_a[i] + vect_b[i];
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
+deleted file mode 100644
+index babc79c74c39..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i+=2)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_19.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_19.c
+deleted file mode 100644
+index 9555c16a0821..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_19.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x, unsigned step)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i+=step)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
+deleted file mode 100644
+index 5c32bf94409e..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_2.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include <complex.h>
+-
+-#define N 1024
+-complex double vect_a[N];
+-complex double vect_b[N];
+-
+-complex double test4(complex double x)
+-{
+- complex double ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] += x + i;
+- if (vect_a[i] == x)
+- return i;
+- vect_a[i] += x * vect_b[i];
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_20.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_20.c
+deleted file mode 100644
+index 039aac7fd84c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_20.c
++++ /dev/null
+@@ -1,38 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include <stdbool.h>
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_b[N];
+-struct testStruct {
+- long e;
+- long f;
+- bool a : 1;
+- bool b : 1;
+- int c : 14;
+- int d;
+-};
+-struct testStruct vect_a[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i].a > x)
+- return true;
+- vect_a[i].e = x;
+- }
+- return ret;
+-}
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_21.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_21.c
+deleted file mode 100644
+index dbe3f8265115..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_21.c
++++ /dev/null
+@@ -1,38 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <stdbool.h>
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_b[N];
+-struct testStruct {
+- long e;
+- long f;
+- bool a : 1;
+- bool b : 1;
+- int c : 14;
+- int d;
+-};
+-struct testStruct vect_a[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i].a)
+- return true;
+- vect_a[i].e = x;
+- }
+- return ret;
+-}
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_22.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_22.c
+deleted file mode 100644
+index b3f5984f682f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_22.c
++++ /dev/null
+@@ -1,45 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-/* { dg-require-effective-target vect_perm } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-
+-#include "tree-vect.h"
+-
+-void __attribute__((noipa))
+-foo (int * __restrict__ a, short * __restrict__ b, int * __restrict__ c)
+-{
+- int t1 = *c;
+- int t2 = *c;
+- for (int i = 0; i < 64; i+=2)
+- {
+- b[i] = a[i] - t1;
+- t1 = a[i];
+- b[i+1] = a[i+1] - t2;
+- t2 = a[i+1];
+- }
+-}
+-
+-int a[64];
+-short b[64];
+-
+-int
+-main ()
+-{
+- check_vect ();
+- for (int i = 0; i < 64; ++i)
+- {
+- a[i] = i;
+- __asm__ volatile ("" ::: "memory");
+- }
+- int c = 7;
+- foo (a, b, &c);
+- for (int i = 2; i < 64; i+=2)
+- if (b[i] != a[i] - a[i-2]
+- || b[i+1] != a[i+1] - a[i-1])
+- abort ();
+- if (b[0] != -7 || b[1] != -6)
+- abort ();
+- return 0;
+-}
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 2 "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_23.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_23.c
+deleted file mode 100644
+index 3e435af44471..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_23.c
++++ /dev/null
+@@ -1,65 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#include "tree-vect.h"
+-
+-#define N 200
+-#define M 4
+-
+-typedef signed char sc;
+-typedef unsigned char uc;
+-typedef signed short ss;
+-typedef unsigned short us;
+-typedef int si;
+-typedef unsigned int ui;
+-typedef signed long long sll;
+-typedef unsigned long long ull;
+-
+-#define FOR_EACH_TYPE(M) \
+- M (sc) M (uc) \
+- M (ss) M (us) \
+- M (si) M (ui) \
+- M (sll) M (ull) \
+- M (float) M (double)
+-
+-#define TEST_VALUE(I) ((I) * 17 / 2)
+-
+-#define ADD_TEST(TYPE) \
+- void __attribute__((noinline, noclone)) \
+- test_##TYPE (TYPE *a, TYPE *b) \
+- { \
+- for (int i = 0; i < N; i += 2) \
+- { \
+- a[i + 0] = b[i + 0] + 2; \
+- a[i + 1] = b[i + 1] + 3; \
+- } \
+- }
+-
+-#define DO_TEST(TYPE) \
+- for (int j = 1; j < M; ++j) \
+- { \
+- TYPE a[N + M]; \
+- for (int i = 0; i < N + M; ++i) \
+- a[i] = TEST_VALUE (i); \
+- test_##TYPE (a + j, a); \
+- for (int i = 0; i < N; i += 2) \
+- if (a[i + j] != (TYPE) (a[i] + 2) \
+- || a[i + j + 1] != (TYPE) (a[i + 1] + 3)) \
+- __builtin_abort (); \
+- }
+-
+-FOR_EACH_TYPE (ADD_TEST)
+-
+-int
+-main (void)
+-{
+- check_vect ();
+-
+- FOR_EACH_TYPE (DO_TEST)
+- return 0;
+-}
+-
+-/* { dg-final { scan-tree-dump {flags: [^\n]*ARBITRARY\n} "vect" { target vect_int } } } */
+-/* { dg-final { scan-tree-dump "using an address-based overlap test" "vect" } } */
+-/* { dg-final { scan-tree-dump-not "using an index-based" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_24.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_24.c
+deleted file mode 100644
+index fa2a17ed96f1..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_24.c
++++ /dev/null
+@@ -1,46 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_double } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-
+-#include "tree-vect.h"
+-
+-extern void abort (void);
+-void __attribute__((noinline,noclone))
+-foo (double *b, double *d, double *f)
+-{
+- int i;
+- for (i = 0; i < 1024; i++)
+- {
+- d[2*i] = 2. * d[2*i];
+- d[2*i+1] = 4. * d[2*i+1];
+- b[i] = d[2*i] - 1.;
+- f[i] = d[2*i+1] + 2.;
+- }
+-}
+-int main()
+-{
+- double b[1024], d[2*1024], f[1024];
+- int i;
+-
+- check_vect ();
+-
+- for (i = 0; i < 2*1024; i++)
+- d[i] = 1.;
+- foo (b, d, f);
+- for (i = 0; i < 1024; i+= 2)
+- {
+- if (d[2*i] != 2.)
+- abort ();
+- if (d[2*i+1] != 4.)
+- abort ();
+- }
+- for (i = 0; i < 1024; i++)
+- {
+- if (b[i] != 1.)
+- abort ();
+- if (f[i] != 6.)
+- abort ();
+- }
+- return 0;
+-}
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_25.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_25.c
+deleted file mode 100644
+index 4d8b47ed9aaa..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_25.c
++++ /dev/null
+@@ -1,11 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* Disabling epilogues until we find a better way to deal with scans. */
+-/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#include "vect-peel-1-src.c"
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_26.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_26.c
+deleted file mode 100644
+index 47d2a50218bd..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_26.c
++++ /dev/null
+@@ -1,44 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-/* { dg-require-effective-target vect_perm } */
+-
+-#include "tree-vect.h"
+-
+-void __attribute__((noipa))
+-foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
+-{
+- int t1 = *c;
+- int t2 = *c;
+- for (int i = 0; i < 64; i+=2)
+- {
+- b[i] = a[i] - t1;
+- t1 = a[i];
+- b[i+1] = a[i+1] - t2;
+- t2 = a[i+1];
+- }
+-}
+-
+-int a[64], b[64];
+-
+-int
+-main ()
+-{
+- check_vect ();
+- for (int i = 0; i < 64; ++i)
+- {
+- a[i] = i;
+- __asm__ volatile ("" ::: "memory");
+- }
+- int c = 7;
+- foo (a, b, &c);
+- for (int i = 2; i < 64; i+=2)
+- if (b[i] != a[i] - a[i-2]
+- || b[i+1] != a[i+1] - a[i-1])
+- abort ();
+- if (b[0] != -7 || b[1] != -6)
+- abort ();
+- return 0;
+-}
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 2 "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_27.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_27.c
+deleted file mode 100644
+index ed7b31757a0c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_27.c
++++ /dev/null
+@@ -1,19 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-void abort ();
+-int a[128];
+-
+-int main ()
+-{
+- int i;
+- for (i = 1; i < 128; i++)
+- if (a[i] != i%4 + 1)
+- abort ();
+- if (a[0] != 5)
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_28.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_28.c
+deleted file mode 100644
+index 9c980b8453d9..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_28.c
++++ /dev/null
+@@ -1,16 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-void abort ();
+-int a[128];
+-int main ()
+-{
+- int i;
+- for (i = 1; i < 128; i++)
+- if (a[i] != i%4 + 1)
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_29.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_29.c
+deleted file mode 100644
+index b66fe204caee..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_29.c
++++ /dev/null
+@@ -1,17 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-int in[100];
+-int out[100 * 2];
+-
+-int main (void)
+-{
+- if (out[0] != in[100 - 1])
+- for (int i = 1; i <= 100; ++i)
+- if (out[i] != 2)
+- __builtin_abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_3.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_3.c
+deleted file mode 100644
+index 4afbc7266765..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_3.c
++++ /dev/null
+@@ -1,21 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+-
+-unsigned test4(char x, char *vect, int n)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < n; i++)
+- {
+- if (vect[i] > x)
+- return 1;
+-
+- vect[i] = x;
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_30.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_30.c
+deleted file mode 100644
+index 3f6e802ae8f0..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_30.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-int x[100];
+-int choose1(int);
+-int choose2();
+-void consume(int);
+-void f() {
+- for (int i = 0; i < 100; ++i) {
+- if (x[i] == 11) {
+- if (choose1(i))
+- goto A;
+- else
+- goto B;
+- }
+- }
+- if (choose2())
+- goto B;
+-A:
+- for (int i = 0; i < 100; ++i)
+- consume(i);
+-B:
+- for (int i = 0; i < 100; ++i)
+- consume(i * i);
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_31.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_31.c
+deleted file mode 100644
+index 1eaf52aaa852..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_31.c
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 1025
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i];
+- vect_a[i] = x;
+- ret += vect_a[i] + vect_b[i];
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_32.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_32.c
+deleted file mode 100644
+index 038be402c2b8..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_32.c
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 1024
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i];
+- vect_a[i] = x;
+- ret = vect_a[i] + vect_b[i];
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_33.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_33.c
+deleted file mode 100644
+index 74116143b260..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_33.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a2[N];
+-unsigned vect_a1[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x, int z)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a1[i]*2 > x)
+- {
+- for (int y = 0; y < z; y++)
+- vect_a2 [y] *= vect_a1[i];
+- break;
+- }
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 2 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_34.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_34.c
+deleted file mode 100644
+index 63f1bb4254c6..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_34.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-
+-unsigned vect_a[N] __attribute__ ((aligned (4)));;
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+-
+- for (int i = 1; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_35.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_35.c
+deleted file mode 100644
+index 4c0078fbc675..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_35.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a2[N];
+-unsigned vect_a1[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a1[i]*2 > x)
+- break;
+- vect_a1[i] = x;
+- if (vect_a2[i]*4 > x)
+- break;
+- vect_a2[i] = x*x;
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_36.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_36.c
+deleted file mode 100644
+index a83994035b9d..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_36.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a2[N];
+-unsigned vect_a1[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a1[i]*2 > x)
+- break;
+- vect_a1[i] = x;
+- if (vect_a2[i]*4 > x)
+- return i;
+- vect_a2[i] = x*x;
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_37.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_37.c
+deleted file mode 100644
+index b7559a9adc7c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_37.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 4
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 != x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
+deleted file mode 100644
+index 8062fbbf6422..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i+=2)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_39.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_39.c
+deleted file mode 100644
+index 9d3c6a5dffe3..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_39.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x, unsigned n)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i+= (N % 4))
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_4.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_4.c
+deleted file mode 100644
+index bd7107c1736c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_4.c
++++ /dev/null
+@@ -1,24 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 1024
+-unsigned vect[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- if (i > 16 && vect[i] > x)
+- break;
+-
+- vect[i] = x;
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_40.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_40.c
+deleted file mode 100644
+index 428f6249fa68..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_40.c
++++ /dev/null
+@@ -1,27 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i*=3)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* SCEV can't currently analyze this loop bounds. */
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_41.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_41.c
+deleted file mode 100644
+index 31a8ed2d3e2f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_41.c
++++ /dev/null
+@@ -1,25 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+-#pragma GCC novector
+-#pragma GCC unroll 4
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] += vect_a[i] + x;
+- }
+- return ret;
+-}
+-
+-/* novector should have blocked vectorization. */
+-/* { dg-final { scan-tree-dump-not "vectorized \d loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_42.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_42.c
+deleted file mode 100644
+index f1ee2f7e9a66..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_42.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 800
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_43.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_43.c
+deleted file mode 100644
+index 7e9f635a0b5a..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_43.c
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 802
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i+=2)
+- {
+- vect_b[i] = x + i;
+- vect_b[i+1] = x + i + 1;
+- if (vect_a[i]*2 > x)
+- break;
+- if (vect_a[i+1]*2 > x)
+- break;
+- vect_a[i] = x;
+- vect_a[i+1] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_44.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_44.c
+deleted file mode 100644
+index 7e9f635a0b5a..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_44.c
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 802
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i+=2)
+- {
+- vect_b[i] = x + i;
+- vect_b[i+1] = x + i + 1;
+- if (vect_a[i]*2 > x)
+- break;
+- if (vect_a[i+1]*2 > x)
+- break;
+- vect_a[i] = x;
+- vect_a[i+1] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_45.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_45.c
+deleted file mode 100644
+index 7031f237ecce..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_45.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i]*2 > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_46.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_46.c
+deleted file mode 100644
+index c9aad909ffd8..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_46.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-#include <complex.h>
+-
+-#define N 1024
+-complex double vect_a[N];
+-complex double vect_b[N];
+-
+-complex double test4(complex double x)
+-{
+- complex double ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] += x + i;
+- if (vect_a[i] == x)
+- return i;
+- vect_a[i] += x * vect_b[i];
+-
+- }
+- return ret;
+-}
+-
+-/* At -O2 we can't currently vectorize this because of the libcalls not being
+- lowered. */
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_47.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_47.c
+deleted file mode 100644
+index ef90380ea197..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_47.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-void abort ();
+-
+-float results1[16] = {192.00,240.00,288.00,336.00,384.00,432.00,480.00,528.00,0.00};
+-float results2[16] = {0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,54.00,120.00,198.00,288.00,390.00,504.00,630.00};
+-float a[16] = {0};
+-float e[16] = {0};
+-float b[16] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
+-int main1 ()
+-{
+- int i;
+- for (i=0; i<16; i++)
+- {
+- if (a[i] != results1[i] || e[i] != results2[i])
+- abort();
+- }
+-
+- if (a[i+3] != b[i-1])
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_48.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_48.c
+deleted file mode 100644
+index 0efbb2836bfd..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_48.c
++++ /dev/null
+@@ -1,14 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-int main (void)
+-{
+- signed char a[50], b[50], c[50];
+- for (int i = 0; i < 50; ++i)
+- if (a[i] != ((((signed int) -1 < 0 ? -126 : 4) + ((signed int) -1 < 0 ? -101 : 26) + i * 9 + 0) >> 1))
+- __builtin_abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_49.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_49.c
+deleted file mode 100644
+index 6c4ee40fd5d3..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_49.c
++++ /dev/null
+@@ -1,25 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-void abort();
+-struct foostr {
+- _Complex short f1;
+- _Complex short f2;
+-};
+-struct foostr a[16] __attribute__ ((__aligned__(16))) = {};
+-struct foostr c[16] __attribute__ ((__aligned__(16)));
+-struct foostr res[16] = {};
+-void
+-foo (void)
+-{
+- int i;
+- for (i = 0; i < 16; i++)
+- {
+- if (c[i].f1 != res[i].f1)
+- abort ();
+- if (c[i].f2 != res[i].f2)
+- abort ();
+- }
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_5.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_5.c
+deleted file mode 100644
+index 1468c795b620..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_5.c
++++ /dev/null
+@@ -1,25 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 1024
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- return vect_a[i];
+- vect_a[i] = x;
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_50.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_50.c
+deleted file mode 100644
+index b3cf2d7f05f0..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_50.c
++++ /dev/null
+@@ -1,18 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-extern void abort();
+-float a[1024], b[1024], c[1024], d[1024];
+-_Bool k[1024];
+-
+-int main ()
+-{
+- int i;
+- for (i = 0; i < 1024; i++)
+- if (k[i] != ((i % 3) == 0 && ((i / 9) % 3) == 0))
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_51.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_51.c
+deleted file mode 100644
+index c06eff5a385f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_51.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-int x_in[32];
+-int x_out_a[32], x_out_b[32];
+-int c[16] = {3,2,1,10,1,42,3,4,50,9,32,8,11,10,1,2};
+-int a[16 +1] = {0,16,32,48,64,128,256,512,0,16,32,48,64,128,256,512,1024};
+-int b[16 +1] = {17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1};
+-
+-void foo ()
+-{
+- int j, i, x;
+- int curr_a, flag, next_a, curr_b, next_b;
+- {
+- for (i = 0; i < 16; i++)
+- {
+- next_b = b[i+1];
+- curr_b = flag ? next_b : curr_b;
+- }
+- x_out_b[j] = curr_b;
+- }
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+\ No newline at end of file
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_52.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_52.c
+deleted file mode 100644
+index 86a632f2a822..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_52.c
++++ /dev/null
+@@ -1,21 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-void abort();
+-int main1 (short X)
+-{
+- unsigned char a[128];
+- unsigned short b[128];
+- unsigned int c[128];
+- short myX = X;
+- int i;
+- for (i = 0; i < 128; i++)
+- {
+- if (a[i] != (unsigned char)myX || b[i] != myX || c[i] != (unsigned int)myX++)
+- abort ();
+- }
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_53.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_53.c
+deleted file mode 100644
+index a02d5986ba3c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_53.c
++++ /dev/null
+@@ -1,18 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-void abort ();
+-int a[64], b[64];
+-int main ()
+-{
+- int c = 7;
+- for (int i = 1; i < 64; ++i)
+- if (b[i] != a[i] - a[i-1])
+- abort ();
+- if (b[0] != -7)
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_54.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_54.c
+deleted file mode 100644
+index bfc78c262751..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_54.c
++++ /dev/null
+@@ -1,30 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- unsigned tmp[N];
+- for (int i = 0; i < N; i++)
+- {
+- tmp[i] = x + i;
+- vect_b[i] = tmp[i];
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_55.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_55.c
+deleted file mode 100644
+index c2a823bff7a4..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_55.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- volatile unsigned tmp = x + i;
+- vect_b[i] = tmp;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_56.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_56.c
+deleted file mode 100644
+index 9096f66647c7..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_56.c
++++ /dev/null
+@@ -1,102 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* Disabling epilogues until we find a better way to deal with scans. */
+-/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+-/* { dg-require-effective-target vect_int } */
+-/* { dg-add-options bind_pic_locally } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-
+-#include <stdarg.h>
+-#include "tree-vect.h"
+-
+-#define N 32
+-
+-unsigned short sa[N];
+-unsigned short sc[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+-unsigned short sb[N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+-unsigned int ia[N];
+-unsigned int ic[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
+- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+-unsigned int ib[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
+- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+-
+-/* Current peeling-for-alignment scheme will consider the 'sa[i+7]'
+- access for peeling, and therefore will examine the option of
+- using a peeling factor = VF-7%VF. This will result in a peeling factor 1,
+- which will also align the access to 'ia[i+3]', and the loop could be
+- vectorized on all targets that support unaligned loads.
+- Without cost model on targets that support misaligned stores, no peeling
+- will be applied since we want to keep the four loads aligned. */
+-
+-__attribute__ ((noinline))
+-int main1 ()
+-{
+- int i;
+- int n = N - 7;
+-
+- /* Multiple types with different sizes, used in independent
+- copmutations. Vectorizable. */
+- for (i = 0; i < n; i++)
+- {
+- sa[i+7] = sb[i] + sc[i];
+- ia[i+3] = ib[i] + ic[i];
+- }
+-
+- /* check results: */
+- for (i = 0; i < n; i++)
+- {
+- if (sa[i+7] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
+- abort ();
+- }
+-
+- return 0;
+-}
+-
+-/* Current peeling-for-alignment scheme will consider the 'ia[i+3]'
+- access for peeling, and therefore will examine the option of
+- using a peeling factor = VF-3%VF. This will result in a peeling factor
+- 1 if VF=4,2. This will not align the access to 'sa[i+3]', for which we
+- need to peel 5,1 iterations for VF=4,2 respectively, so the loop can not
+- be vectorized. However, 'ia[i+3]' also gets aligned if we peel 5
+- iterations, so the loop is vectorizable on all targets that support
+- unaligned loads.
+- Without cost model on targets that support misaligned stores, no peeling
+- will be applied since we want to keep the four loads aligned. */
+-
+-__attribute__ ((noinline))
+-int main2 ()
+-{
+- int i;
+- int n = N-3;
+-
+- /* Multiple types with different sizes, used in independent
+- copmutations. Vectorizable. */
+- for (i = 0; i < n; i++)
+- {
+- ia[i+3] = ib[i] + ic[i];
+- sa[i+3] = sb[i] + sc[i];
+- }
+-
+- /* check results: */
+- for (i = 0; i < n; i++)
+- {
+- if (sa[i+3] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
+- abort ();
+- }
+-
+- return 0;
+-}
+-
+-int main (void)
+-{
+- check_vect ();
+-
+- main1 ();
+- main2 ();
+-
+- return 0;
+-}
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 2 loops" 2 "vect" { xfail { vect_early_break && { ! vect_hw_misalign } } } } } */
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_57.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_57.c
+deleted file mode 100644
+index 319bd125c315..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_57.c
++++ /dev/null
+@@ -1,32 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-/* { dg-final { scan-tree-dump "epilog loop required" "vect" } } */
+-
+-void abort ();
+-
+-unsigned short sa[32];
+-unsigned short sc[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+-unsigned short sb[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+-unsigned int ia[32];
+-unsigned int ic[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
+- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+-unsigned int ib[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
+- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+-
+-int main2 (int n)
+-{
+- int i;
+- for (i = 0; i < n; i++)
+- {
+- if (sa[i+3] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
+- abort ();
+- }
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_58.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_58.c
+deleted file mode 100644
+index 5f18f06d423f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_58.c
++++ /dev/null
+@@ -1,19 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-extern void abort();
+-float a[1024], b[1024], c[1024], d[1024];
+-_Bool k[1024];
+-
+-int main ()
+-{
+- int i;
+- for (i = 0; i < 1024; i++)
+- if (k[i] != ((i % 3) == 0))
+- abort ();
+-}
+-
+-/* Pattern didn't match inside gcond. */
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_59.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_59.c
+deleted file mode 100644
+index aec4ee457d78..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_59.c
++++ /dev/null
+@@ -1,18 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-extern void abort();
+-float a[1024], b[1024], c[1024], d[1024];
+-_Bool k[1024];
+-
+-int main ()
+-{
+- int i;
+- for (i = 0; i < 1024; i++)
+- if (k[i] != (i == 0))
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_6.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_6.c
+deleted file mode 100644
+index 7b870e9c60dc..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_6.c
++++ /dev/null
+@@ -1,27 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#define N 1024
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < (N/2); i+=2)
+- {
+- vect_b[i] = x + i;
+- vect_b[i+1] = x + i+1;
+- if (vect_a[i] > x || vect_a[i+1] > x)
+- break;
+- vect_a[i] += x * vect_b[i];
+- vect_a[i+1] += x * vect_b[i+1];
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_60.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_60.c
+deleted file mode 100644
+index 75b35f8d423f..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_60.c
++++ /dev/null
+@@ -1,18 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-extern void abort();
+-float a[1024], b[1024], c[1024], d[1024];
+-_Bool k[1024];
+-
+-int main ()
+-{
+- char i;
+- for (i = 0; i < 1024; i++)
+- if (k[i] != (i == 0))
+- abort ();
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" { xfail *-*-* } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_61.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_61.c
+deleted file mode 100644
+index c789ec01f32c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_61.c
++++ /dev/null
+@@ -1,18 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_float } */
+-
+-typedef float real_t;
+-__attribute__((aligned(64))) real_t a[32000], b[32000], c[32000];
+-real_t s482()
+-{
+- for (int nl = 0; nl < 10000; nl++) {
+- for (int i = 0; i < 32000; i++) {
+- a[i] += b[i] * c[i];
+- if (c[i] > b[i]) break;
+- }
+- }
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_62.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_62.c
+deleted file mode 100644
+index aaad62ef8d78..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_62.c
++++ /dev/null
+@@ -1,21 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-int a, b;
+-int e() {
+- int d, c;
+- d = 0;
+- for (; d < b; d++)
+- a = 0;
+- d = 0;
+- for (; d < b; d++)
+- if (d)
+- c++;
+- for (;;)
+- if (c)
+- break;
+-}
+-
+-/* { dg-final { scan-tree-dump "vectorized 1 loops in function" "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_63.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_63.c
+deleted file mode 100644
+index 1d9ff4ad6bac..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_63.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* Disabling epilogues until we find a better way to deal with scans. */
+-/* { dg-do compile } */
+-/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
+-/* { dg-require-effective-target vect_long } */
+-/* { dg-require-effective-target vect_shift } */
+-/* { dg-additional-options "-fno-tree-scev-cprop" } */
+-
+-/* Statement used outside the loop.
+- NOTE: SCEV disabled to ensure the live operation is not removed before
+- vectorization. */
+-__attribute__ ((noinline)) int
+-liveloop (int start, int n, int *x, int *y)
+-{
+- int i = start;
+- int j;
+- int ret;
+-
+- for (j = 0; j < n; ++j)
+- {
+- i += 1;
+- x[j] = i;
+- ret = y[j];
+- }
+- return ret;
+-}
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+-/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_64.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_64.c
+deleted file mode 100644
+index aaa2a46fb67e..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_64.c
++++ /dev/null
+@@ -1,18 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-/* { dg-additional-options "-fdump-tree-vect-all" } */
+-
+-int d(unsigned);
+-
+-void a() {
+- char b[8];
+- unsigned c = 0;
+- while (c < 7 && b[c])
+- ++c;
+- if (d(c))
+- return;
+-}
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_partial_vectors } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
+deleted file mode 100644
+index 23a8341b529d..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_65.c
++++ /dev/null
+@@ -1,20 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-/* { dg-options "-Ofast -fno-vect-cost-model -fdump-tree-vect-details" } */
+-
+-enum a { b };
+-
+-struct {
+- enum a c;
+-} d[10], *e;
+-
+-void f() {
+- int g;
+- for (g = 0, e = d; g < sizeof(1); g++, e++)
+- if (e->c)
+- return;
+-}
+-
+-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_66.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_66.c
+deleted file mode 100644
+index e54cc5e1260e..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_66.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-int a[0];
+-int b;
+-
+-void g();
+-
+-void f() {
+- int d, e;
+- for (; e; e++) {
+- int c;
+- switch (b)
+- case '9': {
+- for (; d < 1; d++)
+- if (a[d])
+- c = 1;
+- break;
+- case '<':
+- g();
+- c = 0;
+- }
+- while (c)
+- ;
+- }
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_67.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_67.c
+deleted file mode 100644
+index e9da46439f27..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_67.c
++++ /dev/null
+@@ -1,42 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target int32plus } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-
+-
+-int main()
+-{
+- int var6 = -1267827473;
+- do {
+- ++var6;
+- double s1_115[4], s2_108[4];
+- int var8 = -161498264;
+- do {
+- ++var8;
+- int var12 = 1260960076;
+- for (; var12 <= 1260960080; ++var12) {
+- int var13 = 1960990937;
+- do {
+- ++var13;
+- int var14 = 2128638723;
+- for (; var14 <= 2128638728; ++var14) {
+- int var22 = -1141190839;
+- do {
+- ++var22;
+- if (s2_108 > s1_115) {
+- int var23 = -890798748;
+- do {
+- long long e_119[4];
+- } while (var23 <= -890798746);
+- }
+- } while (var22 <= -1141190829);
+- }
+- } while (var13 <= 1960990946);
+- }
+- } while (var8 <= -161498254);
+- } while (var6 <= -1267827462);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_68.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_68.c
+deleted file mode 100644
+index dfa90b557e87..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_68.c
++++ /dev/null
+@@ -1,42 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 800
+-#endif
+-unsigned vect_a1[N];
+-unsigned vect_b1[N];
+-unsigned vect_c1[N];
+-unsigned vect_d1[N];
+-
+-unsigned vect_a2[N];
+-unsigned vect_b2[N];
+-unsigned vect_c2[N];
+-unsigned vect_d2[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b1[i] += x + i;
+- vect_c1[i] += x + i;
+- vect_d1[i] += x + i;
+- if (vect_a1[i]*2 != x)
+- break;
+- vect_a1[i] = x;
+-
+- vect_b2[i] += x + i;
+- vect_c2[i] += x + i;
+- vect_d2[i] += x + i;
+- if (vect_a2[i]*2 != x)
+- break;
+- vect_a2[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_69.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_69.c
+deleted file mode 100644
+index 916351a14ab4..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_69.c
++++ /dev/null
+@@ -1,80 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-# define BITSIZEOF_INT 32
+-# define BITSIZEOF_LONG 64
+-# define BITSIZEOF_LONG_LONG 64
+-
+-#define MAKE_FUNS(suffix, type) \
+-int my_ffs##suffix(type x) { \
+- int i; \
+- if (x == 0) \
+- return 0; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- break; \
+- return i + 1; \
+-} \
+- \
+-int my_clz##suffix(type x) { \
+- int i; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
+- break; \
+- return i; \
+-}
+-
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-
+-unsigned int ints[] = NUMS32;
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+- for (i = 0; i < N(ints); i++)
+- {
+- if (__builtin_ffs (ints[i]) != my_ffs (ints[i]))
+- abort ();
+- if (ints[i] != 0
+- && __builtin_clz (ints[i]) != my_clz (ints[i]))
+- abort ();
+- }
+-
+- exit (0);
+-}
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
+deleted file mode 100644
+index 8c86c5034d75..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_7.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include <complex.h>
+-
+-#define N 1024
+-complex double vect_a[N];
+-complex double vect_b[N];
+-
+-complex double test4(complex double x)
+-{
+- complex double ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] += x + i;
+- if (vect_a[i] == x)
+- break;
+- vect_a[i] += x * vect_b[i];
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_70.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_70.c
+deleted file mode 100644
+index 3dbedf610406..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_70.c
++++ /dev/null
+@@ -1,69 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-# define BITSIZEOF_INT 32
+-# define BITSIZEOF_LONG 64
+-# define BITSIZEOF_LONG_LONG 64
+-
+-#define MAKE_FUNS(suffix, type) \
+-__attribute__((noinline)) \
+-int my_clz##suffix(type x) { \
+- int i; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
+- break; \
+- return i; \
+-}
+-
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-
+-unsigned int ints[] = NUMS32;
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- for (i = 0; i < N(ints); i++)
+- {
+- if (ints[i] != 0
+- && __builtin_clz (ints[i]) != my_clz (ints[i]))
+- abort ();
+- }
+-
+- exit (0);
+- return 0;
+-}
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_71.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_71.c
+deleted file mode 100644
+index b15c8de3ed75..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_71.c
++++ /dev/null
+@@ -1,71 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-# define BITSIZEOF_INT 32
+-# define BITSIZEOF_LONG 64
+-# define BITSIZEOF_LONG_LONG 64
+-
+-#define MAKE_FUNS(suffix, type) \
+-__attribute__((noinline)) \
+-int my_ffs##suffix(type x) { \
+- int i; \
+- if (x == 0) \
+- return 0; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- break; \
+- return i + 1; \
+-}
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-
+-unsigned int ints[] = NUMS32;
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+-#pragma GCC novector
+- for (i = 0; i < N(ints); i++)
+- {
+- if (__builtin_ffs (ints[i]) != my_ffs (ints[i]))
+- abort ();
+- }
+-
+- exit (0);
+-}
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_72.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_72.c
+deleted file mode 100644
+index c6d1e9f5fd26..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_72.c
++++ /dev/null
+@@ -1,151 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-#if __INT_MAX__ > 2147483647L
+-# if __INT_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_INT 64
+-# else
+-# define BITSIZEOF_INT 32
+-# endif
+-#else
+-# if __INT_MAX__ >= 2147483647L
+-# define BITSIZEOF_INT 32
+-# else
+-# define BITSIZEOF_INT 16
+-# endif
+-#endif
+-
+-#if __LONG_MAX__ > 2147483647L
+-# if __LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG 64
+-# else
+-# define BITSIZEOF_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG 32
+-#endif
+-
+-#if __LONG_LONG_MAX__ > 2147483647L
+-# if __LONG_LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG_LONG 64
+-# else
+-# define BITSIZEOF_LONG_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG_LONG 32
+-#endif
+-
+-#define MAKE_FUNS(suffix, type) \
+-__attribute__((noinline)) \
+-int my_ctz##suffix(type x) { \
+- int i; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- break; \
+- return i; \
+-}
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS16 \
+- { \
+- 0x0000U, \
+- 0x0001U, \
+- 0x8000U, \
+- 0x0002U, \
+- 0x4000U, \
+- 0x0100U, \
+- 0x0080U, \
+- 0xa5a5U, \
+- 0x5a5aU, \
+- 0xcafeU, \
+- 0xffffU \
+- }
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-#define NUMS64 \
+- { \
+- 0x0000000000000000ULL, \
+- 0x0000000000000001ULL, \
+- 0x8000000000000000ULL, \
+- 0x0000000000000002ULL, \
+- 0x4000000000000000ULL, \
+- 0x0000000100000000ULL, \
+- 0x0000000080000000ULL, \
+- 0xa5a5a5a5a5a5a5a5ULL, \
+- 0x5a5a5a5a5a5a5a5aULL, \
+- 0xcafecafe00000000ULL, \
+- 0x0000cafecafe0000ULL, \
+- 0x00000000cafecafeULL, \
+- 0xffffffffffffffffULL \
+- }
+-
+-unsigned int ints[] =
+-#if BITSIZEOF_INT == 64
+-NUMS64;
+-#elif BITSIZEOF_INT == 32
+-NUMS32;
+-#else
+-NUMS16;
+-#endif
+-
+-unsigned long longs[] =
+-#if BITSIZEOF_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-unsigned long long longlongs[] =
+-#if BITSIZEOF_LONG_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+-#pragma GCC novector
+- for (i = 0; i < N(ints); i++)
+- {
+- if (ints[i] != 0
+- && __builtin_ctz (ints[i]) != my_ctz (ints[i]))
+- abort ();
+- }
+-
+- exit (0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_73.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_73.c
+deleted file mode 100644
+index 7f40dd07e543..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_73.c
++++ /dev/null
+@@ -1,71 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-# define BITSIZEOF_INT 32
+-# define BITSIZEOF_LONG 64
+-# define BITSIZEOF_LONG_LONG 64
+-
+-#define MAKE_FUNS(suffix, type) \
+-__attribute__((noinline)) \
+-int my_clz##suffix(type x) { \
+- int i; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
+- break; \
+- return i; \
+-}
+-
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-
+-unsigned int ints[] = NUMS32;
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+-#pragma GCC novector
+- for (i = 0; i < N(ints); i++)
+- {
+- if (ints[i] != 0
+- && __builtin_clz (ints[i]) != my_clz (ints[i]))
+- abort ();
+- }
+-
+- exit (0);
+-}
+-
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_74.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_74.c
+deleted file mode 100644
+index afd238618b30..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_74.c
++++ /dev/null
+@@ -1,165 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-#if __INT_MAX__ > 2147483647L
+-# if __INT_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_INT 64
+-# else
+-# define BITSIZEOF_INT 32
+-# endif
+-#else
+-# if __INT_MAX__ >= 2147483647L
+-# define BITSIZEOF_INT 32
+-# else
+-# define BITSIZEOF_INT 16
+-# endif
+-#endif
+-
+-#if __LONG_MAX__ > 2147483647L
+-# if __LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG 64
+-# else
+-# define BITSIZEOF_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG 32
+-#endif
+-
+-#if __LONG_LONG_MAX__ > 2147483647L
+-# if __LONG_LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG_LONG 64
+-# else
+-# define BITSIZEOF_LONG_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG_LONG 32
+-#endif
+-
+-#define MAKE_FUNS(suffix, type) \
+-int my_clrsb##suffix(type x) { \
+- int i; \
+- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
+- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
+- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
+- != leading) \
+- break; \
+- return i - 1; \
+-}
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS16 \
+- { \
+- 0x0000U, \
+- 0x0001U, \
+- 0x8000U, \
+- 0x0002U, \
+- 0x4000U, \
+- 0x0100U, \
+- 0x0080U, \
+- 0xa5a5U, \
+- 0x5a5aU, \
+- 0xcafeU, \
+- 0xffffU \
+- }
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-#define NUMS64 \
+- { \
+- 0x0000000000000000ULL, \
+- 0x0000000000000001ULL, \
+- 0x8000000000000000ULL, \
+- 0x0000000000000002ULL, \
+- 0x4000000000000000ULL, \
+- 0x0000000100000000ULL, \
+- 0x0000000080000000ULL, \
+- 0xa5a5a5a5a5a5a5a5ULL, \
+- 0x5a5a5a5a5a5a5a5aULL, \
+- 0xcafecafe00000000ULL, \
+- 0x0000cafecafe0000ULL, \
+- 0x00000000cafecafeULL, \
+- 0xffffffffffffffffULL \
+- }
+-
+-unsigned int ints[] =
+-#if BITSIZEOF_INT == 64
+-NUMS64;
+-#elif BITSIZEOF_INT == 32
+-NUMS32;
+-#else
+-NUMS16;
+-#endif
+-
+-unsigned long longs[] =
+-#if BITSIZEOF_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-unsigned long long longlongs[] =
+-#if BITSIZEOF_LONG_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+- /* Test constant folding. */
+-
+-#define TEST(x, suffix) \
+- if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
+- abort ();
+-
+-#if BITSIZEOF_INT == 32
+- TEST(0x00000000UL,);
+- TEST(0x00000001UL,);
+- TEST(0x80000000UL,);
+- TEST(0x40000000UL,);
+- TEST(0x00010000UL,);
+- TEST(0x00008000UL,);
+- TEST(0xa5a5a5a5UL,);
+- TEST(0x5a5a5a5aUL,);
+- TEST(0xcafe0000UL,);
+- TEST(0x00cafe00UL,);
+- TEST(0x0000cafeUL,);
+- TEST(0xffffffffUL,);
+-#endif
+-
+- exit (0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
+deleted file mode 100644
+index ed27f8635730..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_75.c
++++ /dev/null
+@@ -1,234 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-O3" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-#if __INT_MAX__ > 2147483647L
+-# if __INT_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_INT 64
+-# else
+-# define BITSIZEOF_INT 32
+-# endif
+-#else
+-# if __INT_MAX__ >= 2147483647L
+-# define BITSIZEOF_INT 32
+-# else
+-# define BITSIZEOF_INT 16
+-# endif
+-#endif
+-
+-#if __LONG_MAX__ > 2147483647L
+-# if __LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG 64
+-# else
+-# define BITSIZEOF_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG 32
+-#endif
+-
+-#if __LONG_LONG_MAX__ > 2147483647L
+-# if __LONG_LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG_LONG 64
+-# else
+-# define BITSIZEOF_LONG_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG_LONG 32
+-#endif
+-
+-#define MAKE_FUNS(suffix, type) \
+-__attribute__((noinline)) \
+-int my_ffs##suffix(type x) { \
+- int i; \
+- if (x == 0) \
+- return 0; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- break; \
+- return i + 1; \
+-} \
+- \
+-int my_ctz##suffix(type x) { \
+- int i; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- break; \
+- return i; \
+-} \
+- \
+-__attribute__((noinline)) \
+-int my_clz##suffix(type x) { \
+- int i; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
+- break; \
+- return i; \
+-} \
+- \
+-int my_clrsb##suffix(type x) { \
+- int i; \
+- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
+- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
+- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
+- != leading) \
+- break; \
+- return i - 1; \
+-} \
+- \
+-__attribute__((noinline)) \
+-int my_popcount##suffix(type x) { \
+- int i; \
+- int count = 0; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- count++; \
+- return count; \
+-} \
+- \
+-__attribute__((noinline)) \
+-int my_parity##suffix(type x) { \
+- int i; \
+- int count = 0; \
+- for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
+- if (x & ((type) 1 << i)) \
+- count++; \
+- return count & 1; \
+-}
+-
+-MAKE_FUNS (ll, unsigned long long);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS16 \
+- { \
+- 0x0000U, \
+- 0x0001U, \
+- 0x8000U, \
+- 0x0002U, \
+- 0x4000U, \
+- 0x0100U, \
+- 0x0080U, \
+- 0xa5a5U, \
+- 0x5a5aU, \
+- 0xcafeU, \
+- 0xffffU \
+- }
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-#define NUMS64 \
+- { \
+- 0x0000000000000000ULL, \
+- 0x0000000000000001ULL, \
+- 0x8000000000000000ULL, \
+- 0x0000000000000002ULL, \
+- 0x4000000000000000ULL, \
+- 0x0000000100000000ULL, \
+- 0x0000000080000000ULL, \
+- 0xa5a5a5a5a5a5a5a5ULL, \
+- 0x5a5a5a5a5a5a5a5aULL, \
+- 0xcafecafe00000000ULL, \
+- 0x0000cafecafe0000ULL, \
+- 0x00000000cafecafeULL, \
+- 0xffffffffffffffffULL \
+- }
+-
+-unsigned int ints[] =
+-#if BITSIZEOF_INT == 64
+-NUMS64;
+-#elif BITSIZEOF_INT == 32
+-NUMS32;
+-#else
+-NUMS16;
+-#endif
+-
+-unsigned long longs[] =
+-#if BITSIZEOF_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-unsigned long long longlongs[] =
+-#if BITSIZEOF_LONG_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+-#pragma GCC novector
+- for (i = 0; i < N(longlongs); i++)
+- {
+- if (__builtin_ffsll (longlongs[i]) != my_ffsll (longlongs[i]))
+- abort ();
+- if (longlongs[i] != 0
+- && __builtin_clzll (longlongs[i]) != my_clzll (longlongs[i]))
+- abort ();
+- if (longlongs[i] != 0
+- && __builtin_ctzll (longlongs[i]) != my_ctzll (longlongs[i]))
+- abort ();
+- if (__builtin_clrsbll (longlongs[i]) != my_clrsbll (longlongs[i]))
+- abort ();
+- if (__builtin_popcountll (longlongs[i]) != my_popcountll (longlongs[i]))
+- abort ();
+- if (__builtin_parityll (longlongs[i]) != my_parityll (longlongs[i]))
+- abort ();
+- }
+-
+- /* Test constant folding. */
+-
+-#define TEST(x, suffix) \
+- if (__builtin_ffs##suffix (x) != my_ffs##suffix (x)) \
+- abort (); \
+-
+-#if BITSIZEOF_LONG_LONG == 64
+- TEST(0x0000000000000000ULL, ll);
+- TEST(0x0000000000000001ULL, ll);
+- TEST(0x8000000000000000ULL, ll);
+- TEST(0x0000000000000002ULL, ll);
+- TEST(0x4000000000000000ULL, ll);
+- TEST(0x0000000100000000ULL, ll);
+- TEST(0x0000000080000000ULL, ll);
+- TEST(0xa5a5a5a5a5a5a5a5ULL, ll);
+- TEST(0x5a5a5a5a5a5a5a5aULL, ll);
+- TEST(0xcafecafe00000000ULL, ll);
+- TEST(0x0000cafecafe0000ULL, ll);
+- TEST(0x00000000cafecafeULL, ll);
+- TEST(0xffffffffffffffffULL, ll);
+-#endif
+-
+- exit (0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_76.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_76.c
+deleted file mode 100644
+index a7d8e279c670..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_76.c
++++ /dev/null
+@@ -1,169 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-O3" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-#if __INT_MAX__ > 2147483647L
+-# if __INT_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_INT 64
+-# else
+-# define BITSIZEOF_INT 32
+-# endif
+-#else
+-# if __INT_MAX__ >= 2147483647L
+-# define BITSIZEOF_INT 32
+-# else
+-# define BITSIZEOF_INT 16
+-# endif
+-#endif
+-
+-#if __LONG_MAX__ > 2147483647L
+-# if __LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG 64
+-# else
+-# define BITSIZEOF_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG 32
+-#endif
+-
+-#if __LONG_LONG_MAX__ > 2147483647L
+-# if __LONG_LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG_LONG 64
+-# else
+-# define BITSIZEOF_LONG_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG_LONG 32
+-#endif
+-
+-#define MAKE_FUNS(suffix, type) \
+-int my_clrsb##suffix(type x) { \
+- int i; \
+- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
+- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
+- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
+- != leading) \
+- break; \
+- return i - 1; \
+-} \
+- \
+-
+-MAKE_FUNS (, unsigned);
+-MAKE_FUNS (ll, unsigned long long);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-#define NUMS16 \
+- { \
+- 0x0000U, \
+- 0x0001U, \
+- 0x8000U, \
+- 0x0002U, \
+- 0x4000U, \
+- 0x0100U, \
+- 0x0080U, \
+- 0xa5a5U, \
+- 0x5a5aU, \
+- 0xcafeU, \
+- 0xffffU \
+- }
+-
+-#define NUMS32 \
+- { \
+- 0x00000000UL, \
+- 0x00000001UL, \
+- 0x80000000UL, \
+- 0x00000002UL, \
+- 0x40000000UL, \
+- 0x00010000UL, \
+- 0x00008000UL, \
+- 0xa5a5a5a5UL, \
+- 0x5a5a5a5aUL, \
+- 0xcafe0000UL, \
+- 0x00cafe00UL, \
+- 0x0000cafeUL, \
+- 0xffffffffUL \
+- }
+-
+-#define NUMS64 \
+- { \
+- 0x0000000000000000ULL, \
+- 0x0000000000000001ULL, \
+- 0x8000000000000000ULL, \
+- 0x0000000000000002ULL, \
+- 0x4000000000000000ULL, \
+- 0x0000000100000000ULL, \
+- 0x0000000080000000ULL, \
+- 0xa5a5a5a5a5a5a5a5ULL, \
+- 0x5a5a5a5a5a5a5a5aULL, \
+- 0xcafecafe00000000ULL, \
+- 0x0000cafecafe0000ULL, \
+- 0x00000000cafecafeULL, \
+- 0xffffffffffffffffULL \
+- }
+-
+-unsigned int ints[] =
+-#if BITSIZEOF_INT == 64
+-NUMS64;
+-#elif BITSIZEOF_INT == 32
+-NUMS32;
+-#else
+-NUMS16;
+-#endif
+-
+-unsigned long longs[] =
+-#if BITSIZEOF_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-unsigned long long longlongs[] =
+-#if BITSIZEOF_LONG_LONG == 64
+-NUMS64;
+-#else
+-NUMS32;
+-#endif
+-
+-#define N(table) (sizeof (table) / sizeof (table[0]))
+-
+-int
+-main (void)
+-{
+- int i;
+-
+- check_vect ();
+-
+-#pragma GCC novector
+- for (i = 0; i < N(ints); i++)
+- {
+- if (__builtin_clrsb (ints[i]) != my_clrsb (ints[i]))
+- abort ();
+- }
+-
+- /* Test constant folding. */
+-
+-#define TEST(x, suffix) \
+- if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
+- abort ();
+-
+-#if BITSIZEOF_LONG_LONG == 64
+- TEST(0xffffffffffffffffULL, ll);
+- TEST(0xffffffffffffffffULL, ll);
+- TEST(0xffffffffffffffffULL, ll);
+- TEST(0xffffffffffffffffULL, ll);
+- TEST(0xffffffffffffffffULL, ll);
+- TEST(0xffffffffffffffffULL, ll);
+-#endif
+-
+- exit (0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
+deleted file mode 100644
+index 225106aab0a3..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_77.c
++++ /dev/null
+@@ -1,34 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-O3" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-double x[1024];
+-int a[1024];
+-double __attribute__((noipa)) foo ()
+-{
+- double sum = 0.0;
+- for (int i = 0 ; i < 1023; ++i)
+- {
+- sum += x[i];
+- if (a[i])
+- break;
+- }
+- return sum;
+-}
+-
+-int main()
+-{
+- check_vect ();
+-
+- for (int i = 0; i < 1024; ++i)
+- x[i] = i;
+- a[19] = 1;
+- if (foo () != 190.)
+- __builtin_abort ();
+- return 0;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_78.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_78.c
+deleted file mode 100644
+index f93babc069e1..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_78.c
++++ /dev/null
+@@ -1,77 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-O3" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <limits.h>
+-#include <assert.h>
+-
+-#include "tree-vect.h"
+-
+-#if __INT_MAX__ > 2147483647L
+-# if __INT_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_INT 64
+-# else
+-# define BITSIZEOF_INT 32
+-# endif
+-#else
+-# if __INT_MAX__ >= 2147483647L
+-# define BITSIZEOF_INT 32
+-# else
+-# define BITSIZEOF_INT 16
+-# endif
+-#endif
+-
+-#if __LONG_MAX__ > 2147483647L
+-# if __LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG 64
+-# else
+-# define BITSIZEOF_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG 32
+-#endif
+-
+-#if __LONG_LONG_MAX__ > 2147483647L
+-# if __LONG_LONG_MAX__ >= 9223372036854775807L
+-# define BITSIZEOF_LONG_LONG 64
+-# else
+-# define BITSIZEOF_LONG_LONG 32
+-# endif
+-#else
+-# define BITSIZEOF_LONG_LONG 32
+-#endif
+-
+-#define MAKE_FUNS(suffix, type) \
+-int my_clrsb##suffix(type x) { \
+- int i; \
+- int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
+- for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
+- if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
+- != leading) \
+- break; \
+- return i - 1; \
+-}
+-
+-MAKE_FUNS (, unsigned);
+-
+-extern void abort (void);
+-extern void exit (int);
+-
+-
+-int
+-main (void)
+-{
+- check_vect ();
+-
+-#define TEST(x, suffix) \
+- if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
+- abort ();
+-
+-#if BITSIZEOF_INT == 32
+- TEST(0xffffffffUL,);
+-#endif
+- exit (0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_79.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_79.c
+deleted file mode 100644
+index 3f21be762514..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_79.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+-
+-#undef N
+-#define N 32
+-
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < 1024; i++)
+- {
+- vect_b[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_8.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_8.c
+deleted file mode 100644
+index 84e19423e2e6..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_8.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+-
+-#include <complex.h>
+-
+-#define N 1024
+-char vect_a[N];
+-char vect_b[N];
+-
+-char test4(char x, char * restrict res)
+-{
+- char ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_b[i] += x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] += x * vect_b[i];
+- res[i] *= vect_b[i];
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_80.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_80.c
+deleted file mode 100644
+index 7f563b788ac7..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_80.c
++++ /dev/null
+@@ -1,49 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-extern void abort ();
+-
+-int x;
+-__attribute__ ((noinline, noipa))
+-void foo (int *a, int *b)
+-{
+- int local_x = x;
+- for (int i = 0; i < 1024; ++i)
+- {
+- if (i + local_x == 13)
+- break;
+- a[i] = 2 * b[i];
+- }
+-}
+-
+-int main ()
+-{
+-
+- check_vect ();
+-
+- int a[1024] = {0};
+- int b[1024] = {0};
+-
+- for (int i = 0; i < 1024; i++)
+- b[i] = i;
+-
+- x = -512;
+- foo (a, b);
+-
+- if (a[524] != 1048)
+- abort ();
+-
+- if (a[525] != 0)
+- abort ();
+-
+- if (a[1023] != 0)
+- abort ();
+- return 0;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_81.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_81.c
+deleted file mode 100644
+index 8a8c076ba92c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_81.c
++++ /dev/null
+@@ -1,31 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-/* { dg-final { scan-tree-dump "epilog loop required" "vect" } } */
+-void abort ();
+-
+-unsigned short sa[32];
+-unsigned short sc[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+-unsigned short sb[32] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
+- 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+-unsigned int ia[32];
+-unsigned int ic[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
+- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+-unsigned int ib[32] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,
+- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+-
+-int main2 (int n)
+-{
+- int i;
+- for (i = 0; i < n - 3; i++)
+- {
+- if (sa[i+3] != sb[i] + sc[i] || ia[i+3] != ib[i] + ic[i])
+- abort ();
+- }
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
+deleted file mode 100644
+index 0e9b2d8d385c..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_82.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include <complex.h>
+-
+-#define N 1024
+-complex double vect_a[N];
+-complex double vect_b[N];
+-
+-complex double test4(complex double x, complex double t)
+-{
+- complex double ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_a[i] = t + i;
+- if (vect_a[i] == x)
+- return i;
+- vect_a[i] += x * vect_a[i];
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_83.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_83.c
+deleted file mode 100644
+index 8b0e3fd6c5f5..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_83.c
++++ /dev/null
+@@ -1,29 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
+-
+-#include <complex.h>
+-
+-#define N 1024
+-complex double vect_a[N];
+-complex double vect_b[N];
+-
+-complex double test4(complex double x)
+-{
+- complex double ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- volatile complex double z = vect_b[i];
+- vect_b[i] = x + i + z;
+- if (vect_a[i] == x)
+- return i;
+- vect_a[i] += x * vect_b[i];
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_84.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_84.c
+deleted file mode 100644
+index 242ba453533e..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_84.c
++++ /dev/null
+@@ -1,44 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include <stdbool.h>
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 17
+-#endif
+-bool vect_a[N] = { false, false, true, false, false, false,
+- false, false, false, false, false, false,
+- false, false, false, false, false };
+-unsigned vect_b[N] = { 0 };
+-
+-__attribute__ ((noinline, noipa))
+-unsigned test4(bool x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- if (vect_a[i] == x)
+- return 1;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- if (test4 (true) != 1)
+- abort ();
+-
+- if (vect_b[2] != 0 && vect_b[1] == 0)
+- abort ();
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_85.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_85.c
+deleted file mode 100644
+index 3df376935735..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_85.c
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 5
+-#endif
+-int vect_a[N] = { 5, 4, 8, 4, 6 };
+-unsigned vect_b[N] = { 0 };
+-
+-__attribute__ ((noinline, noipa))
+-unsigned test4(int x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- if (vect_a[i] > x)
+- return 1;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- if (test4 (7) != 1)
+- abort ();
+-
+- if (vect_b[2] != 0 && vect_b[1] == 0)
+- abort ();
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_86.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_86.c
+deleted file mode 100644
+index 85c0d3a92772..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_86.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-additional-options "-std=gnu89" } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include "tree-vect.h"
+-
+-extern void abort ();
+-extern void exit (int);
+-
+-__attribute__((noinline, noipa))
+-int f(x) {
+- int i;
+- for (i = 0; i < 8 && (x & 1) == 1; i++)
+- x >>= 1;
+- return i;
+-}
+-main() {
+- check_vect ();
+-
+- if (f(4) != 0)
+- abort();
+- exit(0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_87.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_87.c
+deleted file mode 100644
+index 3dce0c439bff..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_87.c
++++ /dev/null
+@@ -1,26 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-additional-options "-std=gnu89" } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
+-
+-#include "tree-vect.h"
+-
+-extern void abort ();
+-extern void exit (int);
+-
+-__attribute__((noinline, noipa))
+-int f(x) {
+- int i;
+- for (i = 0; i < 8 && (x & 1) == 0; i++)
+- x >>= 1;
+- return i;
+-}
+-main() {
+- check_vect ();
+-
+- if (f(4) != 2)
+- abort();
+- exit(0);
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
+deleted file mode 100644
+index b392dd465539..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_88.c
++++ /dev/null
+@@ -1,41 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast --param vect-partial-vector-usage=2" } */
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 5
+-#endif
+-float vect_a[N] = { 5.1f, 4.2f, 8.0f, 4.25f, 6.5f };
+-unsigned vect_b[N] = { 0 };
+-
+-__attribute__ ((noinline, noipa))
+-unsigned test4(double x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- if (test4 (7.0) != 0)
+- abort ();
+-
+- if (vect_b[2] != 0 && vect_b[1] == 0)
+- abort ();
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_89.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_89.c
+deleted file mode 100644
+index 39b6313b3a15..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_89.c
++++ /dev/null
+@@ -1,21 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_int } */
+-/* { dg-additional-options "-w" } */
+-
+-char *a;
+-extern void d();
+-void b() {
+- int c = 0;
+- while (c < 16) {
+- switch (a[c]) {
+- case '"':
+- case '\'':
+- c++;
+- continue;
+- }
+- break;
+- }
+- if (c)
+- d();
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_9.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_9.c
+deleted file mode 100644
+index 12f09c61c331..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_9.c
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-do compile } */
+-/* { dg-require-effective-target vect_early_break } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-additional-options "-Ofast" } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#ifndef N
+-#define N 803
+-#endif
+-unsigned vect_a[N];
+-unsigned vect_b[N];
+-
+-unsigned test4(unsigned x)
+-{
+- unsigned ret = 0;
+- for (int i = 0; i < N; i++)
+- {
+- vect_a[i] = x + i;
+- if (vect_a[i] > x)
+- break;
+- vect_a[i] = x;
+-
+- }
+- return ret;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_90.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_90.c
+deleted file mode 100644
+index ac390b6ede47..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_90.c
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 30
+-#endif
+-
+-#ifndef IDX
+-#define IDX 1
+-#endif
+-
+-int n_earlyclobbers;
+-
+-typedef void* rtx;
+-rtx reload_earlyclobbers[N] = {0};
+-
+-rtx foo = (void*)0xbadf00d;
+-
+-int
+-__attribute__((noinline, noipa))
+-earlyclobber_operand_p (rtx x)
+-{
+- int i;
+-
+- for (i = 0; i < n_earlyclobbers; i++)
+- if (reload_earlyclobbers[i] == x)
+- return 1;
+-
+- return 0;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- n_earlyclobbers = IDX;
+- if (earlyclobber_operand_p (foo))
+- abort ();
+-
+- return 0;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_91.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_91.c
+deleted file mode 100644
+index 4b1c558f8a33..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_91.c
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 30
+-#endif
+-
+-#ifndef IDX
+-#define IDX 0
+-#endif
+-
+-int n_earlyclobbers;
+-
+-typedef void* rtx;
+-rtx reload_earlyclobbers[N] = {0};
+-
+-rtx foo = (void*)0xbadf00d;
+-
+-int
+-__attribute__((noinline, noipa))
+-earlyclobber_operand_p (rtx x)
+-{
+- int i;
+-
+- for (i = 0; i < n_earlyclobbers; i++)
+- if (reload_earlyclobbers[i] == x)
+- return 1;
+-
+- return 0;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- n_earlyclobbers = IDX;
+- if (earlyclobber_operand_p (foo))
+- abort ();
+-
+- return 0;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_92.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_92.c
+deleted file mode 100644
+index 1b2403b338fd..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_92.c
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 30
+-#endif
+-
+-#ifndef IDX
+-#define IDX 15
+-#endif
+-
+-int n_earlyclobbers;
+-
+-typedef void* rtx;
+-rtx reload_earlyclobbers[N] = {0};
+-
+-rtx foo = (void*)0xbadf00d;
+-
+-int
+-__attribute__((noinline, noipa))
+-earlyclobber_operand_p (rtx x)
+-{
+- int i;
+-
+- for (i = 0; i < n_earlyclobbers; i++)
+- if (reload_earlyclobbers[i] == x)
+- return 1;
+-
+- return 0;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- n_earlyclobbers = IDX;
+- if (earlyclobber_operand_p (foo))
+- abort ();
+-
+- return 0;
+-}
+diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_93.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
+deleted file mode 100644
+index 656a7788896d..000000000000
+--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_93.c
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/* { dg-add-options vect_early_break } */
+-/* { dg-require-effective-target vect_early_break_hw } */
+-/* { dg-require-effective-target vect_int } */
+-
+-/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+-
+-#include "tree-vect.h"
+-
+-#ifndef N
+-#define N 30
+-#endif
+-
+-#ifndef IDX
+-#define IDX 29
+-#endif
+-
+-int n_earlyclobbers;
+-
+-typedef void* rtx;
+-rtx reload_earlyclobbers[N] = {0};
+-
+-rtx foo = (void*)0xbadf00d;
+-
+-int
+-__attribute__((noinline, noipa))
+-earlyclobber_operand_p (rtx x)
+-{
+- int i;
+-
+- for (i = 0; i < n_earlyclobbers; i++)
+- if (reload_earlyclobbers[i] == x)
+- return 1;
+-
+- return 0;
+-}
+-
+-extern void abort ();
+-
+-int main ()
+-{
+- check_vect ();
+-
+- n_earlyclobbers = IDX;
+- if (earlyclobber_operand_p (foo))
+- abort ();
+-
+- return 0;
+-}
+diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
+index 05fc417877bc..7f13ff0ca565 100644
+--- a/gcc/testsuite/lib/target-supports.exp
++++ b/gcc/testsuite/lib/target-supports.exp
+@@ -4050,44 +4050,6 @@ proc check_effective_target_vect_int { } {
+ }}]
+ }
+
+-# Return 1 if the target supports vectorization of early breaks,
+-# 0 otherwise.
+-#
+-# This won't change for different subtargets so cache the result.
+-
+-proc check_effective_target_vect_early_break { } {
+- return [check_cached_effective_target_indexed vect_early_break {
+- expr {
+- [istarget aarch64*-*-*]
+- || [check_effective_target_sse4]
+- }}]
+-}
+-
+-# Return 1 if the target supports hardware execution of early breaks,
+-# 0 otherwise.
+-#
+-# This won't change for different subtargets so cache the result.
+-
+-proc check_effective_target_vect_early_break_hw { } {
+- return [check_cached_effective_target_indexed vect_early_break_hw {
+- expr {
+- [istarget aarch64*-*-*]
+- || [check_sse4_hw_available]
+- }}]
+-}
+-
+-proc add_options_for_vect_early_break { flags } {
+- if { ! [check_effective_target_vect_early_break] } {
+- return "$flags"
+- }
+-
+- if { [check_effective_target_sse4] } {
+- return "$flags -msse4.1"
+- }
+-
+- return "$flags"
+-}
+-
+ # Return 1 if the target supports hardware vectorization of complex additions of
+ # byte, 0 otherwise.
+ #
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch b/14.0.0/gentoo/78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
new file mode 100644
index 0000000..42a06f1
--- /dev/null
+++ b/14.0.0/gentoo/78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
@@ -0,0 +1,320 @@
+From d85db7a7354005e99a143453e103f784614cef0e Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:13 +0000
+Subject: [PATCH 4/7] Revert "AArch64: Add implementation for vector cbranch
+ for Advanced SIMD"
+
+This reverts commit 1bcc07aeb47c0ed7eb50eac8a4e057d6336669ab.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/config/aarch64/aarch64-simd.md | 42 ------
+ .../aarch64/sve/vect-early-break-cbranch.c | 108 ---------------
+ .../aarch64/vect-early-break-cbranch.c | 124 ------------------
+ 3 files changed, 274 deletions(-)
+ delete mode 100644 gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
+ delete mode 100644 gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
+
+diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md
+index f88b5bde254e..7c5fd4238357 100644
+--- a/gcc/config/aarch64/aarch64-simd.md
++++ b/gcc/config/aarch64/aarch64-simd.md
+@@ -3885,48 +3885,6 @@ (define_expand "vcond_mask_<mode><v_int_equiv>"
+ DONE;
+ })
+
+-;; Patterns comparing two vectors and conditionally jump
+-
+-(define_expand "cbranch<mode>4"
+- [(set (pc)
+- (if_then_else
+- (match_operator 0 "aarch64_equality_operator"
+- [(match_operand:VDQ_I 1 "register_operand")
+- (match_operand:VDQ_I 2 "aarch64_simd_reg_or_zero")])
+- (label_ref (match_operand 3 ""))
+- (pc)))]
+- "TARGET_SIMD"
+-{
+- auto code = GET_CODE (operands[0]);
+- rtx tmp = operands[1];
+-
+- /* If comparing against a non-zero vector we have to do a comparison first
+- so we can have a != 0 comparison with the result. */
+- if (operands[2] != CONST0_RTX (<MODE>mode))
+- {
+- tmp = gen_reg_rtx (<MODE>mode);
+- emit_insn (gen_xor<mode>3 (tmp, operands[1], operands[2]));
+- }
+-
+- /* For 64-bit vectors we need no reductions. */
+- if (known_eq (128, GET_MODE_BITSIZE (<MODE>mode)))
+- {
+- /* Always reduce using a V4SI. */
+- rtx reduc = gen_lowpart (V4SImode, tmp);
+- rtx res = gen_reg_rtx (V4SImode);
+- emit_insn (gen_aarch64_umaxpv4si (res, reduc, reduc));
+- emit_move_insn (tmp, gen_lowpart (<MODE>mode, res));
+- }
+-
+- rtx val = gen_reg_rtx (DImode);
+- emit_move_insn (val, gen_lowpart (DImode, tmp));
+-
+- rtx cc_reg = aarch64_gen_compare_reg (code, val, const0_rtx);
+- rtx cmp_rtx = gen_rtx_fmt_ee (code, DImode, cc_reg, const0_rtx);
+- emit_jump_insn (gen_condjump (cmp_rtx, cc_reg, operands[3]));
+- DONE;
+-})
+-
+ ;; Patterns comparing two vectors to produce a mask.
+
+ (define_expand "vec_cmp<mode><mode>"
+diff --git a/gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
+deleted file mode 100644
+index d15053553f94..000000000000
+--- a/gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
++++ /dev/null
+@@ -1,108 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-options "-O3 -fno-schedule-insns -fno-reorder-blocks -fno-schedule-insns2" } */
+-/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+-#define N 640
+-int a[N] = {0};
+-int b[N] = {0};
+-/*
+-** f1:
+-** ...
+-** cmpgt p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
+-** ptest p[0-9]+, p[0-9]+.b
+-** b.any \.L[0-9]+
+-** ...
+-*/
+-void f1 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] > 0)
+- break;
+- }
+-}
+-/*
+-** f2:
+-** ...
+-** cmpge p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
+-** ptest p[0-9]+, p[0-9]+.b
+-** b.any \.L[0-9]+
+-** ...
+-*/
+-void f2 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] >= 0)
+- break;
+- }
+-}
+-/*
+-** f3:
+-** ...
+-** cmpeq p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
+-** ptest p[0-9]+, p[0-9]+.b
+-** b.any \.L[0-9]+
+-** ...
+-*/
+-void f3 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] == 0)
+- break;
+- }
+-}
+-/*
+-** f4:
+-** ...
+-** cmpne p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
+-** ptest p[0-9]+, p[0-9]+.b
+-** b.any \.L[0-9]+
+-** ...
+-*/
+-void f4 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] != 0)
+- break;
+- }
+-}
+-/*
+-** f5:
+-** ...
+-** cmplt p[0-9]+.s, p7/z, z[0-9]+.s, #0
+-** ptest p[0-9]+, p[0-9]+.b
+-** b.any .L[0-9]+
+-** ...
+-*/
+-void f5 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] < 0)
+- break;
+- }
+-}
+-/*
+-** f6:
+-** ...
+-** cmple p[0-9]+.s, p[0-9]+/z, z[0-9]+.s, #0
+-** ptest p[0-9]+, p[0-9]+.b
+-** b.any \.L[0-9]+
+-** ...
+-*/
+-void f6 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] <= 0)
+- break;
+- }
+-}
+diff --git a/gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c b/gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
+deleted file mode 100644
+index a5e7b94827dd..000000000000
+--- a/gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c
++++ /dev/null
+@@ -1,124 +0,0 @@
+-/* { dg-do compile } */
+-/* { dg-options "-O3 -fno-schedule-insns -fno-reorder-blocks -fno-schedule-insns2" } */
+-/* { dg-final { check-function-bodies "**" "" "" { target lp64 } } } */
+-
+-#pragma GCC target "+nosve"
+-
+-#define N 640
+-int a[N] = {0};
+-int b[N] = {0};
+-
+-
+-/*
+-** f1:
+-** ...
+-** cmgt v[0-9]+.4s, v[0-9]+.4s, #0
+-** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** fmov x[0-9]+, d[0-9]+
+-** cbnz x[0-9]+, \.L[0-9]+
+-** ...
+-*/
+-void f1 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] > 0)
+- break;
+- }
+-}
+-
+-/*
+-** f2:
+-** ...
+-** cmge v[0-9]+.4s, v[0-9]+.4s, #0
+-** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** fmov x[0-9]+, d[0-9]+
+-** cbnz x[0-9]+, \.L[0-9]+
+-** ...
+-*/
+-void f2 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] >= 0)
+- break;
+- }
+-}
+-
+-/*
+-** f3:
+-** ...
+-** cmeq v[0-9]+.4s, v[0-9]+.4s, #0
+-** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** fmov x[0-9]+, d[0-9]+
+-** cbnz x[0-9]+, \.L[0-9]+
+-** ...
+-*/
+-void f3 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] == 0)
+- break;
+- }
+-}
+-
+-/*
+-** f4:
+-** ...
+-** cmtst v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** fmov x[0-9]+, d[0-9]+
+-** cbnz x[0-9]+, \.L[0-9]+
+-** ...
+-*/
+-void f4 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] != 0)
+- break;
+- }
+-}
+-
+-/*
+-** f5:
+-** ...
+-** cmlt v[0-9]+.4s, v[0-9]+.4s, #0
+-** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** fmov x[0-9]+, d[0-9]+
+-** cbnz x[0-9]+, \.L[0-9]+
+-** ...
+-*/
+-void f5 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] < 0)
+- break;
+- }
+-}
+-
+-/*
+-** f6:
+-** ...
+-** cmle v[0-9]+.4s, v[0-9]+.4s, #0
+-** umaxp v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s
+-** fmov x[0-9]+, d[0-9]+
+-** cbnz x[0-9]+, \.L[0-9]+
+-** ...
+-*/
+-void f6 ()
+-{
+- for (int i = 0; i < N; i++)
+- {
+- b[i] += a[i];
+- if (a[i] <= 0)
+- break;
+- }
+-}
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch b/14.0.0/gentoo/79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch
new file mode 100644
index 0000000..549472b
--- /dev/null
+++ b/14.0.0/gentoo/79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch
@@ -0,0 +1,2426 @@
+From 3385d9b56e25b75a2e0fe3286b329b82b703362d Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:14 +0000
+Subject: [PATCH 5/7] Revert "middle-end: Support vectorization of loops with
+ multiple exits."
+
+This reverts commit 01f4251b8775c832a92d55e2df57c9ac72eaceef.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/tree-if-conv.cc | 2 +-
+ gcc/tree-vect-data-refs.cc | 237 ------------------
+ gcc/tree-vect-loop-manip.cc | 331 +++++--------------------
+ gcc/tree-vect-loop.cc | 482 ++++++++++--------------------------
+ gcc/tree-vect-patterns.cc | 167 ++-----------
+ gcc/tree-vect-stmts.cc | 305 ++---------------------
+ gcc/tree-vectorizer.cc | 4 +-
+ gcc/tree-vectorizer.h | 35 +--
+ 8 files changed, 233 insertions(+), 1330 deletions(-)
+
+diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc
+index 9638d3cc869a..e169413bb44c 100644
+--- a/gcc/tree-if-conv.cc
++++ b/gcc/tree-if-conv.cc
+@@ -844,7 +844,7 @@ idx_within_array_bound (tree ref, tree *idx, void *dta)
+
+ /* Return TRUE if ref is a within bound array reference. */
+
+-bool
++static bool
+ ref_within_array_bound (gimple *stmt, tree ref)
+ {
+ class loop *loop = loop_containing_stmt (stmt);
+diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
+index 3d9673fb0b58..d5c9c4a11c2e 100644
+--- a/gcc/tree-vect-data-refs.cc
++++ b/gcc/tree-vect-data-refs.cc
+@@ -613,238 +613,6 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
+ return opt_result::success ();
+ }
+
+-/* Funcion vect_analyze_early_break_dependences.
+-
+- Examime all the data references in the loop and make sure that if we have
+- mulitple exits that we are able to safely move stores such that they become
+- safe for vectorization. The function also calculates the place where to move
+- the instructions to and computes what the new vUSE chain should be.
+-
+- This works in tandem with the CFG that will be produced by
+- slpeel_tree_duplicate_loop_to_edge_cfg later on.
+-
+- This function tries to validate whether an early break vectorization
+- is possible for the current instruction sequence. Returns True i
+- possible, otherwise False.
+-
+- Requirements:
+- - Any memory access must be to a fixed size buffer.
+- - There must not be any loads and stores to the same object.
+- - Multiple loads are allowed as long as they don't alias.
+-
+- NOTE:
+- This implemementation is very conservative. Any overlappig loads/stores
+- that take place before the early break statement gets rejected aside from
+- WAR dependencies.
+-
+- i.e.:
+-
+- a[i] = 8
+- c = a[i]
+- if (b[i])
+- ...
+-
+- is not allowed, but
+-
+- c = a[i]
+- a[i] = 8
+- if (b[i])
+- ...
+-
+- is which is the common case. */
+-
+-static opt_result
+-vect_analyze_early_break_dependences (loop_vec_info loop_vinfo)
+-{
+- DUMP_VECT_SCOPE ("vect_analyze_early_break_dependences");
+-
+- /* List of all load data references found during traversal. */
+- auto_vec<data_reference *> bases;
+- basic_block dest_bb = NULL;
+-
+- hash_set <gimple *> visited;
+- class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+- class loop *loop_nest = loop_outer (loop);
+-
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "loop contains multiple exits, analyzing"
+- " statement dependencies.\n");
+-
+- for (gimple *c : LOOP_VINFO_LOOP_CONDS (loop_vinfo))
+- {
+- stmt_vec_info loop_cond_info = loop_vinfo->lookup_stmt (c);
+- if (STMT_VINFO_TYPE (loop_cond_info) != loop_exit_ctrl_vec_info_type)
+- continue;
+-
+- gimple_stmt_iterator gsi = gsi_for_stmt (c);
+-
+- /* Now analyze all the remaining statements and try to determine which
+- instructions are allowed/needed to be moved. */
+- while (!gsi_end_p (gsi))
+- {
+- gimple *stmt = gsi_stmt (gsi);
+- gsi_prev (&gsi);
+- if (!gimple_has_ops (stmt)
+- || is_gimple_debug (stmt))
+- continue;
+-
+- stmt_vec_info stmt_vinfo = loop_vinfo->lookup_stmt (stmt);
+- auto dr_ref = STMT_VINFO_DATA_REF (stmt_vinfo);
+- if (!dr_ref)
+- continue;
+-
+- /* We currently only support statically allocated objects due to
+- not having first-faulting loads support or peeling for
+- alignment support. Compute the size of the referenced object
+- (it could be dynamically allocated). */
+- tree obj = DR_BASE_ADDRESS (dr_ref);
+- if (!obj || TREE_CODE (obj) != ADDR_EXPR)
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+- "early breaks only supported on statically"
+- " allocated objects.\n");
+- return opt_result::failure_at (c,
+- "can't safely apply code motion to "
+- "dependencies of %G to vectorize "
+- "the early exit.\n", c);
+- }
+-
+- tree refop = TREE_OPERAND (obj, 0);
+- tree refbase = get_base_address (refop);
+- if (!refbase || !DECL_P (refbase) || !DECL_SIZE (refbase)
+- || TREE_CODE (DECL_SIZE (refbase)) != INTEGER_CST)
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+- "early breaks only supported on"
+- " statically allocated objects.\n");
+- return opt_result::failure_at (c,
+- "can't safely apply code motion to "
+- "dependencies of %G to vectorize "
+- "the early exit.\n", c);
+- }
+-
+- /* Check if vector accesses to the object will be within bounds.
+- must be a constant or assume loop will be versioned or niters
+- bounded by VF so accesses are within range. */
+- if (!ref_within_array_bound (stmt, DR_REF (dr_ref)))
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+- "early breaks not supported: vectorization "
+- "would %s beyond size of obj.",
+- DR_IS_READ (dr_ref) ? "read" : "write");
+- return opt_result::failure_at (c,
+- "can't safely apply code motion to "
+- "dependencies of %G to vectorize "
+- "the early exit.\n", c);
+- }
+-
+- if (DR_IS_READ (dr_ref))
+- bases.safe_push (dr_ref);
+- else if (DR_IS_WRITE (dr_ref))
+- {
+- /* We are moving writes down in the CFG. To be sure that this
+- is valid after vectorization we have to check all the loads
+- we are sinking the stores past to see if any of them may
+- alias or are the same object.
+-
+- Same objects will not be an issue because unless the store
+- is marked volatile the value can be forwarded. If the
+- store is marked volatile we don't vectorize the loop
+- anyway.
+-
+- That leaves the check for aliasing. We don't really need
+- to care about the stores aliasing with each other since the
+- stores are moved in order so the effects are still observed
+- correctly. This leaves the check for WAR dependencies
+- which we would be introducing here if the DR can alias.
+- The check is quadratic in loads/stores but I have not found
+- a better API to do this. I believe all loads and stores
+- must be checked. We also must check them when we
+- encountered the store, since we don't care about loads past
+- the store. */
+-
+- for (auto dr_read : bases)
+- if (dr_may_alias_p (dr_ref, dr_read, loop_nest))
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION,
+- vect_location,
+- "early breaks not supported: "
+- "overlapping loads and stores "
+- "found before the break "
+- "statement.\n");
+-
+- return opt_result::failure_at (stmt,
+- "can't safely apply code motion to dependencies"
+- " to vectorize the early exit. %G may alias with"
+- " %G\n", stmt, dr_read->stmt);
+- }
+- }
+-
+- if (gimple_vdef (stmt))
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "==> recording stmt %G", stmt);
+-
+- LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo).safe_push (stmt);
+- }
+- else if (gimple_vuse (stmt))
+- {
+- LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).safe_insert (0, stmt);
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "marked statement for vUSE update: %G", stmt);
+- }
+- }
+-
+- /* Save destination as we go, BB are visited in order and the last one
+- is where statements should be moved to. */
+- if (!dest_bb)
+- dest_bb = gimple_bb (c);
+- else
+- {
+- basic_block curr_bb = gimple_bb (c);
+- if (dominated_by_p (CDI_DOMINATORS, curr_bb, dest_bb))
+- dest_bb = curr_bb;
+- }
+- }
+-
+- basic_block dest_bb0 = EDGE_SUCC (dest_bb, 0)->dest;
+- basic_block dest_bb1 = EDGE_SUCC (dest_bb, 1)->dest;
+- dest_bb = flow_bb_inside_loop_p (loop, dest_bb0) ? dest_bb0 : dest_bb1;
+- /* We don't allow outer -> inner loop transitions which should have been
+- trapped already during loop form analysis. */
+- gcc_assert (dest_bb->loop_father == loop);
+-
+- gcc_assert (dest_bb);
+- LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo) = dest_bb;
+-
+- if (!LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).is_empty ())
+- {
+- /* All uses shall be updated to that of the first load. Entries are
+- stored in reverse order. */
+- tree vuse = gimple_vuse (LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo).last ());
+- for (auto g : LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo))
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "will update use: %T, mem_ref: %G", vuse, g);
+- }
+- }
+-
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "recorded statements to be moved to BB %d\n",
+- LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo)->index);
+-
+- return opt_result::success ();
+-}
+-
+ /* Function vect_analyze_data_ref_dependences.
+
+ Examine all the data references in the loop, and make sure there do not
+@@ -889,11 +657,6 @@ vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo,
+ return res;
+ }
+
+- /* If we have early break statements in the loop, check to see if they
+- are of a form we can vectorizer. */
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- return vect_analyze_early_break_dependences (loop_vinfo);
+-
+ return opt_result::success ();
+ }
+
+diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
+index 295e1c916874..bcd90a331f5a 100644
+--- a/gcc/tree-vect-loop-manip.cc
++++ b/gcc/tree-vect-loop-manip.cc
+@@ -448,20 +448,6 @@ vect_adjust_loop_lens_control (tree iv_type, gimple_seq *seq,
+ }
+ }
+
+-/* Stores the standard position for induction variable increment in belonging to
+- LOOP_EXIT (just before the exit condition of the given exit to BSI.
+- INSERT_AFTER is set to true if the increment should be inserted after
+- *BSI. */
+-
+-void
+-vect_iv_increment_position (edge loop_exit, gimple_stmt_iterator *bsi,
+- bool *insert_after)
+-{
+- basic_block bb = loop_exit->src;
+- *bsi = gsi_last_bb (bb);
+- *insert_after = false;
+-}
+-
+ /* Helper for vect_set_loop_condition_partial_vectors. Generate definitions
+ for all the rgroup controls in RGC and return a control that is nonzero
+ when the loop needs to iterate. Add any new preheader statements to
+@@ -545,8 +531,7 @@ vect_set_loop_controls_directly (class loop *loop, loop_vec_info loop_vinfo,
+ tree index_before_incr, index_after_incr;
+ gimple_stmt_iterator incr_gsi;
+ bool insert_after;
+- edge exit_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
+- vect_iv_increment_position (exit_e, &incr_gsi, &insert_after);
++ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
+ if (LOOP_VINFO_USING_DECREMENTING_IV_P (loop_vinfo))
+ {
+ /* Create an IV that counts down from niters_total and whose step
+@@ -951,18 +936,7 @@ vect_set_loop_condition_partial_vectors (class loop *loop, edge exit_edge,
+
+ if (final_iv)
+ {
+- gassign *assign;
+- /* If vectorizing an inverted early break loop we have to restart the
+- scalar loop at niters - vf. This matches what we do in
+- vect_gen_vector_loop_niters_mult_vf for non-masked loops. */
+- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
+- {
+- tree ftype = TREE_TYPE (orig_niters);
+- tree vf = build_int_cst (ftype, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
+- assign = gimple_build_assign (final_iv, MINUS_EXPR, orig_niters, vf);
+- }
+- else
+- assign = gimple_build_assign (final_iv, orig_niters);
++ gassign *assign = gimple_build_assign (final_iv, orig_niters);
+ gsi_insert_on_edge_immediate (exit_edge, assign);
+ }
+
+@@ -1043,7 +1017,7 @@ vect_set_loop_condition_partial_vectors_avx512 (class loop *loop,
+ tree index_before_incr, index_after_incr;
+ gimple_stmt_iterator incr_gsi;
+ bool insert_after;
+- vect_iv_increment_position (exit_edge, &incr_gsi, &insert_after);
++ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
+ create_iv (niters_adj, MINUS_EXPR, iv_step, NULL_TREE, loop,
+ &incr_gsi, insert_after, &index_before_incr,
+ &index_after_incr);
+@@ -1199,19 +1173,8 @@ vect_set_loop_condition_partial_vectors_avx512 (class loop *loop,
+
+ if (final_iv)
+ {
+- gassign *assign;
+- /* If vectorizing an inverted early break loop we have to restart the
+- scalar loop at niters - vf. This matches what we do in
+- vect_gen_vector_loop_niters_mult_vf for non-masked loops. */
+- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
+- {
+- tree ftype = TREE_TYPE (orig_niters);
+- tree vf = build_int_cst (ftype, LOOP_VINFO_VECT_FACTOR (loop_vinfo));
+- assign = gimple_build_assign (final_iv, MINUS_EXPR, orig_niters, vf);
+- }
+- else
+- assign = gimple_build_assign (final_iv, orig_niters);
+- gsi_insert_on_edge_immediate (exit_edge, assign);
++ gassign *assign = gimple_build_assign (final_iv, orig_niters);
++ gsi_insert_on_edge_immediate (single_exit (loop), assign);
+ }
+
+ return cond_stmt;
+@@ -1315,7 +1278,7 @@ vect_set_loop_condition_normal (loop_vec_info /* loop_vinfo */, edge exit_edge,
+ }
+ }
+
+- vect_iv_increment_position (exit_edge, &incr_gsi, &insert_after);
++ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
+ create_iv (init, PLUS_EXPR, step, NULL_TREE, loop,
+ &incr_gsi, insert_after, &indx_before_incr, &indx_after_incr);
+ indx_after_incr = force_gimple_operand_gsi (&loop_cond_gsi, indx_after_incr,
+@@ -1440,16 +1403,13 @@ vect_set_loop_condition (class loop *loop, edge loop_e, loop_vec_info loop_vinfo
+ copies remains the same.
+
+ If UPDATED_DOMS is not NULL it is update with the list of basic blocks whoms
+- dominators were updated during the peeling. When doing early break vectorization
+- then LOOP_VINFO needs to be provided and is used to keep track of any newly created
+- memory references that need to be updated should we decide to vectorize. */
++ dominators were updated during the peeling. */
+
+ class loop *
+ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ class loop *scalar_loop,
+ edge scalar_exit, edge e, edge *new_e,
+- bool flow_loops,
+- vec<basic_block> *updated_doms)
++ bool flow_loops)
+ {
+ class loop *new_loop;
+ basic_block *new_bbs, *bbs, *pbbs;
+@@ -1566,9 +1526,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ }
+
+ auto loop_exits = get_loop_exit_edges (loop);
+- bool multiple_exits_p = loop_exits.length () > 1;
+ auto_vec<basic_block> doms;
+- class loop *update_loop = NULL;
+
+ if (at_exit) /* Add the loop copy at exit. */
+ {
+@@ -1578,65 +1536,39 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ flush_pending_stmts (new_exit);
+ }
+
+- bool multiple_exits_p = loop_exits.length () > 1;
+- basic_block main_loop_exit_block = new_preheader;
+- basic_block alt_loop_exit_block = NULL;
+- /* Create intermediate edge for main exit. But only useful for early
+- exits. */
+- if (multiple_exits_p)
+- {
+- edge loop_e = single_succ_edge (new_preheader);
+- new_preheader = split_edge (loop_e);
+- }
+-
+ auto_vec <gimple *> new_phis;
+ hash_map <tree, tree> new_phi_args;
+ /* First create the empty phi nodes so that when we flush the
+ statements they can be filled in. However because there is no order
+ between the PHI nodes in the exits and the loop headers we need to
+ order them base on the order of the two headers. First record the new
+- phi nodes. Then redirect the edges and flush the changes. This writes
+- out the new SSA names. */
+- for (auto gsi_from = gsi_start_phis (loop_exit->dest);
++ phi nodes. */
++ for (auto gsi_from = gsi_start_phis (scalar_exit->dest);
+ !gsi_end_p (gsi_from); gsi_next (&gsi_from))
+ {
+ gimple *from_phi = gsi_stmt (gsi_from);
+ tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
+- gphi *res = create_phi_node (new_res, main_loop_exit_block);
++ gphi *res = create_phi_node (new_res, new_preheader);
+ new_phis.safe_push (res);
+ }
+
+- for (auto exit : loop_exits)
++ /* Then redirect the edges and flush the changes. This writes out the new
++ SSA names. */
++ for (edge exit : loop_exits)
+ {
+- basic_block dest = main_loop_exit_block;
+- if (exit != loop_exit)
+- {
+- if (!alt_loop_exit_block)
+- {
+- alt_loop_exit_block = split_edge (exit);
+- edge res = redirect_edge_and_branch (
+- single_succ_edge (alt_loop_exit_block),
+- new_preheader);
+- flush_pending_stmts (res);
+- continue;
+- }
+- dest = alt_loop_exit_block;
+- }
+- edge e = redirect_edge_and_branch (exit, dest);
+- flush_pending_stmts (e);
++ edge temp_e = redirect_edge_and_branch (exit, new_preheader);
++ flush_pending_stmts (temp_e);
+ }
+-
+ /* Record the new SSA names in the cache so that we can skip materializing
+ them again when we fill in the rest of the LCSSA variables. */
+ for (auto phi : new_phis)
+ {
+- tree new_arg = gimple_phi_arg (phi, loop_exit->dest_idx)->def;
++ tree new_arg = gimple_phi_arg (phi, 0)->def;
+
+ if (!SSA_VAR_P (new_arg))
+ continue;
+-
+ /* If the PHI MEM node dominates the loop then we shouldn't create
+- a new LC-SSSA PHI for it in the intermediate block. */
++ a new LC-SSSA PHI for it in the intermediate block. */
+ /* A MEM phi that consitutes a new DEF for the vUSE chain can either
+ be a .VDEF or a PHI that operates on MEM. And said definition
+ must not be inside the main loop. Or we must be a parameter.
+@@ -1652,9 +1584,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ remove_phi_node (&gsi, true);
+ continue;
+ }
+-
+- /* If we decide to remove the PHI node we should also not
+- rematerialize it later on. */
+ new_phi_args.put (new_arg, gimple_phi_result (phi));
+
+ if (TREE_CODE (new_arg) != SSA_NAME)
+@@ -1666,77 +1595,34 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ preheader block and still find the right LC nodes. */
+ edge loop_entry = single_succ_edge (new_preheader);
+ if (flow_loops)
+- {
+- bool peeled_iters = single_pred (loop->latch) != loop_exit->src;
+- /* Link through the main exit first. */
+- for (auto gsi_from = gsi_start_phis (loop->header),
+- gsi_to = gsi_start_phis (new_loop->header);
+- !gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
+- gsi_next (&gsi_from), gsi_next (&gsi_to))
+- {
+- gimple *from_phi = gsi_stmt (gsi_from);
+- gimple *to_phi = gsi_stmt (gsi_to);
+- tree new_arg = PHI_ARG_DEF_FROM_EDGE (from_phi,
+- loop_latch_edge (loop));
+-
+- /* Check if we've already created a new phi node during edge
+- redirection. If we have, only propagate the value
+- downwards. */
+- if (tree *res = new_phi_args.get (new_arg))
+- {
+- if (multiple_exits_p)
+- new_arg = *res;
+- else
+- {
+- adjust_phi_and_debug_stmts (to_phi, loop_entry, *res);
+- continue;
+- }
+- }
+- /* If we have multiple exits and the vector loop is peeled then we
+- need to use the value at start of loop. */
+- if (peeled_iters)
+- {
+- tree tmp_arg = gimple_phi_result (from_phi);
+- if (!new_phi_args.get (tmp_arg))
+- new_arg = tmp_arg;
+- }
+-
+- tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
+- gphi *lcssa_phi = create_phi_node (new_res, new_preheader);
++ for (auto gsi_from = gsi_start_phis (loop->header),
++ gsi_to = gsi_start_phis (new_loop->header);
++ !gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
++ gsi_next (&gsi_from), gsi_next (&gsi_to))
++ {
++ gimple *from_phi = gsi_stmt (gsi_from);
++ gimple *to_phi = gsi_stmt (gsi_to);
++ tree new_arg = PHI_ARG_DEF_FROM_EDGE (from_phi,
++ loop_latch_edge (loop));
+
+- /* Otherwise, main loop exit should use the final iter value. */
+- SET_PHI_ARG_DEF (lcssa_phi, loop_exit->dest_idx, new_arg);
++ /* Check if we've already created a new phi node during edge
++ redirection. If we have, only propagate the value downwards. */
++ if (tree *res = new_phi_args.get (new_arg))
++ {
++ adjust_phi_and_debug_stmts (to_phi, loop_entry, *res);
++ continue;
++ }
+
+- adjust_phi_and_debug_stmts (to_phi, loop_entry, new_res);
+- }
++ tree new_res = copy_ssa_name (gimple_phi_result (from_phi));
++ gphi *lcssa_phi = create_phi_node (new_res, new_preheader);
+
+- set_immediate_dominator (CDI_DOMINATORS, main_loop_exit_block,
+- loop_exit->src);
++ /* Main loop exit should use the final iter value. */
++ add_phi_arg (lcssa_phi, new_arg, loop_exit, UNKNOWN_LOCATION);
+
+- /* Now link the alternative exits. */
+- if (multiple_exits_p)
+- {
+- set_immediate_dominator (CDI_DOMINATORS, new_preheader,
+- main_loop_exit_block);
+- for (auto gsi_from = gsi_start_phis (loop->header),
+- gsi_to = gsi_start_phis (new_preheader);
+- !gsi_end_p (gsi_from) && !gsi_end_p (gsi_to);
+- gsi_next (&gsi_from), gsi_next (&gsi_to))
+- {
+- gimple *from_phi = gsi_stmt (gsi_from);
+- gimple *to_phi = gsi_stmt (gsi_to);
+-
+- tree alt_arg = gimple_phi_result (from_phi);
+- edge main_e = single_succ_edge (alt_loop_exit_block);
+- for (edge e : loop_exits)
+- if (e != loop_exit)
+- SET_PHI_ARG_DEF (to_phi, main_e->dest_idx, alt_arg);
+- }
++ adjust_phi_and_debug_stmts (to_phi, loop_entry, new_res);
++ }
+
+- set_immediate_dominator (CDI_DOMINATORS, new_preheader,
+- loop->header);
+- }
+- }
++ set_immediate_dominator (CDI_DOMINATORS, new_preheader, e->src);
+
+ if (was_imm_dom || duplicate_outer_loop)
+ set_immediate_dominator (CDI_DOMINATORS, exit_dest, new_exit->src);
+@@ -1748,21 +1634,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ delete_basic_block (preheader);
+ set_immediate_dominator (CDI_DOMINATORS, scalar_loop->header,
+ loop_preheader_edge (scalar_loop)->src);
+-
+- /* Finally after wiring the new epilogue we need to update its main exit
+- to the original function exit we recorded. Other exits are already
+- correct. */
+- if (multiple_exits_p)
+- {
+- update_loop = new_loop;
+- for (edge e : get_loop_exit_edges (loop))
+- doms.safe_push (e->dest);
+- doms.safe_push (exit_dest);
+-
+- /* Likely a fall-through edge, so update if needed. */
+- if (single_succ_p (exit_dest))
+- doms.safe_push (single_succ (exit_dest));
+- }
+ }
+ else /* Add the copy at entry. */
+ {
+@@ -1810,34 +1681,6 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
+ delete_basic_block (new_preheader);
+ set_immediate_dominator (CDI_DOMINATORS, new_loop->header,
+ loop_preheader_edge (new_loop)->src);
+-
+- if (multiple_exits_p)
+- update_loop = loop;
+- }
+-
+- if (multiple_exits_p)
+- {
+- for (edge e : get_loop_exit_edges (update_loop))
+- {
+- edge ex;
+- edge_iterator ei;
+- FOR_EACH_EDGE (ex, ei, e->dest->succs)
+- {
+- /* Find the first non-fallthrough block as fall-throughs can't
+- dominate other blocks. */
+- if (single_succ_p (ex->dest))
+- {
+- doms.safe_push (ex->dest);
+- ex = single_succ_edge (ex->dest);
+- }
+- doms.safe_push (ex->dest);
+- }
+- doms.safe_push (e->dest);
+- }
+-
+- iterate_fix_dominators (CDI_DOMINATORS, doms, false);
+- if (updated_doms)
+- updated_doms->safe_splice (doms);
+ }
+
+ free (new_bbs);
+@@ -1912,10 +1755,12 @@ slpeel_can_duplicate_loop_p (const class loop *loop, const_edge exit_e,
+ edge entry_e = loop_preheader_edge (loop);
+ gcond *orig_cond = get_loop_exit_condition (exit_e);
+ gimple_stmt_iterator loop_exit_gsi = gsi_last_bb (exit_e->src);
++ unsigned int num_bb = loop->inner? 5 : 2;
+
+ /* All loops have an outer scope; the only case loop->outer is NULL is for
+ the function itself. */
+ if (!loop_outer (loop)
++ || loop->num_nodes != num_bb
+ || !empty_block_p (loop->latch)
+ || !exit_e
+ /* Verify that new loop exit condition can be trivially modified. */
+@@ -2204,8 +2049,12 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
+ gphi_iterator gsi, gsi1;
+ class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+ basic_block update_bb = update_e->dest;
++
+ basic_block exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
+- gimple_stmt_iterator last_gsi = gsi_last_bb (exit_bb);
++
++ /* Make sure there exists a single-predecessor exit bb: */
++ gcc_assert (single_pred_p (exit_bb));
++ gcc_assert (single_succ_edge (exit_bb) == update_e);
+
+ for (gsi = gsi_start_phis (loop->header), gsi1 = gsi_start_phis (update_bb);
+ !gsi_end_p (gsi) && !gsi_end_p (gsi1);
+@@ -2215,6 +2064,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
+ tree step_expr, off;
+ tree type;
+ tree var, ni, ni_name;
++ gimple_stmt_iterator last_gsi;
+
+ gphi *phi = gsi.phi ();
+ gphi *phi1 = gsi1.phi ();
+@@ -2250,8 +2100,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
+ {
+ tree stype = TREE_TYPE (step_expr);
+ off = fold_build2 (MULT_EXPR, stype,
+- fold_convert (stype, niters), step_expr);
+-
++ fold_convert (stype, niters), step_expr);
+ if (POINTER_TYPE_P (type))
+ ni = fold_build_pointer_plus (init_expr, off);
+ else
+@@ -2270,9 +2119,9 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo,
+
+ var = create_tmp_var (type, "tmp");
+
++ last_gsi = gsi_last_bb (exit_bb);
+ gimple_seq new_stmts = NULL;
+ ni_name = force_gimple_operand (ni, &new_stmts, false, var);
+-
+ /* Exit_bb shouldn't be empty. */
+ if (!gsi_end_p (last_gsi))
+ {
+@@ -2770,19 +2619,11 @@ vect_gen_vector_loop_niters_mult_vf (loop_vec_info loop_vinfo,
+ int vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo).to_constant ();
+ tree type = TREE_TYPE (niters_vector);
+ tree log_vf = build_int_cst (type, exact_log2 (vf));
+- tree tree_vf = build_int_cst (type, vf);
+ basic_block exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
+
+ gcc_assert (niters_vector_mult_vf_ptr != NULL);
+ tree niters_vector_mult_vf = fold_build2 (LSHIFT_EXPR, type,
+ niters_vector, log_vf);
+-
+- /* If we've peeled a vector iteration then subtract one full vector
+- iteration. */
+- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
+- niters_vector_mult_vf = fold_build2 (MINUS_EXPR, type,
+- niters_vector_mult_vf, tree_vf);
+-
+ if (!is_gimple_val (niters_vector_mult_vf))
+ {
+ tree var = create_tmp_var (type, "niters_vector_mult_vf");
+@@ -3023,12 +2864,6 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+ bound_epilog += vf - 1;
+ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
+ bound_epilog += 1;
+-
+- /* For early breaks the scalar loop needs to execute at most VF times
+- to find the element that caused the break. */
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- bound_epilog = vf;
+-
+ bool epilog_peeling = maybe_ne (bound_epilog, 0U);
+ poly_uint64 bound_scalar = bound_epilog;
+
+@@ -3163,17 +2998,14 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+ bound_prolog + bound_epilog)
+ : (!LOOP_REQUIRES_VERSIONING (loop_vinfo)
+ || vect_epilogues));
+-
+ /* Epilog loop must be executed if the number of iterations for epilog
+ loop is known at compile time, otherwise we need to add a check at
+ the end of vector loop and skip to the end of epilog loop. */
+ bool skip_epilog = (prolog_peeling < 0
+ || !LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
+ || !vf.is_constant ());
+- /* PEELING_FOR_GAPS and peeling for early breaks are special because epilog
+- loop must be executed. */
+- if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)
+- || LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
++ /* PEELING_FOR_GAPS is special because epilog loop must be executed. */
++ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo))
+ skip_epilog = false;
+
+ class loop *scalar_loop = LOOP_VINFO_SCALAR_LOOP (loop_vinfo);
+@@ -3302,14 +3134,11 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+ epilog = vect_epilogues ? get_loop_copy (loop) : scalar_loop;
+ edge epilog_e = vect_epilogues ? e : scalar_e;
+ edge new_epilog_e = NULL;
+- auto_vec<basic_block> doms;
+- epilog
+- = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e, epilog, epilog_e, e,
+- &new_epilog_e, true, &doms);
+-
++ epilog = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e, epilog,
++ epilog_e, e,
++ &new_epilog_e);
+ LOOP_VINFO_EPILOGUE_IV_EXIT (loop_vinfo) = new_epilog_e;
+ gcc_assert (epilog);
+- gcc_assert (new_epilog_e);
+ epilog->force_vectorize = false;
+ bb_before_epilog = loop_preheader_edge (epilog)->src;
+
+@@ -3360,11 +3189,10 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+
+ /* Only need to handle basic block before epilog loop if it's not
+ the guard_bb, which is the case when skip_vector is true. */
+- if (guard_bb != bb_before_epilog && single_pred_p (bb_before_epilog))
++ if (guard_bb != bb_before_epilog)
+ bb_before_epilog->count = single_pred_edge (bb_before_epilog)->count ();
+ bb_before_epilog = loop_preheader_edge (epilog)->src;
+ }
+-
+ /* If loop is peeled for non-zero constant times, now niters refers to
+ orig_niters - prolog_peeling, it won't overflow even the orig_niters
+ overflows. */
+@@ -3388,22 +3216,13 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+ niters_vector_mult_vf steps. */
+ gcc_checking_assert (vect_can_advance_ivs_p (loop_vinfo));
+ update_e = skip_vector ? e : loop_preheader_edge (epilog);
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- update_e = single_succ_edge (LOOP_VINFO_IV_EXIT (loop_vinfo)->dest);
+-
+- /* If we have a peeled vector iteration, all exits are the same, leave it
+- and so the main exit needs to be treated the same as the alternative
+- exits in that we leave their updates to vectorizable_live_operations.
+- */
+- if (!LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo))
+- vect_update_ivs_after_vectorizer (loop_vinfo, niters_vector_mult_vf,
+- update_e);
+-
+- if (skip_epilog || LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
++ vect_update_ivs_after_vectorizer (loop_vinfo, niters_vector_mult_vf,
++ update_e);
++
++ if (skip_epilog)
+ {
+ guard_cond = fold_build2 (EQ_EXPR, boolean_type_node,
+ niters, niters_vector_mult_vf);
+-
+ guard_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
+ edge epilog_e = LOOP_VINFO_EPILOGUE_IV_EXIT (loop_vinfo);
+ guard_to = epilog_e->dest;
+@@ -3411,7 +3230,6 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+ skip_vector ? anchor : guard_bb,
+ prob_epilog.invert (),
+ irred_flag);
+- doms.safe_push (guard_to);
+ if (vect_epilogues)
+ epilogue_vinfo->skip_this_loop_edge = guard_e;
+ edge main_iv = LOOP_VINFO_IV_EXIT (loop_vinfo);
+@@ -3450,20 +3268,10 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
+ scale_loop_profile (epilog, prob_epilog, -1);
+ }
+
+- /* Recalculate the dominators after adding the guard edge. */
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- iterate_fix_dominators (CDI_DOMINATORS, doms, false);
+-
+ unsigned HOST_WIDE_INT bound;
+ if (bound_scalar.is_constant (&bound))
+ {
+ gcc_assert (bound != 0);
+- /* Adjust the upper bound by the extra peeled vector iteration if we
+- are an epilogue of an peeled vect loop and not VLA. For VLA the
+- loop bounds are unknown. */
+- if (LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo)
+- && vf.is_constant ())
+- bound += vf.to_constant ();
+ /* -1 to convert loop iterations to latch iterations. */
+ record_niter_bound (epilog, bound - 1, false, true);
+ scale_loop_profile (epilog, profile_probability::always (),
+@@ -4082,23 +3890,12 @@ vect_loop_versioning (loop_vec_info loop_vinfo,
+ If loop versioning wasn't done from loop, but scalar_loop instead,
+ merge_bb will have already just a single successor. */
+
+- /* When the loop has multiple exits then we can only version itself.
+- This is denoted by loop_to_version == loop. In this case we can
+- do the versioning by selecting the exit edge the vectorizer is
+- currently using. */
+- edge exit_edge;
+- if (loop_to_version == loop)
+- exit_edge = LOOP_VINFO_IV_EXIT (loop_vinfo);
+- else
+- exit_edge = single_exit (loop_to_version);
+-
+- gcc_assert (exit_edge);
+- merge_bb = exit_edge->dest;
++ merge_bb = single_exit (loop_to_version)->dest;
+ if (EDGE_COUNT (merge_bb->preds) >= 2)
+ {
+ gcc_assert (EDGE_COUNT (merge_bb->preds) >= 2);
+- new_exit_bb = split_edge (exit_edge);
+- new_exit_e = exit_edge;
++ new_exit_bb = split_edge (single_exit (loop_to_version));
++ new_exit_e = single_exit (loop_to_version);
+ e = EDGE_SUCC (new_exit_bb, 0);
+
+ for (gsi = gsi_start_phis (merge_bb); !gsi_end_p (gsi);
+diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc
+index 88261a3a4f57..7a3db5f098ba 100644
+--- a/gcc/tree-vect-loop.cc
++++ b/gcc/tree-vect-loop.cc
+@@ -1040,7 +1040,6 @@ _loop_vec_info::_loop_vec_info (class loop *loop_in, vec_info_shared *shared)
+ partial_load_store_bias (0),
+ peeling_for_gaps (false),
+ peeling_for_niter (false),
+- early_breaks (false),
+ no_data_dependencies (false),
+ has_mask_store (false),
+ scalar_loop_scaling (profile_probability::uninitialized ()),
+@@ -1695,12 +1694,12 @@ vect_compute_single_scalar_iteration_cost (loop_vec_info loop_vinfo)
+ loop_vinfo->scalar_costs->finish_cost (nullptr);
+ }
+
++
+ /* Function vect_analyze_loop_form.
+
+ Verify that certain CFG restrictions hold, including:
+ - the loop has a pre-header
+- - the loop has a single entry
+- - nested loops can have only a single exit.
++ - the loop has a single entry and exit
+ - the loop exit condition is simple enough
+ - the number of iterations can be analyzed, i.e, a countable loop. The
+ niter could be analyzed under some assumptions. */
+@@ -1722,17 +1721,6 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
+ "using as main loop exit: %d -> %d [AUX: %p]\n",
+ exit_e->src->index, exit_e->dest->index, exit_e->aux);
+
+- /* Check if we have any control flow that doesn't leave the loop. */
+- class loop *v_loop = loop->inner ? loop->inner : loop;
+- basic_block *bbs= get_loop_body (v_loop);
+- for (unsigned i = 0; i < v_loop->num_nodes; i++)
+- if (EDGE_COUNT (bbs[i]->succs) != 1
+- && (EDGE_COUNT (bbs[i]->succs) != 2
+- || !loop_exits_from_bb_p (bbs[i]->loop_father, bbs[i])))
+- return opt_result::failure_at (vect_location,
+- "not vectorized:"
+- " unsupported control flow in loop.\n");
+-
+ /* Different restrictions apply when we are considering an inner-most loop,
+ vs. an outer (nested) loop.
+ (FORNOW. May want to relax some of these restrictions in the future). */
+@@ -1752,6 +1740,11 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
+ |
+ (exit-bb) */
+
++ if (loop->num_nodes != 2)
++ return opt_result::failure_at (vect_location,
++ "not vectorized:"
++ " control flow in loop.\n");
++
+ if (empty_block_p (loop->header))
+ return opt_result::failure_at (vect_location,
+ "not vectorized: empty loop.\n");
+@@ -1783,6 +1776,11 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
+ "not vectorized:"
+ " multiple nested loops.\n");
+
++ if (loop->num_nodes != 5)
++ return opt_result::failure_at (vect_location,
++ "not vectorized:"
++ " control flow in loop.\n");
++
+ entryedge = loop_preheader_edge (innerloop);
+ if (entryedge->src != loop->header
+ || !single_exit (innerloop)
+@@ -1819,6 +1817,9 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
+ info->inner_loop_cond = inner.conds[0];
+ }
+
++ if (!single_exit (loop))
++ return opt_result::failure_at (vect_location,
++ "not vectorized: multiple exits.\n");
+ if (EDGE_COUNT (loop->header->preds) != 2)
+ return opt_result::failure_at (vect_location,
+ "not vectorized:"
+@@ -1834,14 +1835,10 @@ vect_analyze_loop_form (class loop *loop, vect_loop_form_info *info)
+ "not vectorized: latch block not empty.\n");
+
+ /* Make sure the exit is not abnormal. */
+- auto_vec<edge> exits = get_loop_exit_edges (loop);
+- for (edge e : exits)
+- {
+- if (e->flags & EDGE_ABNORMAL)
+- return opt_result::failure_at (vect_location,
+- "not vectorized:"
+- " abnormal loop exit edge.\n");
+- }
++ if (exit_e->flags & EDGE_ABNORMAL)
++ return opt_result::failure_at (vect_location,
++ "not vectorized:"
++ " abnormal loop exit edge.\n");
+
+ info->conds
+ = vect_get_loop_niters (loop, exit_e, &info->assumptions,
+@@ -1909,8 +1906,6 @@ vect_create_loop_vinfo (class loop *loop, vec_info_shared *shared,
+ {
+ stmt_vec_info loop_cond_info = loop_vinfo->lookup_stmt (cond);
+ STMT_VINFO_TYPE (loop_cond_info) = loop_exit_ctrl_vec_info_type;
+- /* Mark the statement as a condition. */
+- STMT_VINFO_DEF_TYPE (loop_cond_info) = vect_condition_def;
+ }
+
+ for (unsigned i = 1; i < info->conds.length (); i ++)
+@@ -1919,10 +1914,6 @@ vect_create_loop_vinfo (class loop *loop, vec_info_shared *shared,
+
+ LOOP_VINFO_IV_EXIT (loop_vinfo) = info->loop_exit;
+
+- /* Check to see if we're vectorizing multiple exits. */
+- LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
+- = !LOOP_VINFO_LOOP_CONDS (loop_vinfo).is_empty ();
+-
+ if (info->inner_loop_cond)
+ {
+ stmt_vec_info inner_loop_cond_info
+@@ -3176,8 +3167,7 @@ start_over:
+
+ /* If an epilogue loop is required make sure we can create one. */
+ if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)
+- || LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo)
+- || LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
++ || LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo))
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location, "epilog loop required\n");
+@@ -3687,9 +3677,6 @@ vect_analyze_loop (class loop *loop, vec_info_shared *shared)
+ && loop->inner == NULL
+ && param_vect_epilogues_nomask
+ && LOOP_VINFO_PEELING_FOR_NITER (first_loop_vinfo)
+- /* No code motion support for multiple epilogues so for now
+- not supported when multiple exits. */
+- && !LOOP_VINFO_EARLY_BREAKS (first_loop_vinfo)
+ && !loop->simduid);
+ if (!vect_epilogues)
+ return first_loop_vinfo;
+@@ -5870,34 +5857,6 @@ vect_create_partial_epilog (tree vec_def, tree vectype, code_helper code,
+ return new_temp;
+ }
+
+-/* Retrieves the definining statement to be used for a reduction.
+- For MAIN_EXIT_P we use the current VEC_STMTs and otherwise we look at
+- the reduction definitions. */
+-
+-tree
+-vect_get_vect_def (stmt_vec_info reduc_info, slp_tree slp_node,
+- slp_instance slp_node_instance, bool main_exit_p, unsigned i,
+- vec <gimple *> &vec_stmts)
+-{
+- tree def;
+-
+- if (slp_node)
+- {
+- if (!main_exit_p)
+- slp_node = slp_node_instance->reduc_phis;
+- def = vect_get_slp_vect_def (slp_node, i);
+- }
+- else
+- {
+- if (!main_exit_p)
+- reduc_info = STMT_VINFO_REDUC_DEF (vect_orig_stmt (reduc_info));
+- vec_stmts = STMT_VINFO_VEC_STMTS (reduc_info);
+- def = gimple_get_lhs (vec_stmts[0]);
+- }
+-
+- return def;
+-}
+-
+ /* Function vect_create_epilog_for_reduction
+
+ Create code at the loop-epilog to finalize the result of a reduction
+@@ -5909,8 +5868,6 @@ vect_get_vect_def (stmt_vec_info reduc_info, slp_tree slp_node,
+ SLP_NODE_INSTANCE is the SLP node instance containing SLP_NODE
+ REDUC_INDEX says which rhs operand of the STMT_INFO is the reduction phi
+ (counting from 0)
+- LOOP_EXIT is the edge to update in the merge block. In the case of a single
+- exit this edge is always the main loop exit.
+
+ This function:
+ 1. Completes the reduction def-use cycles.
+@@ -5951,8 +5908,7 @@ static void
+ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ stmt_vec_info stmt_info,
+ slp_tree slp_node,
+- slp_instance slp_node_instance,
+- edge loop_exit)
++ slp_instance slp_node_instance)
+ {
+ stmt_vec_info reduc_info = info_for_reduction (loop_vinfo, stmt_info);
+ gcc_assert (reduc_info->is_reduc_info);
+@@ -5961,7 +5917,6 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ loop-closed PHI of the inner loop which we remember as
+ def for the reduction PHI generation. */
+ bool double_reduc = false;
+- bool main_exit_p = LOOP_VINFO_IV_EXIT (loop_vinfo) == loop_exit;
+ stmt_vec_info rdef_info = stmt_info;
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
+ {
+@@ -6124,7 +6079,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ /* Create an induction variable. */
+ gimple_stmt_iterator incr_gsi;
+ bool insert_after;
+- vect_iv_increment_position (loop_exit, &incr_gsi, &insert_after);
++ standard_iv_increment_position (loop, &incr_gsi, &insert_after);
+ create_iv (series_vect, PLUS_EXPR, vec_step, NULL_TREE, loop, &incr_gsi,
+ insert_after, &indx_before_incr, &indx_after_incr);
+
+@@ -6203,23 +6158,23 @@ vect_create_epilog_for_reduction (loop_vec_info loop_vinfo,
+ Store them in NEW_PHIS. */
+ if (double_reduc)
+ loop = outer_loop;
+- /* We need to reduce values in all exits. */
+- exit_bb = loop_exit->dest;
++ exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
+ exit_gsi = gsi_after_labels (exit_bb);
+ reduc_inputs.create (slp_node ? vec_num : ncopies);
+- vec <gimple *> vec_stmts;
+ for (unsigned i = 0; i < vec_num; i++)
+ {
+ gimple_seq stmts = NULL;
+- def = vect_get_vect_def (rdef_info, slp_node, slp_node_instance,
+- main_exit_p, i, vec_stmts);
++ if (slp_node)
++ def = vect_get_slp_vect_def (slp_node, i);
++ else
++ def = gimple_get_lhs (STMT_VINFO_VEC_STMTS (rdef_info)[0]);
+ for (j = 0; j < ncopies; j++)
+ {
+ tree new_def = copy_ssa_name (def);
+ phi = create_phi_node (new_def, exit_bb);
+ if (j)
+- def = gimple_get_lhs (vec_stmts[j]);
+- SET_PHI_ARG_DEF (phi, loop_exit->dest_idx, def);
++ def = gimple_get_lhs (STMT_VINFO_VEC_STMTS (rdef_info)[j]);
++ SET_PHI_ARG_DEF (phi, LOOP_VINFO_IV_EXIT (loop_vinfo)->dest_idx, def);
+ new_def = gimple_convert (&stmts, vectype, new_def);
+ reduc_inputs.quick_push (new_def);
+ }
+@@ -10569,146 +10524,6 @@ vectorizable_induction (loop_vec_info loop_vinfo,
+ return true;
+ }
+
+-/* Function vectorizable_live_operation_1.
+-
+- helper function for vectorizable_live_operation. */
+-
+-tree
+-vectorizable_live_operation_1 (loop_vec_info loop_vinfo,
+- stmt_vec_info stmt_info, basic_block exit_bb,
+- tree vectype, int ncopies, slp_tree slp_node,
+- tree bitsize, tree bitstart, tree vec_lhs,
+- tree lhs_type, bool restart_loop,
+- gimple_stmt_iterator *exit_gsi)
+-{
+- gcc_assert (single_pred_p (exit_bb) || LOOP_VINFO_EARLY_BREAKS (loop_vinfo));
+-
+- tree vec_lhs_phi = copy_ssa_name (vec_lhs);
+- gimple *phi = create_phi_node (vec_lhs_phi, exit_bb);
+- for (unsigned i = 0; i < gimple_phi_num_args (phi); i++)
+- SET_PHI_ARG_DEF (phi, i, vec_lhs);
+-
+- gimple_seq stmts = NULL;
+- tree new_tree;
+- if (LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo))
+- {
+- /* Emit:
+-
+- SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>
+-
+- where VEC_LHS is the vectorized live-out result and MASK is
+- the loop mask for the final iteration. */
+- gcc_assert (ncopies == 1 && !slp_node);
+- gimple_seq tem = NULL;
+- gimple_stmt_iterator gsi = gsi_last (tem);
+- tree len = vect_get_loop_len (loop_vinfo, &gsi,
+- &LOOP_VINFO_LENS (loop_vinfo),
+- 1, vectype, 0, 0);
+-
+- /* BIAS - 1. */
+- signed char biasval = LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo);
+- tree bias_minus_one
+- = int_const_binop (MINUS_EXPR,
+- build_int_cst (TREE_TYPE (len), biasval),
+- build_one_cst (TREE_TYPE (len)));
+-
+- /* LAST_INDEX = LEN + (BIAS - 1). */
+- tree last_index = gimple_build (&stmts, PLUS_EXPR, TREE_TYPE (len),
+- len, bias_minus_one);
+-
+- /* This needs to implement extraction of the first index, but not sure
+- how the LEN stuff works. At the moment we shouldn't get here since
+- there's no LEN support for early breaks. But guard this so there's
+- no incorrect codegen. */
+- gcc_assert (!LOOP_VINFO_EARLY_BREAKS (loop_vinfo));
+-
+- /* SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>. */
+- tree scalar_res
+- = gimple_build (&stmts, CFN_VEC_EXTRACT, TREE_TYPE (vectype),
+- vec_lhs_phi, last_index);
+-
+- /* Convert the extracted vector element to the scalar type. */
+- new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
+- }
+- else if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))
+- {
+- /* Emit:
+-
+- SCALAR_RES = EXTRACT_LAST <VEC_LHS, MASK>
+-
+- where VEC_LHS is the vectorized live-out result and MASK is
+- the loop mask for the final iteration. */
+- gcc_assert (!slp_node);
+- tree scalar_type = TREE_TYPE (STMT_VINFO_VECTYPE (stmt_info));
+- gimple_seq tem = NULL;
+- gimple_stmt_iterator gsi = gsi_last (tem);
+- tree mask = vect_get_loop_mask (loop_vinfo, &gsi,
+- &LOOP_VINFO_MASKS (loop_vinfo),
+- 1, vectype, 0);
+- tree scalar_res;
+-
+- /* For an inverted control flow with early breaks we want EXTRACT_FIRST
+- instead of EXTRACT_LAST. Emulate by reversing the vector and mask. */
+- if (restart_loop && LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- {
+- /* First create the permuted mask. */
+- tree perm_mask = perm_mask_for_reverse (TREE_TYPE (mask));
+- tree perm_dest = copy_ssa_name (mask);
+- gimple *perm_stmt
+- = gimple_build_assign (perm_dest, VEC_PERM_EXPR, mask,
+- mask, perm_mask);
+- vect_finish_stmt_generation (loop_vinfo, stmt_info, perm_stmt,
+- &gsi);
+- mask = perm_dest;
+-
+- /* Then permute the vector contents. */
+- tree perm_elem = perm_mask_for_reverse (vectype);
+- perm_dest = copy_ssa_name (vec_lhs_phi);
+- perm_stmt
+- = gimple_build_assign (perm_dest, VEC_PERM_EXPR, vec_lhs_phi,
+- vec_lhs_phi, perm_elem);
+- vect_finish_stmt_generation (loop_vinfo, stmt_info, perm_stmt,
+- &gsi);
+- vec_lhs_phi = perm_dest;
+- }
+-
+- gimple_seq_add_seq (&stmts, tem);
+-
+- scalar_res = gimple_build (&stmts, CFN_EXTRACT_LAST, scalar_type,
+- mask, vec_lhs_phi);
+-
+- /* Convert the extracted vector element to the scalar type. */
+- new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
+- }
+- else
+- {
+- tree bftype = TREE_TYPE (vectype);
+- if (VECTOR_BOOLEAN_TYPE_P (vectype))
+- bftype = build_nonstandard_integer_type (tree_to_uhwi (bitsize), 1);
+- new_tree = build3 (BIT_FIELD_REF, bftype, vec_lhs_phi, bitsize, bitstart);
+- new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree),
+- &stmts, true, NULL_TREE);
+- }
+-
+- *exit_gsi = gsi_after_labels (exit_bb);
+- if (stmts)
+- gsi_insert_seq_before (exit_gsi, stmts, GSI_SAME_STMT);
+-
+- return new_tree;
+-}
+-
+-/* Find the edge that's the final one in the path from SRC to DEST and
+- return it. This edge must exist in at most one forwarder edge between. */
+-
+-static edge
+-find_connected_edge (edge src, basic_block dest)
+-{
+- if (src->dest == dest)
+- return src;
+-
+- return find_edge (src->dest, dest);
+-}
+-
+ /* Function vectorizable_live_operation.
+
+ STMT_INFO computes a value that is used outside the loop. Check if
+@@ -10729,13 +10544,11 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
+ int ncopies;
+ gimple *use_stmt;
+- use_operand_p use_p;
+ auto_vec<tree> vec_oprnds;
+ int vec_entry = 0;
+ poly_uint64 vec_index = 0;
+
+- gcc_assert (STMT_VINFO_LIVE_P (stmt_info)
+- || LOOP_VINFO_EARLY_BREAKS (loop_vinfo));
++ gcc_assert (STMT_VINFO_LIVE_P (stmt_info));
+
+ /* If a stmt of a reduction is live, vectorize it via
+ vect_create_epilog_for_reduction. vectorizable_reduction assessed
+@@ -10760,25 +10573,8 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ if (STMT_VINFO_REDUC_TYPE (reduc_info) == FOLD_LEFT_REDUCTION
+ || STMT_VINFO_REDUC_TYPE (reduc_info) == EXTRACT_LAST_REDUCTION)
+ return true;
+-
+ vect_create_epilog_for_reduction (loop_vinfo, stmt_info, slp_node,
+- slp_node_instance,
+- LOOP_VINFO_IV_EXIT (loop_vinfo));
+-
+- /* If early break we only have to materialize the reduction on the merge
+- block, but we have to find an alternate exit first. */
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- {
+- for (auto exit : get_loop_exit_edges (LOOP_VINFO_LOOP (loop_vinfo)))
+- if (exit != LOOP_VINFO_IV_EXIT (loop_vinfo))
+- {
+- vect_create_epilog_for_reduction (loop_vinfo, stmt_info,
+- slp_node, slp_node_instance,
+- exit);
+- break;
+- }
+- }
+-
++ slp_node_instance);
+ return true;
+ }
+
+@@ -10889,8 +10685,8 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ bitsize = vector_element_bits_tree (vectype);
+
+ /* Get the vectorized lhs of STMT and the lane to use (counted in bits). */
+- tree vec_lhs, vec_lhs0, bitstart;
+- gimple *vec_stmt, *vec_stmt0;
++ tree vec_lhs, bitstart;
++ gimple *vec_stmt;
+ if (slp_node)
+ {
+ gcc_assert (!loop_vinfo
+@@ -10901,10 +10697,6 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ vec_lhs = SLP_TREE_VEC_DEFS (slp_node)[vec_entry];
+ vec_stmt = SSA_NAME_DEF_STMT (vec_lhs);
+
+- /* In case we need to early break vectorize also get the first stmt. */
+- vec_lhs0 = SLP_TREE_VEC_DEFS (slp_node)[0];
+- vec_stmt0 = SSA_NAME_DEF_STMT (vec_lhs0);
+-
+ /* Get entry to use. */
+ bitstart = bitsize_int (vec_index);
+ bitstart = int_const_binop (MULT_EXPR, bitsize, bitstart);
+@@ -10915,10 +10707,6 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ vec_stmt = STMT_VINFO_VEC_STMTS (stmt_info).last ();
+ vec_lhs = gimple_get_lhs (vec_stmt);
+
+- /* In case we need to early break vectorize also get the first stmt. */
+- vec_stmt0 = STMT_VINFO_VEC_STMTS (stmt_info)[0];
+- vec_lhs0 = gimple_get_lhs (vec_stmt0);
+-
+ /* Get the last lane in the vector. */
+ bitstart = int_const_binop (MULT_EXPR, bitsize, bitsize_int (nunits - 1));
+ }
+@@ -10938,60 +10726,103 @@ vectorizable_live_operation (vec_info *vinfo, stmt_vec_info stmt_info,
+ lhs' = new_tree; */
+
+ class loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
+- /* Check if we have a loop where the chosen exit is not the main exit,
+- in these cases for an early break we restart the iteration the vector code
+- did. For the live values we want the value at the start of the iteration
+- rather than at the end. */
+- edge main_e = LOOP_VINFO_IV_EXIT (loop_vinfo);
+- bool restart_loop = LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo);
+- FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
+- if (!is_gimple_debug (use_stmt)
+- && !flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
+- FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
+- {
+- edge e = gimple_phi_arg_edge (as_a <gphi *> (use_stmt),
+- phi_arg_index_from_use (use_p));
+- bool main_exit_edge = e == main_e
+- || find_connected_edge (main_e, e->src);
+-
+- /* Early exits have an merge block, we want the merge block itself
+- so use ->src. For main exit the merge block is the
+- destination. */
+- basic_block dest = main_exit_edge ? main_e->dest : e->src;
+- tree tmp_vec_lhs = vec_lhs;
+- tree tmp_bitstart = bitstart;
+-
+- /* For early exit where the exit is not in the BB that leads
+- to the latch then we're restarting the iteration in the
+- scalar loop. So get the first live value. */
+- restart_loop = restart_loop || !main_exit_edge;
+- if (restart_loop
+- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
+- {
+- tmp_vec_lhs = vec_lhs0;
+- tmp_bitstart = build_zero_cst (TREE_TYPE (bitstart));
+- }
++ basic_block exit_bb = LOOP_VINFO_IV_EXIT (loop_vinfo)->dest;
++ gcc_assert (single_pred_p (exit_bb));
+
+- gimple_stmt_iterator exit_gsi;
+- tree new_tree
+- = vectorizable_live_operation_1 (loop_vinfo, stmt_info,
+- dest, vectype, ncopies,
+- slp_node, bitsize,
+- tmp_bitstart, tmp_vec_lhs,
+- lhs_type, restart_loop,
+- &exit_gsi);
++ tree vec_lhs_phi = copy_ssa_name (vec_lhs);
++ gimple *phi = create_phi_node (vec_lhs_phi, exit_bb);
++ SET_PHI_ARG_DEF (phi, LOOP_VINFO_IV_EXIT (loop_vinfo)->dest_idx, vec_lhs);
+
+- if (gimple_phi_num_args (use_stmt) == 1)
+- {
+- auto gsi = gsi_for_stmt (use_stmt);
+- remove_phi_node (&gsi, false);
+- tree lhs_phi = gimple_phi_result (use_stmt);
+- gimple *copy = gimple_build_assign (lhs_phi, new_tree);
+- gsi_insert_before (&exit_gsi, copy, GSI_SAME_STMT);
+- }
+- else
+- SET_PHI_ARG_DEF (use_stmt, e->dest_idx, new_tree);
+- }
++ gimple_seq stmts = NULL;
++ tree new_tree;
++ if (LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo))
++ {
++ /* Emit:
++
++ SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>
++
++ where VEC_LHS is the vectorized live-out result and MASK is
++ the loop mask for the final iteration. */
++ gcc_assert (ncopies == 1 && !slp_node);
++ gimple_seq tem = NULL;
++ gimple_stmt_iterator gsi = gsi_last (tem);
++ tree len
++ = vect_get_loop_len (loop_vinfo, &gsi,
++ &LOOP_VINFO_LENS (loop_vinfo),
++ 1, vectype, 0, 0);
++
++ /* BIAS - 1. */
++ signed char biasval = LOOP_VINFO_PARTIAL_LOAD_STORE_BIAS (loop_vinfo);
++ tree bias_minus_one
++ = int_const_binop (MINUS_EXPR,
++ build_int_cst (TREE_TYPE (len), biasval),
++ build_one_cst (TREE_TYPE (len)));
++
++ /* LAST_INDEX = LEN + (BIAS - 1). */
++ tree last_index = gimple_build (&stmts, PLUS_EXPR, TREE_TYPE (len),
++ len, bias_minus_one);
++
++ /* SCALAR_RES = VEC_EXTRACT <VEC_LHS, LEN + BIAS - 1>. */
++ tree scalar_res
++ = gimple_build (&stmts, CFN_VEC_EXTRACT, TREE_TYPE (vectype),
++ vec_lhs_phi, last_index);
++
++ /* Convert the extracted vector element to the scalar type. */
++ new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
++ }
++ else if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))
++ {
++ /* Emit:
++
++ SCALAR_RES = EXTRACT_LAST <VEC_LHS, MASK>
++
++ where VEC_LHS is the vectorized live-out result and MASK is
++ the loop mask for the final iteration. */
++ gcc_assert (ncopies == 1 && !slp_node);
++ tree scalar_type = TREE_TYPE (STMT_VINFO_VECTYPE (stmt_info));
++ gimple_seq tem = NULL;
++ gimple_stmt_iterator gsi = gsi_last (tem);
++ tree mask = vect_get_loop_mask (loop_vinfo, &gsi,
++ &LOOP_VINFO_MASKS (loop_vinfo),
++ 1, vectype, 0);
++ gimple_seq_add_seq (&stmts, tem);
++ tree scalar_res = gimple_build (&stmts, CFN_EXTRACT_LAST, scalar_type,
++ mask, vec_lhs_phi);
++
++ /* Convert the extracted vector element to the scalar type. */
++ new_tree = gimple_convert (&stmts, lhs_type, scalar_res);
++ }
++ else
++ {
++ tree bftype = TREE_TYPE (vectype);
++ if (VECTOR_BOOLEAN_TYPE_P (vectype))
++ bftype = build_nonstandard_integer_type (tree_to_uhwi (bitsize), 1);
++ new_tree = build3 (BIT_FIELD_REF, bftype,
++ vec_lhs_phi, bitsize, bitstart);
++ new_tree = force_gimple_operand (fold_convert (lhs_type, new_tree),
++ &stmts, true, NULL_TREE);
++ }
++
++ gimple_stmt_iterator exit_gsi = gsi_after_labels (exit_bb);
++ if (stmts)
++ gsi_insert_seq_before (&exit_gsi, stmts, GSI_SAME_STMT);
++
++ /* Remove existing phis that copy from lhs and create copies
++ from new_tree. */
++ gimple_stmt_iterator gsi;
++ for (gsi = gsi_start_phis (exit_bb); !gsi_end_p (gsi);)
++ {
++ gimple *phi = gsi_stmt (gsi);
++ if ((gimple_phi_arg_def (phi, 0) == lhs))
++ {
++ remove_phi_node (&gsi, false);
++ tree lhs_phi = gimple_phi_result (phi);
++ gimple *copy = gimple_build_assign (lhs_phi, new_tree);
++ gsi_insert_before (&exit_gsi, copy, GSI_SAME_STMT);
++ }
++ else
++ gsi_next (&gsi);
++ }
+
+ /* There a no further out-of-loop uses of lhs by LC-SSA construction. */
+ FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
+@@ -11770,56 +11601,6 @@ update_epilogue_loop_vinfo (class loop *epilogue, tree advance)
+ epilogue_vinfo->shared->save_datarefs ();
+ }
+
+-/* When vectorizing early break statements instructions that happen before
+- the early break in the current BB need to be moved to after the early
+- break. This function deals with that and assumes that any validity
+- checks has already been performed.
+-
+- While moving the instructions if it encounters a VUSE or VDEF it then
+- corrects the VUSES as it moves the statements along. GDEST is the location
+- in which to insert the new statements. */
+-
+-static void
+-move_early_exit_stmts (loop_vec_info loop_vinfo)
+-{
+- DUMP_VECT_SCOPE ("move_early_exit_stmts");
+-
+- if (LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo).is_empty ())
+- return;
+-
+- /* Move all stmts that need moving. */
+- basic_block dest_bb = LOOP_VINFO_EARLY_BRK_DEST_BB (loop_vinfo);
+- gimple_stmt_iterator dest_gsi = gsi_start_bb (dest_bb);
+-
+- for (gimple *stmt : LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo))
+- {
+- /* Check to see if statement is still required for vect or has been
+- elided. */
+- auto stmt_info = loop_vinfo->lookup_stmt (stmt);
+- if (!stmt_info)
+- continue;
+-
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location, "moving stmt %G", stmt);
+-
+- gimple_stmt_iterator stmt_gsi = gsi_for_stmt (stmt);
+- gsi_move_before (&stmt_gsi, &dest_gsi);
+- gsi_prev (&dest_gsi);
+- }
+-
+- /* Update all the stmts with their new reaching VUSES. */
+- tree vuse
+- = gimple_vuse (LOOP_VINFO_EARLY_BRK_STORES (loop_vinfo).last ());
+- for (auto p : LOOP_VINFO_EARLY_BRK_VUSES (loop_vinfo))
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "updating vuse to %T for load %G", vuse, p);
+- gimple_set_vuse (p, vuse);
+- update_stmt (p);
+- }
+-}
+-
+ /* Function vect_transform_loop.
+
+ The analysis phase has determined that the loop is vectorizable.
+@@ -11867,7 +11648,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
+ /* Make sure there exists a single-predecessor exit bb. Do this before
+ versioning. */
+ edge e = LOOP_VINFO_IV_EXIT (loop_vinfo);
+- if (! single_pred_p (e->dest) && !LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
++ if (! single_pred_p (e->dest))
+ {
+ split_loop_exit_edge (e, true);
+ if (dump_enabled_p ())
+@@ -11961,11 +11742,6 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
+ /* This will deal with any possible peeling. */
+ vect_prepare_for_masked_peels (loop_vinfo);
+
+- /* Handle any code motion that we need to for early-break vectorization after
+- we've done peeling but just before we start vectorizing. */
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- move_early_exit_stmts (loop_vinfo);
+-
+ /* Schedule the SLP instances first, then handle loop vectorization
+ below. */
+ if (!loop_vinfo->slp_instances.is_empty ())
+diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
+index 2053673debe9..696b70b76a82 100644
+--- a/gcc/tree-vect-patterns.cc
++++ b/gcc/tree-vect-patterns.cc
+@@ -132,7 +132,6 @@ vect_init_pattern_stmt (vec_info *vinfo, gimple *pattern_stmt,
+ if (!STMT_VINFO_VECTYPE (pattern_stmt_info))
+ {
+ gcc_assert (!vectype
+- || is_a <gcond *> (pattern_stmt)
+ || (VECTOR_BOOLEAN_TYPE_P (vectype)
+ == vect_use_mask_type_p (orig_stmt_info)));
+ STMT_VINFO_VECTYPE (pattern_stmt_info) = vectype;
+@@ -2787,30 +2786,15 @@ vect_recog_bitfield_ref_pattern (vec_info *vinfo, stmt_vec_info stmt_info,
+
+ if (!lhs)
+ {
+- if (!vectype)
+- return NULL;
+-
+ append_pattern_def_seq (vinfo, stmt_info, pattern_stmt, vectype);
+- vectype = truth_type_for (vectype);
+-
+- /* FIXME: This part extracts the boolean value out of the bitfield in the
+- same way as vect_recog_gcond_pattern does. However because
+- patterns cannot match the same root twice, when we handle and
+- lower the bitfield in the gcond, vect_recog_gcond_pattern can't
+- apply anymore. We should really fix it so that we don't need to
+- duplicate transformations like these. */
+- tree new_lhs = vect_recog_temp_ssa_var (boolean_type_node, NULL);
+ gcond *cond_stmt = dyn_cast <gcond *> (stmt_info->stmt);
+ tree cond_cst = gimple_cond_rhs (cond_stmt);
+- gimple *new_stmt
+- = gimple_build_assign (new_lhs, gimple_cond_code (cond_stmt),
+- gimple_get_lhs (pattern_stmt),
+- fold_convert (container_type, cond_cst));
+- append_pattern_def_seq (vinfo, stmt_info, new_stmt, vectype, container_type);
+ pattern_stmt
+- = gimple_build_cond (NE_EXPR, new_lhs,
+- build_zero_cst (TREE_TYPE (new_lhs)),
+- NULL_TREE, NULL_TREE);
++ = gimple_build_cond (gimple_cond_code (cond_stmt),
++ gimple_get_lhs (pattern_stmt),
++ fold_convert (ret_type, cond_cst),
++ gimple_cond_true_label (cond_stmt),
++ gimple_cond_false_label (cond_stmt));
+ }
+
+ *type_out = STMT_VINFO_VECTYPE (stmt_info);
+@@ -5569,78 +5553,6 @@ integer_type_for_mask (tree var, vec_info *vinfo)
+ return build_nonstandard_integer_type (def_stmt_info->mask_precision, 1);
+ }
+
+-/* Function vect_recog_gcond_pattern
+-
+- Try to find pattern like following:
+-
+- if (a op b)
+-
+- where operator 'op' is not != and convert it to an adjusted boolean pattern
+-
+- mask = a op b
+- if (mask != 0)
+-
+- and set the mask type on MASK.
+-
+- Input:
+-
+- * STMT_VINFO: The stmt at the end from which the pattern
+- search begins, i.e. cast of a bool to
+- an integer type.
+-
+- Output:
+-
+- * TYPE_OUT: The type of the output of this pattern.
+-
+- * Return value: A new stmt that will be used to replace the pattern. */
+-
+-static gimple *
+-vect_recog_gcond_pattern (vec_info *vinfo,
+- stmt_vec_info stmt_vinfo, tree *type_out)
+-{
+- /* Currently we only support this for loop vectorization and when multiple
+- exits. */
+- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
+- if (!loop_vinfo || !LOOP_VINFO_EARLY_BREAKS (loop_vinfo))
+- return NULL;
+-
+- gimple *last_stmt = STMT_VINFO_STMT (stmt_vinfo);
+- gcond* cond = NULL;
+- if (!(cond = dyn_cast <gcond *> (last_stmt)))
+- return NULL;
+-
+- auto lhs = gimple_cond_lhs (cond);
+- auto rhs = gimple_cond_rhs (cond);
+- auto code = gimple_cond_code (cond);
+-
+- tree scalar_type = TREE_TYPE (lhs);
+- if (VECTOR_TYPE_P (scalar_type))
+- return NULL;
+-
+- if (code == NE_EXPR
+- && zerop (rhs)
+- && VECT_SCALAR_BOOLEAN_TYPE_P (scalar_type))
+- return NULL;
+-
+- tree vecitype = get_vectype_for_scalar_type (vinfo, scalar_type);
+- if (vecitype == NULL_TREE)
+- return NULL;
+-
+- tree vectype = truth_type_for (vecitype);
+-
+- tree new_lhs = vect_recog_temp_ssa_var (boolean_type_node, NULL);
+- gimple *new_stmt = gimple_build_assign (new_lhs, code, lhs, rhs);
+- append_pattern_def_seq (vinfo, stmt_vinfo, new_stmt, vectype, scalar_type);
+-
+- gimple *pattern_stmt
+- = gimple_build_cond (NE_EXPR, new_lhs,
+- build_int_cst (TREE_TYPE (new_lhs), 0),
+- NULL_TREE, NULL_TREE);
+- *type_out = vectype;
+- vect_pattern_detected ("vect_recog_gcond_pattern", last_stmt);
+- return pattern_stmt;
+-}
+-
+ /* Function vect_recog_bool_pattern
+
+ Try to find pattern like following:
+@@ -6679,26 +6591,15 @@ static bool
+ possible_vector_mask_operation_p (stmt_vec_info stmt_info)
+ {
+ tree lhs = gimple_get_lhs (stmt_info->stmt);
+- tree_code code = ERROR_MARK;
+- gassign *assign = NULL;
+- gcond *cond = NULL;
+-
+- if ((assign = dyn_cast <gassign *> (stmt_info->stmt)))
+- code = gimple_assign_rhs_code (assign);
+- else if ((cond = dyn_cast <gcond *> (stmt_info->stmt)))
+- {
+- lhs = gimple_cond_lhs (cond);
+- code = gimple_cond_code (cond);
+- }
+-
+ if (!lhs
+ || TREE_CODE (lhs) != SSA_NAME
+ || !VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (lhs)))
+ return false;
+
+- if (code != ERROR_MARK)
++ if (gassign *assign = dyn_cast <gassign *> (stmt_info->stmt))
+ {
+- switch (code)
++ tree_code rhs_code = gimple_assign_rhs_code (assign);
++ switch (rhs_code)
+ {
+ CASE_CONVERT:
+ case SSA_NAME:
+@@ -6709,7 +6610,7 @@ possible_vector_mask_operation_p (stmt_vec_info stmt_info)
+ return true;
+
+ default:
+- return TREE_CODE_CLASS (code) == tcc_comparison;
++ return TREE_CODE_CLASS (rhs_code) == tcc_comparison;
+ }
+ }
+ else if (is_a <gphi *> (stmt_info->stmt))
+@@ -6756,35 +6657,12 @@ vect_determine_mask_precision (vec_info *vinfo, stmt_vec_info stmt_info)
+ The number of operations are equal, but M16 would have given
+ a shorter dependency chain and allowed more ILP. */
+ unsigned int precision = ~0U;
+- gimple *stmt = STMT_VINFO_STMT (stmt_info);
+-
+- /* If the statement compares two values that shouldn't use vector masks,
+- try comparing the values as normal scalars instead. */
+- tree_code code = ERROR_MARK;
+- tree op0_type;
+- unsigned int nops = -1;
+- unsigned int ops_start = 0;
+-
+- if (gassign *assign = dyn_cast <gassign *> (stmt))
+- {
+- code = gimple_assign_rhs_code (assign);
+- op0_type = TREE_TYPE (gimple_assign_rhs1 (assign));
+- nops = gimple_num_ops (assign);
+- ops_start = 1;
+- }
+- else if (gcond *cond = dyn_cast <gcond *> (stmt))
++ if (gassign *assign = dyn_cast <gassign *> (stmt_info->stmt))
+ {
+- code = gimple_cond_code (cond);
+- op0_type = TREE_TYPE (gimple_cond_lhs (cond));
+- nops = 2;
+- ops_start = 0;
+- }
+-
+- if (code != ERROR_MARK)
+- {
+- for (unsigned int i = ops_start; i < nops; ++i)
++ unsigned int nops = gimple_num_ops (assign);
++ for (unsigned int i = 1; i < nops; ++i)
+ {
+- tree rhs = gimple_op (stmt, i);
++ tree rhs = gimple_op (assign, i);
+ if (!VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (rhs)))
+ continue;
+
+@@ -6801,15 +6679,19 @@ vect_determine_mask_precision (vec_info *vinfo, stmt_vec_info stmt_info)
+ }
+ }
+
++ /* If the statement compares two values that shouldn't use vector masks,
++ try comparing the values as normal scalars instead. */
++ tree_code rhs_code = gimple_assign_rhs_code (assign);
+ if (precision == ~0U
+- && TREE_CODE_CLASS (code) == tcc_comparison)
++ && TREE_CODE_CLASS (rhs_code) == tcc_comparison)
+ {
++ tree rhs1_type = TREE_TYPE (gimple_assign_rhs1 (assign));
+ scalar_mode mode;
+ tree vectype, mask_type;
+- if (is_a <scalar_mode> (TYPE_MODE (op0_type), &mode)
+- && (vectype = get_vectype_for_scalar_type (vinfo, op0_type))
+- && (mask_type = get_mask_type_for_scalar_type (vinfo, op0_type))
+- && expand_vec_cmp_expr_p (vectype, mask_type, code))
++ if (is_a <scalar_mode> (TYPE_MODE (rhs1_type), &mode)
++ && (vectype = get_vectype_for_scalar_type (vinfo, rhs1_type))
++ && (mask_type = get_mask_type_for_scalar_type (vinfo, rhs1_type))
++ && expand_vec_cmp_expr_p (vectype, mask_type, rhs_code))
+ precision = GET_MODE_BITSIZE (mode);
+ }
+ }
+@@ -6988,7 +6870,6 @@ static vect_recog_func vect_vect_recog_func_ptrs[] = {
+ { vect_recog_divmod_pattern, "divmod" },
+ { vect_recog_mult_pattern, "mult" },
+ { vect_recog_mixed_size_cond_pattern, "mixed_size_cond" },
+- { vect_recog_gcond_pattern, "gcond" },
+ { vect_recog_bool_pattern, "bool" },
+ /* This must come before mask conversion, and includes the parts
+ of mask conversion that are needed for gather and scatter
+@@ -7076,10 +6957,6 @@ vect_mark_pattern_stmts (vec_info *vinfo,
+ vect_set_pattern_stmt (vinfo,
+ pattern_stmt, orig_stmt_info, pattern_vectype);
+
+- /* For any conditionals mark them as vect_condition_def. */
+- if (is_a <gcond *> (pattern_stmt))
+- STMT_VINFO_DEF_TYPE (STMT_VINFO_RELATED_STMT (orig_stmt_info)) = vect_condition_def;
+-
+ /* Transfer reduction path info to the pattern. */
+ if (STMT_VINFO_REDUC_IDX (orig_stmt_info_saved) != -1)
+ {
+diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
+index 1333d8934783..e9ff728dfd40 100644
+--- a/gcc/tree-vect-stmts.cc
++++ b/gcc/tree-vect-stmts.cc
+@@ -342,7 +342,6 @@ is_simple_and_all_uses_invariant (stmt_vec_info stmt_info,
+ - it has uses outside the loop.
+ - it has vdefs (it alters memory).
+ - control stmts in the loop (except for the exit condition).
+- - it is an induction and we have multiple exits.
+
+ CHECKME: what other side effects would the vectorizer allow? */
+
+@@ -360,10 +359,8 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo,
+ *live_p = false;
+
+ /* cond stmt other than loop exit cond. */
+- gimple *stmt = STMT_VINFO_STMT (stmt_info);
+- if (is_ctrl_stmt (stmt)
+- && LOOP_VINFO_LOOP_IV_COND (loop_vinfo) != stmt
+- && (!loop->inner || gimple_bb (stmt)->loop_father == loop))
++ if (is_ctrl_stmt (stmt_info->stmt)
++ && STMT_VINFO_TYPE (stmt_info) != loop_exit_ctrl_vec_info_type)
+ *relevant = vect_used_in_scope;
+
+ /* changing memory. */
+@@ -395,25 +392,13 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo,
+ /* We expect all such uses to be in the loop exit phis
+ (because of loop closed form) */
+ gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
++ gcc_assert (bb == single_exit (loop)->dest);
+
+ *live_p = true;
+ }
+ }
+ }
+
+- /* Check if it's an induction and multiple exits. In this case there will be
+- a usage later on after peeling which is needed for the alternate exit. */
+- if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
+- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def)
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location,
+- "vec_stmt_relevant_p: induction forced for "
+- "early break.\n");
+- *live_p = true;
+-
+- }
+-
+ if (*live_p && *relevant == vect_unused_in_scope
+ && !is_simple_and_all_uses_invariant (stmt_info, loop_vinfo))
+ {
+@@ -808,20 +793,6 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal)
+ return res;
+ }
+ }
+- }
+- else if (gcond *cond = dyn_cast <gcond *> (stmt_vinfo->stmt))
+- {
+- tree_code rhs_code = gimple_cond_code (cond);
+- gcc_assert (TREE_CODE_CLASS (rhs_code) == tcc_comparison);
+- opt_result res
+- = process_use (stmt_vinfo, gimple_cond_lhs (cond),
+- loop_vinfo, relevant, &worklist, false);
+- if (!res)
+- return res;
+- res = process_use (stmt_vinfo, gimple_cond_rhs (cond),
+- loop_vinfo, relevant, &worklist, false);
+- if (!res)
+- return res;
+ }
+ else if (gcall *call = dyn_cast <gcall *> (stmt_vinfo->stmt))
+ {
+@@ -835,8 +806,6 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal)
+ return res;
+ }
+ }
+- else
+- gcc_unreachable ();
+ }
+ else
+ FOR_EACH_PHI_OR_STMT_USE (use_p, stmt_vinfo->stmt, iter, SSA_OP_USE)
+@@ -1805,7 +1774,7 @@ compare_step_with_zero (vec_info *vinfo, stmt_vec_info stmt_info)
+ /* If the target supports a permute mask that reverses the elements in
+ a vector of type VECTYPE, return that mask, otherwise return null. */
+
+-tree
++static tree
+ perm_mask_for_reverse (tree vectype)
+ {
+ poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
+@@ -12573,7 +12542,7 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype,
+ vec<tree> vec_oprnds0 = vNULL;
+ vec<tree> vec_oprnds1 = vNULL;
+ tree mask_type;
+- tree mask = NULL_TREE;
++ tree mask;
+
+ if (!STMT_VINFO_RELEVANT_P (stmt_info) && !bb_vinfo)
+ return false;
+@@ -12713,9 +12682,8 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype,
+ /* Transform. */
+
+ /* Handle def. */
+- lhs = gimple_get_lhs (STMT_VINFO_STMT (stmt_info));
+- if (lhs)
+- mask = vect_create_destination_var (lhs, mask_type);
++ lhs = gimple_assign_lhs (STMT_VINFO_STMT (stmt_info));
++ mask = vect_create_destination_var (lhs, mask_type);
+
+ vect_get_vec_defs (vinfo, stmt_info, slp_node, ncopies,
+ rhs1, vectype, &vec_oprnds0,
+@@ -12729,10 +12697,7 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype,
+ gimple *new_stmt;
+ vec_rhs2 = vec_oprnds1[i];
+
+- if (lhs)
+- new_temp = make_ssa_name (mask);
+- else
+- new_temp = make_temp_ssa_name (mask_type, NULL, "cmp");
++ new_temp = make_ssa_name (mask);
+ if (bitop1 == NOP_EXPR)
+ {
+ new_stmt = gimple_build_assign (new_temp, code,
+@@ -12811,213 +12776,6 @@ vectorizable_comparison (vec_info *vinfo,
+ return true;
+ }
+
+-/* Check to see if the current early break given in STMT_INFO is valid for
+- vectorization. */
+-
+-static bool
+-vectorizable_early_exit (vec_info *vinfo, stmt_vec_info stmt_info,
+- gimple_stmt_iterator *gsi, gimple **vec_stmt,
+- slp_tree slp_node, stmt_vector_for_cost *cost_vec)
+-{
+- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
+- if (!loop_vinfo
+- || !is_a <gcond *> (STMT_VINFO_STMT (stmt_info)))
+- return false;
+-
+- if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_condition_def)
+- return false;
+-
+- if (!STMT_VINFO_RELEVANT_P (stmt_info))
+- return false;
+-
+- DUMP_VECT_SCOPE ("vectorizable_early_exit");
+-
+- auto code = gimple_cond_code (STMT_VINFO_STMT (stmt_info));
+-
+- tree vectype = NULL_TREE;
+- slp_tree slp_op0;
+- tree op0;
+- enum vect_def_type dt0;
+- if (!vect_is_simple_use (vinfo, stmt_info, slp_node, 0, &op0, &slp_op0, &dt0,
+- &vectype))
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+- "use not simple.\n");
+- return false;
+- }
+-
+- if (!vectype)
+- return false;
+-
+- machine_mode mode = TYPE_MODE (vectype);
+- int ncopies;
+-
+- if (slp_node)
+- ncopies = 1;
+- else
+- ncopies = vect_get_num_copies (loop_vinfo, vectype);
+-
+- vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo);
+- bool masked_loop_p = LOOP_VINFO_FULLY_MASKED_P (loop_vinfo);
+-
+- /* Now build the new conditional. Pattern gimple_conds get dropped during
+- codegen so we must replace the original insn. */
+- gimple *orig_stmt = STMT_VINFO_STMT (vect_orig_stmt (stmt_info));
+- gcond *cond_stmt = as_a <gcond *>(orig_stmt);
+- /* When vectorizing we assume that if the branch edge is taken that we're
+- exiting the loop. This is not however always the case as the compiler will
+- rewrite conditions to always be a comparison against 0. To do this it
+- sometimes flips the edges. This is fine for scalar, but for vector we
+- then have to flip the test, as we're still assuming that if you take the
+- branch edge that we found the exit condition. */
+- auto new_code = NE_EXPR;
+- auto reduc_optab = ior_optab;
+- auto reduc_op = BIT_IOR_EXPR;
+- tree cst = build_zero_cst (vectype);
+- if (flow_bb_inside_loop_p (LOOP_VINFO_LOOP (loop_vinfo),
+- BRANCH_EDGE (gimple_bb (cond_stmt))->dest))
+- {
+- new_code = EQ_EXPR;
+- reduc_optab = and_optab;
+- reduc_op = BIT_AND_EXPR;
+- cst = build_minus_one_cst (vectype);
+- }
+-
+- /* Analyze only. */
+- if (!vec_stmt)
+- {
+- if (direct_optab_handler (cbranch_optab, mode) == CODE_FOR_nothing)
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+- "can't vectorize early exit because the "
+- "target doesn't support flag setting vector "
+- "comparisons.\n");
+- return false;
+- }
+-
+- if (ncopies > 1
+- && direct_optab_handler (reduc_optab, mode) == CODE_FOR_nothing)
+- {
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+- "can't vectorize early exit because the "
+- "target does not support boolean vector %s "
+- "for type %T.\n",
+- reduc_optab == ior_optab ? "OR" : "AND",
+- vectype);
+- return false;
+- }
+-
+- if (!vectorizable_comparison_1 (vinfo, vectype, stmt_info, code, gsi,
+- vec_stmt, slp_node, cost_vec))
+- return false;
+-
+- if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
+- {
+- if (direct_internal_fn_supported_p (IFN_VCOND_MASK_LEN, vectype,
+- OPTIMIZE_FOR_SPEED))
+- return false;
+- else
+- vect_record_loop_mask (loop_vinfo, masks, ncopies, vectype, NULL);
+- }
+-
+-
+- return true;
+- }
+-
+- /* Tranform. */
+-
+- tree new_temp = NULL_TREE;
+- gimple *new_stmt = NULL;
+-
+- if (dump_enabled_p ())
+- dump_printf_loc (MSG_NOTE, vect_location, "transform early-exit.\n");
+-
+- if (!vectorizable_comparison_1 (vinfo, vectype, stmt_info, code, gsi,
+- vec_stmt, slp_node, cost_vec))
+- gcc_unreachable ();
+-
+- gimple *stmt = STMT_VINFO_STMT (stmt_info);
+- basic_block cond_bb = gimple_bb (stmt);
+- gimple_stmt_iterator cond_gsi = gsi_last_bb (cond_bb);
+-
+- auto_vec<tree> stmts;
+-
+- if (slp_node)
+- stmts.safe_splice (SLP_TREE_VEC_DEFS (slp_node));
+- else
+- {
+- auto vec_stmts = STMT_VINFO_VEC_STMTS (stmt_info);
+- stmts.reserve_exact (vec_stmts.length ());
+- for (auto stmt : vec_stmts)
+- stmts.quick_push (gimple_assign_lhs (stmt));
+- }
+-
+- /* Determine if we need to reduce the final value. */
+- if (stmts.length () > 1)
+- {
+- /* We build the reductions in a way to maintain as much parallelism as
+- possible. */
+- auto_vec<tree> workset (stmts.length ());
+-
+- /* Mask the statements as we queue them up. Normally we loop over
+- vec_num, but since we inspect the exact results of vectorization
+- we don't need to and instead can just use the stmts themselves. */
+- if (masked_loop_p)
+- for (unsigned i = 0; i < stmts.length (); i++)
+- {
+- tree stmt_mask
+- = vect_get_loop_mask (loop_vinfo, gsi, masks, ncopies, vectype,
+- i);
+- stmt_mask
+- = prepare_vec_mask (loop_vinfo, TREE_TYPE (stmt_mask), stmt_mask,
+- stmts[i], &cond_gsi);
+- workset.quick_push (stmt_mask);
+- }
+- else
+- workset.splice (stmts);
+-
+- while (workset.length () > 1)
+- {
+- new_temp = make_temp_ssa_name (vectype, NULL, "vexit_reduc");
+- tree arg0 = workset.pop ();
+- tree arg1 = workset.pop ();
+- new_stmt = gimple_build_assign (new_temp, reduc_op, arg0, arg1);
+- vect_finish_stmt_generation (loop_vinfo, stmt_info, new_stmt,
+- &cond_gsi);
+- workset.quick_insert (0, new_temp);
+- }
+- }
+- else
+- {
+- new_temp = stmts[0];
+- if (masked_loop_p)
+- {
+- tree mask
+- = vect_get_loop_mask (loop_vinfo, gsi, masks, ncopies, vectype, 0);
+- new_temp = prepare_vec_mask (loop_vinfo, TREE_TYPE (mask), mask,
+- new_temp, &cond_gsi);
+- }
+- }
+-
+- gcc_assert (new_temp);
+-
+- gimple_cond_set_condition (cond_stmt, new_code, new_temp, cst);
+- update_stmt (orig_stmt);
+-
+- if (slp_node)
+- SLP_TREE_VEC_DEFS (slp_node).truncate (0);
+- else
+- STMT_VINFO_VEC_STMTS (stmt_info).truncate (0);
+-
+- if (!slp_node)
+- *vec_stmt = orig_stmt;
+-
+- return true;
+-}
+-
+ /* If SLP_NODE is nonnull, return true if vectorizable_live_operation
+ can handle all live statements in the node. Otherwise return true
+ if STMT_INFO is not live or if vectorizable_live_operation can handle it.
+@@ -13029,27 +12787,20 @@ can_vectorize_live_stmts (vec_info *vinfo, stmt_vec_info stmt_info,
+ bool vec_stmt_p,
+ stmt_vector_for_cost *cost_vec)
+ {
+- loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
+ if (slp_node)
+ {
+ stmt_vec_info slp_stmt_info;
+ unsigned int i;
+ FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (slp_node), i, slp_stmt_info)
+ {
+- if ((STMT_VINFO_LIVE_P (slp_stmt_info)
+- || (loop_vinfo
+- && LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
+- && STMT_VINFO_DEF_TYPE (slp_stmt_info)
+- == vect_induction_def))
++ if (STMT_VINFO_LIVE_P (slp_stmt_info)
+ && !vectorizable_live_operation (vinfo, slp_stmt_info, slp_node,
+ slp_node_instance, i,
+ vec_stmt_p, cost_vec))
+ return false;
+ }
+ }
+- else if ((STMT_VINFO_LIVE_P (stmt_info)
+- || (LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
+- && STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def))
++ else if (STMT_VINFO_LIVE_P (stmt_info)
+ && !vectorizable_live_operation (vinfo, stmt_info,
+ slp_node, slp_node_instance, -1,
+ vec_stmt_p, cost_vec))
+@@ -13165,12 +12916,11 @@ vect_analyze_stmt (vec_info *vinfo,
+ node_instance, cost_vec);
+ if (!res)
+ return res;
+- }
++ }
+
+ switch (STMT_VINFO_DEF_TYPE (stmt_info))
+ {
+ case vect_internal_def:
+- case vect_condition_def:
+ break;
+
+ case vect_reduction_def:
+@@ -13203,7 +12953,6 @@ vect_analyze_stmt (vec_info *vinfo,
+ {
+ gcall *call = dyn_cast <gcall *> (stmt_info->stmt);
+ gcc_assert (STMT_VINFO_VECTYPE (stmt_info)
+- || gimple_code (stmt_info->stmt) == GIMPLE_COND
+ || (call && gimple_call_lhs (call) == NULL_TREE));
+ *need_to_vectorize = true;
+ }
+@@ -13246,9 +12995,7 @@ vect_analyze_stmt (vec_info *vinfo,
+ || vectorizable_lc_phi (as_a <loop_vec_info> (vinfo),
+ stmt_info, NULL, node)
+ || vectorizable_recurr (as_a <loop_vec_info> (vinfo),
+- stmt_info, NULL, node, cost_vec)
+- || vectorizable_early_exit (vinfo, stmt_info, NULL, NULL, node,
+- cost_vec));
++ stmt_info, NULL, node, cost_vec));
+ else
+ {
+ if (bb_vinfo)
+@@ -13271,10 +13018,7 @@ vect_analyze_stmt (vec_info *vinfo,
+ NULL, NULL, node, cost_vec)
+ || vectorizable_comparison (vinfo, stmt_info, NULL, NULL, node,
+ cost_vec)
+- || vectorizable_phi (vinfo, stmt_info, NULL, node, cost_vec)
+- || vectorizable_early_exit (vinfo, stmt_info, NULL, NULL, node,
+- cost_vec));
+-
++ || vectorizable_phi (vinfo, stmt_info, NULL, node, cost_vec));
+ }
+
+ if (node)
+@@ -13433,12 +13177,6 @@ vect_transform_stmt (vec_info *vinfo,
+ gcc_assert (done);
+ break;
+
+- case loop_exit_ctrl_vec_info_type:
+- done = vectorizable_early_exit (vinfo, stmt_info, gsi, &vec_stmt,
+- slp_node, NULL);
+- gcc_assert (done);
+- break;
+-
+ default:
+ if (!STMT_VINFO_LIVE_P (stmt_info))
+ {
+@@ -13859,9 +13597,6 @@ vect_is_simple_use (tree operand, vec_info *vinfo, enum vect_def_type *dt,
+ case vect_first_order_recurrence:
+ dump_printf (MSG_NOTE, "first order recurrence\n");
+ break;
+- case vect_condition_def:
+- dump_printf (MSG_NOTE, "control flow\n");
+- break;
+ case vect_unknown_def_type:
+ dump_printf (MSG_NOTE, "unknown\n");
+ break;
+@@ -13978,8 +13713,6 @@ vect_is_simple_use (vec_info *vinfo, stmt_vec_info stmt, slp_tree slp_node,
+ else
+ *op = gimple_op (ass, operand + 1);
+ }
+- else if (gcond *cond = dyn_cast <gcond *> (stmt->stmt))
+- *op = gimple_op (cond, operand);
+ else if (gcall *call = dyn_cast <gcall *> (stmt->stmt))
+ *op = gimple_call_arg (call, operand);
+ else
+@@ -14590,8 +14323,6 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
+ *nunits_vectype_out = NULL_TREE;
+
+ if (gimple_get_lhs (stmt) == NULL_TREE
+- /* Allow vector conditionals through here. */
+- && !is_a <gcond *> (stmt)
+ /* MASK_STORE has no lhs, but is ok. */
+ && !gimple_call_internal_p (stmt, IFN_MASK_STORE))
+ {
+@@ -14608,7 +14339,7 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
+ }
+
+ return opt_result::failure_at (stmt,
+- "not vectorized: irregular stmt: %G", stmt);
++ "not vectorized: irregular stmt.%G", stmt);
+ }
+
+ tree vectype;
+@@ -14633,14 +14364,6 @@ vect_get_vector_types_for_stmt (vec_info *vinfo, stmt_vec_info stmt_info,
+ }
+ else
+ {
+- /* If we got here with a gcond it means that the target had no available vector
+- mode for the scalar type. We can't vectorize so abort. */
+- if (is_a <gcond *> (stmt))
+- return opt_result::failure_at (stmt,
+- "not vectorized:"
+- " unsupported data-type for gcond %T\n",
+- scalar_type);
+-
+ if (data_reference *dr = STMT_VINFO_DATA_REF (stmt_info))
+ scalar_type = TREE_TYPE (DR_REF (dr));
+ else if (gimple_call_internal_p (stmt, IFN_MASK_STORE))
+diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc
+index 8b495fc7ca13..d97e2b54c25a 100644
+--- a/gcc/tree-vectorizer.cc
++++ b/gcc/tree-vectorizer.cc
+@@ -1381,9 +1381,7 @@ pass_vectorize::execute (function *fun)
+ predicates that need to be shared for optimal predicate usage.
+ However reassoc will re-order them and prevent CSE from working
+ as it should. CSE only the loop body, not the entry. */
+- auto_vec<edge> exits = get_loop_exit_edges (loop);
+- for (edge exit : exits)
+- bitmap_set_bit (exit_bbs, exit->dest->index);
++ bitmap_set_bit (exit_bbs, single_exit (loop)->dest->index);
+
+ edge entry = EDGE_PRED (loop_preheader_edge (loop)->src, 0);
+ do_rpo_vn (fun, entry, exit_bbs);
+diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
+index 785fc99ca27a..1810833a324a 100644
+--- a/gcc/tree-vectorizer.h
++++ b/gcc/tree-vectorizer.h
+@@ -66,7 +66,6 @@ enum vect_def_type {
+ vect_double_reduction_def,
+ vect_nested_cycle,
+ vect_first_order_recurrence,
+- vect_condition_def,
+ vect_unknown_def_type
+ };
+
+@@ -889,10 +888,6 @@ public:
+ we need to peel off iterations at the end to form an epilogue loop. */
+ bool peeling_for_niter;
+
+- /* When the loop has early breaks that we can vectorize we need to peel
+- the loop for the break finding loop. */
+- bool early_breaks;
+-
+ /* List of loop additional IV conditionals found in the loop. */
+ auto_vec<gcond *> conds;
+
+@@ -947,20 +942,6 @@ public:
+ /* The controlling loop IV for the scalar loop being vectorized. This IV
+ controls the natural exits of the loop. */
+ edge scalar_loop_iv_exit;
+-
+- /* Used to store the list of stores needing to be moved if doing early
+- break vectorization as they would violate the scalar loop semantics if
+- vectorized in their current location. These are stored in order that they
+- need to be moved. */
+- auto_vec<gimple *> early_break_stores;
+-
+- /* The final basic block where to move statements to. In the case of
+- multiple exits this could be pretty far away. */
+- basic_block early_break_dest_bb;
+-
+- /* Statements whose VUSES need updating if early break vectorization is to
+- happen. */
+- auto_vec<gimple*> early_break_vuses;
+ } *loop_vec_info;
+
+ /* Access Functions. */
+@@ -1015,12 +996,6 @@ public:
+ #define LOOP_VINFO_REDUCTION_CHAINS(L) (L)->reduction_chains
+ #define LOOP_VINFO_PEELING_FOR_GAPS(L) (L)->peeling_for_gaps
+ #define LOOP_VINFO_PEELING_FOR_NITER(L) (L)->peeling_for_niter
+-#define LOOP_VINFO_EARLY_BREAKS(L) (L)->early_breaks
+-#define LOOP_VINFO_EARLY_BRK_STORES(L) (L)->early_break_stores
+-#define LOOP_VINFO_EARLY_BREAKS_VECT_PEELED(L) \
+- (single_pred ((L)->loop->latch) != (L)->vec_loop_iv_exit->src)
+-#define LOOP_VINFO_EARLY_BRK_DEST_BB(L) (L)->early_break_dest_bb
+-#define LOOP_VINFO_EARLY_BRK_VUSES(L) (L)->early_break_vuses
+ #define LOOP_VINFO_LOOP_CONDS(L) (L)->conds
+ #define LOOP_VINFO_LOOP_IV_COND(L) (L)->loop_iv_cond
+ #define LOOP_VINFO_NO_DATA_DEPENDENCIES(L) (L)->no_data_dependencies
+@@ -1823,7 +1798,7 @@ is_loop_header_bb_p (basic_block bb)
+ {
+ if (bb == (bb->loop_father)->header)
+ return true;
+-
++ gcc_checking_assert (EDGE_COUNT (bb->preds) == 1);
+ return false;
+ }
+
+@@ -2214,8 +2189,7 @@ extern bool slpeel_can_duplicate_loop_p (const class loop *, const_edge,
+ const_edge);
+ class loop *slpeel_tree_duplicate_loop_to_edge_cfg (class loop *, edge,
+ class loop *, edge,
+- edge, edge *, bool = true,
+- vec<basic_block> * = NULL);
++ edge, edge *, bool = true);
+ class loop *vect_loop_versioning (loop_vec_info, gimple *);
+ extern class loop *vect_do_peeling (loop_vec_info, tree, tree,
+ tree *, tree *, tree *, int, bool, bool,
+@@ -2226,7 +2200,6 @@ extern dump_user_location_t find_loop_location (class loop *);
+ extern bool vect_can_advance_ivs_p (loop_vec_info);
+ extern void vect_update_inits_of_drs (loop_vec_info, tree, tree_code);
+ extern edge vec_init_loop_exit_info (class loop *);
+-extern void vect_iv_increment_position (edge, gimple_stmt_iterator *, bool *);
+
+ /* In tree-vect-stmts.cc. */
+ extern tree get_related_vectype_for_scalar_type (machine_mode, tree,
+@@ -2248,7 +2221,6 @@ extern bool vect_is_simple_use (vec_info *, stmt_vec_info, slp_tree,
+ enum vect_def_type *,
+ tree *, stmt_vec_info * = NULL);
+ extern bool vect_maybe_update_slp_op_vectype (slp_tree, tree);
+-extern tree perm_mask_for_reverse (tree);
+ extern bool supportable_widening_operation (vec_info*, code_helper,
+ stmt_vec_info, tree, tree,
+ code_helper*, code_helper*,
+@@ -2326,9 +2298,6 @@ extern opt_result vect_get_vector_types_for_stmt (vec_info *,
+ tree *, unsigned int = 0);
+ extern opt_tree vect_get_mask_type_for_stmt (stmt_vec_info, unsigned int = 0);
+
+-/* In tree-if-conv.cc. */
+-extern bool ref_within_array_bound (gimple *, tree);
+-
+ /* In tree-vect-data-refs.cc. */
+ extern bool vect_can_force_dr_alignment_p (const_tree, poly_uint64);
+ extern enum dr_alignment_support vect_supportable_dr_alignment
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch b/14.0.0/gentoo/80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
new file mode 100644
index 0000000..2473ce4
--- /dev/null
+++ b/14.0.0/gentoo/80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
@@ -0,0 +1,50 @@
+From eccc75285320e5c4a4c21ec48ac2ab8bf8ca3580 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:15 +0000
+Subject: [PATCH 6/7] Revert "middle-end: prevent LIM from hoising vector
+ compares from gconds if target does not support it."
+
+This reverts commit f1dcc0fe371e3cb10d2cbe3f6c88db6f72edddda.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/tree-ssa-loop-im.cc | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/gcc/tree-ssa-loop-im.cc b/gcc/tree-ssa-loop-im.cc
+index 2ebf6d6548c4..396963b6754c 100644
+--- a/gcc/tree-ssa-loop-im.cc
++++ b/gcc/tree-ssa-loop-im.cc
+@@ -48,8 +48,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "tree-dfa.h"
+ #include "tree-ssa.h"
+ #include "dbgcnt.h"
+-#include "insn-codes.h"
+-#include "optabs-tree.h"
+
+ /* TODO: Support for predicated code motion. I.e.
+
+@@ -854,17 +852,6 @@ determine_max_movement (gimple *stmt, bool must_preserve_exec)
+ if (!extract_true_false_args_from_phi (dom, phi, NULL, NULL))
+ return false;
+
+- /* Check if one of the depedent statement is a vector compare whether
+- the target supports it, otherwise it's invalid to hoist it out of
+- the gcond it belonged to. */
+- if (VECTOR_TYPE_P (TREE_TYPE (gimple_cond_lhs (cond))))
+- {
+- tree type = TREE_TYPE (gimple_cond_lhs (cond));
+- auto code = gimple_cond_code (cond);
+- if (!target_supports_op_p (type, code, optab_vector))
+- return false;
+- }
+-
+ /* Fold in dependencies and cost of the condition. */
+ FOR_EACH_SSA_TREE_OPERAND (val, cond, iter, SSA_OP_USE)
+ {
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch b/14.0.0/gentoo/81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch
new file mode 100644
index 0000000..88e414e
--- /dev/null
+++ b/14.0.0/gentoo/81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch
@@ -0,0 +1,457 @@
+From aa2a8d5c6f86e0b61e92b1ca02859cd480647f72 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 25 Dec 2023 16:57:15 +0000
+Subject: [PATCH 7/7] Revert "testsuite: Add more pragma novector to new tests"
+
+This reverts commit 0994ddd86f9c3d829b06009d9e706ff72b07001a.
+
+Bug: https://gcc.gnu.org/PR113135
+Bug: https://gcc.gnu.org/PR113136
+Bug: https://gcc.gnu.org/PR113137
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c | 2 +-
+ gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c | 1 -
+ gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c | 4 ++--
+ gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c | 2 --
+ gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c | 5 -----
+ gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c | 5 -----
+ gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c | 1 -
+ gcc/testsuite/gcc.target/i386/vect-perm-even-1.c | 1 -
+ gcc/testsuite/gcc.target/i386/vect-unpack-1.c | 1 -
+ 27 files changed, 3 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c
+index 534bee4a1669..00d0eca56eec 100644
+--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c
++++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-30.c
+@@ -24,9 +24,9 @@ main1 ()
+ }
+
+ /* check results: */
++#pragma GCC novector
+ for (j = 0; j < N; j++)
+ {
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ {
+ if (out[i*4] != 8
+diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c
+index 22817a57ef81..48b6a9b0681c 100644
+--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c
++++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-slp-31.c
+@@ -27,7 +27,6 @@ main1 ()
+ #pragma GCC novector
+ for (i = 0; i < N; i++)
+ {
+-#pragma GCC novector
+ for (j = 0; j < N; j++)
+ {
+ if (a[i][j] != 8)
+diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
+index 0861d488e134..a0e53d5fef91 100644
+--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
++++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-69.c
+@@ -83,9 +83,9 @@ int main1 ()
+ }
+
+ /* check results: */
++#pragma GCC novector
+ for (i = 0; i < N; i++)
+ {
+-#pragma GCC novector
+ for (j = 0; j < N; j++)
+ {
+ if (tmp1[2].e.n[1][i][j] != 8)
+@@ -103,9 +103,9 @@ int main1 ()
+ }
+
+ /* check results: */
++#pragma GCC novector
+ for (i = 0; i < N - NINTS; i++)
+ {
+-#pragma GCC novector
+ for (j = 0; j < N - NINTS; j++)
+ {
+ if (tmp2[2].e.n[1][i][j] != 8)
+diff --git a/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c b/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
+index 84f33d3f6cce..cfa221158312 100644
+--- a/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
++++ b/gcc/testsuite/gcc.target/aarch64/vect-xorsign_exec.c
+@@ -33,7 +33,6 @@ main (void)
+ r[i] = a[i] * __builtin_copysignf (1.0f, b[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ if (r[i] != a[i] * __builtin_copysignf (1.0f, b[i]))
+ abort ();
+@@ -42,7 +41,6 @@ main (void)
+ rd[i] = ad[i] * __builtin_copysign (1.0d, bd[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ if (rd[i] != ad[i] * __builtin_copysign (1.0d, bd[i]))
+ abort ();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c
+index 1e68926a3180..c0b1f7b31027 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c
++++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-3.c
+@@ -41,7 +41,6 @@ avx512er_test (void)
+ compute_rcp_ref (a, b, ref);
+ compute_rcp_exp (a, b, exp);
+
+-#pragma GCC novector
+ for (int i = 0; i < MAX; i++)
+ {
+ float rel_err = (ref[i] - exp[i]) / ref[i];
+diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c
+index b922fa285b5f..a8ab49ed6c38 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c
++++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-3.c
+@@ -38,7 +38,6 @@ avx512er_test (void)
+ compute_rsqrt_ref (in, ref);
+ compute_rsqrt_exp (in, exp);
+
+-#pragma GCC novector
+ for (int i = 0; i < MAX; i++)
+ {
+ float rel_err = (ref[i] - exp[i]) / ref[i];
+diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c
+index 3c0066f7ea44..9a8a88ae2b57 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c
++++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-5.c
+@@ -38,7 +38,6 @@ avx512er_test (void)
+ compute_sqrt_ref (in, ref);
+ compute_sqrt_exp (in, exp);
+
+-#pragma GCC novector
+ for (int i = 0; i < MAX; i++)
+ {
+ float rel_err = (ref[i] - exp[i]) / ref[i];
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
+index 291907c8f9d0..ab058334a8c9 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
+@@ -47,7 +47,6 @@ avx512f_test (void)
+ r[i] = (int) ceil (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) ceil (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
+index c372631a211f..3ab64559cd28 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = ceil (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != ceil (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
+index be19e753026e..27a4bb95342c 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-sfix-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = (int) ceilf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) ceilf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
+index ad1e8e12d5c7..54222da76f42 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-ceilf-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = ceilf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != ceilf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
+index 1c8a107d15ae..9eff15f5006c 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
+@@ -47,7 +47,6 @@ avx512f_test (void)
+ r[i] = (int) floor (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) floor (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
+index b8bcb79a7a53..be9709951f7a 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = floor (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != floor (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
+index 4ae6e36acef5..7a84fcbc7314 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-floorf-sfix-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = (int) floorf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) floorf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
+index 7c43f414763c..fcc0b275860f 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-floorf-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = floorf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != floorf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
+index b7e6759cb8e8..d22385c95e52 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-rint-sfix-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = (int) rint (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) rint (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
+index e36c9a5d4f9f..6a627ab4ac82 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-rintf-sfix-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = (int) rintf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) rintf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
+index 0a6f9b2d235a..4c83e7b05126 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-round-sfix-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = (int) round (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) round (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
+index d40f7d9f7bdd..1341a5bbe537 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-roundf-sfix-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = (int) roundf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) roundf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
+index 3802078d2cda..b8b5d0730a8c 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-trunc-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = trunc (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != trunc (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
+index d9b6a4d0fdd2..7dfd575f019c 100644
+--- a/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
++++ b/gcc/testsuite/gcc.target/i386/avx512f-truncf-vec-1.c
+@@ -45,7 +45,6 @@ avx512f_test (void)
+ r[i] = truncf (a[i]);
+
+ /* check results: */
+-#pragma GCC novector
+ for (i = 0; i < NUM; i++)
+ if (r[i] != truncf (a[i]))
+ abort();
+diff --git a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c
+index cec959f3e078..4aa536ba86c9 100644
+--- a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c
++++ b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-1.c
+@@ -40,7 +40,6 @@ int main()
+ b[i] = i;
+ }
+ foo1 ();
+-#pragma GCC novector
+ for (int i = 2; i < 508; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -51,7 +50,6 @@ int main()
+ b[i] = i;
+ }
+ foo2 ();
+-#pragma GCC novector
+ for (int i = 2; i < 507; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -62,7 +60,6 @@ int main()
+ b[i] = i;
+ }
+ foo3 ();
+-#pragma GCC novector
+ for (int i = 2; i < 506; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -73,7 +70,6 @@ int main()
+ b[i] = i;
+ }
+ foo4 ();
+-#pragma GCC novector
+ for (int i = 2; i < 505; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -84,7 +80,6 @@ int main()
+ b[i] = i;
+ }
+ foo5 (505);
+-#pragma GCC novector
+ for (int i = 2; i < 506; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+diff --git a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c
+index 0317c77a3890..834bf0f770d6 100644
+--- a/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c
++++ b/gcc/testsuite/gcc.target/i386/vect-alignment-peeling-2.c
+@@ -40,7 +40,6 @@ int main()
+ b[i] = i;
+ }
+ foo1 ();
+-#pragma GCC novector
+ for (int i = 2; i < 508; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -51,7 +50,6 @@ int main()
+ b[i] = i;
+ }
+ foo2 ();
+-#pragma GCC novector
+ for (int i = 3; i < 508; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -62,7 +60,6 @@ int main()
+ b[i] = i;
+ }
+ foo3 ();
+-#pragma GCC novector
+ for (int i = 4; i < 508; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -73,7 +70,6 @@ int main()
+ b[i] = i;
+ }
+ foo4 ();
+-#pragma GCC novector
+ for (int i = 5; i < 508; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+@@ -84,7 +80,6 @@ int main()
+ b[i] = i;
+ }
+ foo5 (3);
+-#pragma GCC novector
+ for (int i = 3; i < 508; ++i)
+ if (a[i] != 2*i)
+ __builtin_abort ();
+diff --git a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c
+index 915b604ebff9..1b468e47754c 100644
+--- a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c
++++ b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-1.c
+@@ -21,7 +21,6 @@ avx512bw_test ()
+ unsigned short i;
+ foo (N);
+
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ if ( (unsigned char)i != yy [i] )
+ abort ();
+diff --git a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c
+index c42f317ddf4f..3503deaa9d9b 100644
+--- a/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c
++++ b/gcc/testsuite/gcc.target/i386/vect-pack-trunc-2.c
+@@ -20,7 +20,6 @@ avx512bw_test ()
+ {
+ unsigned int i;
+ foo (N);
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ if ( (unsigned short)i != yy [i] )
+ abort ();
+diff --git a/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c b/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
+index bed8621e5d49..3de4dfabeea0 100644
+--- a/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
++++ b/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
+@@ -26,7 +26,6 @@ avx512bw_test ()
+
+ foo (N);
+
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ if ( (unsigned char)(2*i+1) != yy [i] )
+ abort ();
+diff --git a/gcc/testsuite/gcc.target/i386/vect-unpack-1.c b/gcc/testsuite/gcc.target/i386/vect-unpack-1.c
+index fd85650bf8c6..84521e313e52 100644
+--- a/gcc/testsuite/gcc.target/i386/vect-unpack-1.c
++++ b/gcc/testsuite/gcc.target/i386/vect-unpack-1.c
+@@ -20,7 +20,6 @@ avx512bw_test ()
+ {
+ unsigned char i;
+ foo (N);
+-#pragma GCC novector
+ for (i = 0; i < N; i++)
+ if ( (unsigned int)i != yy [i] )
+ abort ();
+--
+2.43.0
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 802a99a..ad540db 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,13 @@
+12 25 Dec 2023
+
+ + 75_all_Revert-middle-end-explicitly-initialize-vec_stmts-PR.patch
+ + 76_all_Revert-testsuite-un-xfail-TSVC-loops-that-check-for-.patch
+ + 77_all_Revert-testsuite-Add-tests-for-early-break-vectoriza.patch
+ + 78_all_Revert-AArch64-Add-implementation-for-vector-cbranch.patch
+ + 79_all_Revert-middle-end-Support-vectorization-of-loops-wit.patch
+ + 80_all_Revert-middle-end-prevent-LIM-from-hoising-vector-co.patch
+ + 81_all_Revert-testsuite-Add-more-pragma-novector-to-new-tes.patch
+
11 17 Dec 2023
- 76_all_PR112869_cxx.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-18 0:00 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-18 0:00 UTC (permalink / raw
To: gentoo-commits
commit: 2250dc0cc8c46999ad1c1d79b9aeed9056459bb6
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 23:59:55 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 23:59:55 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2250dc0c
14.0.0: cut 11 patchset
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index c535708..802a99a 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-11 ?? ??? 2023
+11 17 Dec 2023
- 76_all_PR112869_cxx.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-14 21:23 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-14 21:23 UTC (permalink / raw
To: gentoo-commits
commit: 8280462977fca22bf0c859ca8427b66ac7e665ab
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 14 21:23:01 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 14 21:23:01 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=82804629
14.0.0: drop obsolete 76_all_PR112869_cxx.patch
Fixed upstream.
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/76_all_PR112869_cxx.patch | 20 --------------------
14.0.0/gentoo/README.history | 4 ++++
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/14.0.0/gentoo/76_all_PR112869_cxx.patch b/14.0.0/gentoo/76_all_PR112869_cxx.patch
deleted file mode 100644
index 7ec000b..0000000
--- a/14.0.0/gentoo/76_all_PR112869_cxx.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://gcc.gnu.org/PR112869 (https://gcc.gnu.org/PR112869#c2)
-https://gcc.gnu.org/PR112907
---- a/gcc/cp/cp-gimplify.cc
-+++ b/gcc/cp/cp-gimplify.cc
-@@ -1177,13 +1177,9 @@ cp_fold_immediate_r (tree *stmt_p, int *walk_subtrees, void *data_)
- ? tf_error : tf_none);
- const tree_code code = TREE_CODE (stmt);
-
-- /* No need to look into types or unevaluated operands.
-- NB: This affects cp_fold_r as well. */
-+ /* No need to look into types or unevaluated operands. */
- if (TYPE_P (stmt) || unevaluated_p (code) || in_immediate_context ())
-- {
-- *walk_subtrees = 0;
-- return NULL_TREE;
-- }
-+ return NULL_TREE;
-
- tree decl = NULL_TREE;
- bool call_p = false;
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 4359548..c535708 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+11 ?? ??? 2023
+
+ - 76_all_PR112869_cxx.patch
+
10 10 Dec 2023
- 75_all_PR112572-missing-notes-update.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-10 22:42 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-10 22:42 UTC (permalink / raw
To: gentoo-commits
commit: 6ea4cfc078ef8e37f206e79fc8940fa109237cd1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 22:42:14 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 22:42:14 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6ea4cfc0
14.0.0: cut patchset 10
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index a8dc8d4..4359548 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-10 ?? ??? 2023
+10 10 Dec 2023
- 75_all_PR112572-missing-notes-update.patch
+ 76_all_PR112869_cxx.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-07 18:40 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-07 18:40 UTC (permalink / raw
To: gentoo-commits
commit: cf2708c1e396fac46e374abba252b8b7b10f3270
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 7 18:39:36 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 7 18:40:00 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=cf2708c1
14.0.0: add botan/openmpt ICE patch
Bug: https://gcc.gnu.org/PR112869
Bug: https://gcc.gnu.org/PR112907
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/76_all_PR112869_cxx.patch | 20 ++++++++++++++++++++
14.0.0/gentoo/README.history | 1 +
2 files changed, 21 insertions(+)
diff --git a/14.0.0/gentoo/76_all_PR112869_cxx.patch b/14.0.0/gentoo/76_all_PR112869_cxx.patch
new file mode 100644
index 0000000..7ec000b
--- /dev/null
+++ b/14.0.0/gentoo/76_all_PR112869_cxx.patch
@@ -0,0 +1,20 @@
+https://gcc.gnu.org/PR112869 (https://gcc.gnu.org/PR112869#c2)
+https://gcc.gnu.org/PR112907
+--- a/gcc/cp/cp-gimplify.cc
++++ b/gcc/cp/cp-gimplify.cc
+@@ -1177,13 +1177,9 @@ cp_fold_immediate_r (tree *stmt_p, int *walk_subtrees, void *data_)
+ ? tf_error : tf_none);
+ const tree_code code = TREE_CODE (stmt);
+
+- /* No need to look into types or unevaluated operands.
+- NB: This affects cp_fold_r as well. */
++ /* No need to look into types or unevaluated operands. */
+ if (TYPE_P (stmt) || unevaluated_p (code) || in_immediate_context ())
+- {
+- *walk_subtrees = 0;
+- return NULL_TREE;
+- }
++ return NULL_TREE;
+
+ tree decl = NULL_TREE;
+ bool call_p = false;
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index dd1bec0..a8dc8d4 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,6 +1,7 @@
10 ?? ??? 2023
- 75_all_PR112572-missing-notes-update.patch
+ + 76_all_PR112869_cxx.patch
9 20 Nov 2023
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-12-06 10:52 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-12-06 10:52 UTC (permalink / raw
To: gentoo-commits
commit: 79bab9e66fc190741117eb485fe425aeb5096b0a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 6 10:51:25 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 6 10:52:16 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=79bab9e6
14.0.0: drop 75_all_PR112572-missing-notes-update.patch
Per https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112572#c33, this shouldn't
be needed anymore.
Bug: https://gcc.gnu.org/PR112760
Bug: https://gcc.gnu.org/PR112572
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 14 --------------
14.0.0/gentoo/README.history | 4 ++++
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
deleted file mode 100644
index 33d2e4f..0000000
--- a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://gcc.gnu.org/PR112568
-https://gcc.gnu.org/PR112572 (specifically https://gcc.gnu.org/PR112572#c18 for the patch)
-https://bugs.gentoo.org/917496
-https://bugs.gentoo.org/917486
---- a/gcc/compare-elim.cc
-+++ b/gcc/compare-elim.cc
-@@ -908,6 +908,7 @@ static unsigned int
- execute_compare_elim_after_reload (void)
- {
- df_set_flags (DF_LR_RUN_DCE);
-+ df_note_add_problem ();
- df_analyze ();
-
- gcc_checking_assert (!all_compares.exists ());
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 9d7a939..dd1bec0 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+10 ?? ??? 2023
+
+ - 75_all_PR112572-missing-notes-update.patch
+
9 20 Nov 2023
+ 75_all_PR112572-missing-notes-update.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-11-20 8:15 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-11-20 8:15 UTC (permalink / raw
To: gentoo-commits
commit: de8083fe20394a4c7d05f60631b7524a26f39986
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 20 06:52:35 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 20 06:52:42 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=de8083fe
14.0.0: cut patchset 9
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 415eb03..9d7a939 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-9 ?? ??? 2023
+9 20 Nov 2023
+ 75_all_PR112572-missing-notes-update.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-11-19 11:05 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-11-19 11:05 UTC (permalink / raw
To: gentoo-commits
commit: a701b1aeb797c8a449217874a9675547dc80fca3
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 11:05:31 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 11:05:31 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a701b1ae
75_all_PR112572-missing-notes-update.patch: add specific comment ref
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
index 74e42d3..33d2e4f 100644
--- a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
+++ b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
@@ -1,5 +1,5 @@
https://gcc.gnu.org/PR112568
-https://gcc.gnu.org/PR112572
+https://gcc.gnu.org/PR112572 (specifically https://gcc.gnu.org/PR112572#c18 for the patch)
https://bugs.gentoo.org/917496
https://bugs.gentoo.org/917486
--- a/gcc/compare-elim.cc
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-11-19 11:04 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-11-19 11:04 UTC (permalink / raw
To: gentoo-commits
commit: fb2901cba5026337511402c7745b2eb317e9b35c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 19 11:03:42 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 19 11:03:52 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=fb2901cb
14.0.0: add 75_all_PR112572-missing-notes-update.patch
Fixes LLVM, mesa, pipewire miscompilation.
Bug: https://gcc.gnu.org/PR112568
Bug: https://gcc.gnu.org/PR112572
Bug: https://bugs.gentoo.org/917496
Bug: https://bugs.gentoo.org/917486
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch | 14 ++++++++++++++
14.0.0/gentoo/README.history | 4 ++++
2 files changed, 18 insertions(+)
diff --git a/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
new file mode 100644
index 0000000..74e42d3
--- /dev/null
+++ b/14.0.0/gentoo/75_all_PR112572-missing-notes-update.patch
@@ -0,0 +1,14 @@
+https://gcc.gnu.org/PR112568
+https://gcc.gnu.org/PR112572
+https://bugs.gentoo.org/917496
+https://bugs.gentoo.org/917486
+--- a/gcc/compare-elim.cc
++++ b/gcc/compare-elim.cc
+@@ -908,6 +908,7 @@ static unsigned int
+ execute_compare_elim_after_reload (void)
+ {
+ df_set_flags (DF_LR_RUN_DCE);
++ df_note_add_problem ();
+ df_analyze ();
+
+ gcc_checking_assert (!all_compares.exists ());
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index bcf2394..415eb03 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+9 ?? ??? 2023
+
+ + 75_all_PR112572-missing-notes-update.patch
+
8 05 Nov 2023
- 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-11-14 7:11 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-11-14 7:11 UTC (permalink / raw
To: gentoo-commits
commit: 35bb529f420ff5863fdae51049e6935ab927ff3d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 14 07:10:56 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 14 07:11:13 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35bb529f
14.0.0: drop 25_all_lto-intl-workaround-PR95194.patch
The built-in intl/ was dropped in upstream commit fbe4e64365ec7fc68536bbf351c2fb246afaf7e6
by our very own Arsen, so this is obsolete.
Bug: https://bugs.gentoo.org/723370
Bug: https://gcc.gnu.org/PR95194
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../gentoo/25_all_lto-intl-workaround-PR95194.patch | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch b/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch
deleted file mode 100644
index 9613216..0000000
--- a/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Trick libintl not to use '_INTL_REDIRECT_ASM' mode as it's
-incompatible with LTO builds.
-
-glibc does not normally use libintl implementations and uses
-it's own primitives. But musl ond others do fall back to libintl.
-
-Reported-by: Andrew Savchenko
-Bug: https://bugs.gentoo.org/723370
-Bug: https://gcc.gnu.org/PR95194
---- a/intl/libgnuintl.h
-+++ b/intl/libgnuintl.h
-@@ -93,7 +93,7 @@ extern "C" {
- If he doesn't, we choose the method. A third possible method is
- _INTL_REDIRECT_ASM, supported only by GCC. */
- #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
--# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
-+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) && USE_ASM_ALIASES_THAT_BREAK_LTO
- # define _INTL_REDIRECT_ASM
- # else
- # ifdef __cplusplus
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-11-05 22:40 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-11-05 22:40 UTC (permalink / raw
To: gentoo-commits
commit: 8474a5ef92cb94c0a6a0dfc0ca7a152fe62a9546
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 5 22:39:45 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 5 22:39:45 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8474a5ef
14.0.0: cut new patchset
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 4bd7684..bcf2394 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+8 05 Nov 2023
+
+ - 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+
7 28 Oct 2023
U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-10-31 19:56 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-10-31 19:56 UTC (permalink / raw
To: gentoo-commits
commit: 2b02f083e67e97f8187d3ec023c3d281f49232c0
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 31 19:56:42 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 31 19:56:42 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=2b02f083
14.0.0: drop upstreamed 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
For the benefit of 9999 users.
Signed-off-by: Sam James <sam <AT> gentoo.org>
...genemit-Split-insn-emit.cc-into-ten-files.patch | 1405 --------------------
1 file changed, 1405 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
deleted file mode 100644
index bd31760..0000000
--- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+++ /dev/null
@@ -1,1405 +0,0 @@
-https://gcc.gnu.org/PR54179
-https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com/
-
-From a3804c98c5f73c02b3732b06a15dc4a397e60dad Mon Sep 17 00:00:00 2001
-From: Robin Dapp <rdapp.gcc@gmail.com>
-Date: Fri, 27 Oct 2023 21:04:25 +0200
-Subject: [PATCH] genemit: Split insn-emit.cc into ten files.
-
-After working with Sam off-list (thanks) I managed to get hppa to
-build. Initially it looked as if hppa just had a very small number of
-instruction patterns so we wouldn't generate all 10 output files.
-However, the actual issue (which we will only hit with a low
-pattern count) was with counting all the patterns vs only counting
-the patterns that will be output. A wrong pattern count lead to
-prematurely stopping to write output files.
-
-With that corrected, hppa "just works" until I hit linker errors
-due to relocations - most likely unrelated:
-
-bin/ld: unwind-dw2-fde-dip_s.o(.data.rel.ro+0): cannot handle
-R_PARISC_FPTR64 for __pthread_key_create@@GLIBC_2.34
-
-Attached is v3 that has been bootstrapped and tested on x86 and power10,
-aarch64 bootstrap was ok, testsuite is still running. A riscv build and
-testsuite run was successful as well.
-
-Regards
- Robin
-
->From 248744c328440bff9cc339d2bf622852cbaac343 Mon Sep 17 00:00:00 2001
-From: Robin Dapp <rdapp@ventanamicro.com>
-Date: Thu, 12 Oct 2023 11:23:26 +0200
-Subject: [PATCH v3] genemit: Split insn-emit.cc into several partitions.
-
-On riscv insn-emit.cc has grown to over 1.2 mio lines of code and
-compiling it takes considerable time.
-Therefore, this patch adjust genemit to create several partitions
-(insn-emit-1.cc to insn-emit-n.cc). The available patterns are
-written to the given files in a sequential fashion.
-
-Similar to match.pd a configure option --with-emitinsn-partitions=num
-is introduced that makes the number of partition configurable.
-
-gcc/ChangeLog:
-
- PR bootstrap/84402
- PR target/111600
-
- * Makefile.in: Handle split insn-emit.cc.
- * configure: Regenerate.
- * configure.ac: Add --with-insnemit-partitions.
- * genemit.cc (output_peephole2_scratches): Print to file instead
- of stdout.
- (print_code): Ditto.
- (gen_rtx_scratch): Ditto.
- (gen_exp): Ditto.
- (gen_emit_seq): Ditto.
- (emit_c_code): Ditto.
- (gen_insn): Ditto.
- (gen_expand): Ditto.
- (gen_split): Ditto.
- (output_add_clobbers): Ditto.
- (output_added_clobbers_hard_reg_p): Ditto.
- (print_overload_arguments): Ditto.
- (print_overload_test): Ditto.
- (handle_overloaded_code_for): Ditto.
- (handle_overloaded_gen): Ditto.
- (print_header): New function.
- (handle_arg): New function.
- (main): Split output into 10 files.
- * gensupport.cc (count_patterns): New function.
- * gensupport.h (count_patterns): Define.
- * read-md.cc (md_reader::print_md_ptr_loc): Add file argument.
- * read-md.h (class md_reader): Change definition.
----
- gcc/Makefile.in | 36 ++-
- gcc/configure | 24 +-
- gcc/configure.ac | 13 ++
- gcc/genemit.cc | 542 +++++++++++++++++++++++++---------------------
- gcc/gensupport.cc | 55 +++++
- gcc/gensupport.h | 1 +
- gcc/read-md.cc | 4 +-
- gcc/read-md.h | 2 +-
- 8 files changed, 422 insertions(+), 255 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 91d6bfbea4d0..d8bfad8de154 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
- GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ))
- GENERIC_MATCH_PD_SEQ_O = $(patsubst %, generic-match-%.o, $(MATCH_SPLITS_SEQ))
-
-+# The number of splits to be made for the insn-emit files.
-+NUM_INSNEMIT_SPLITS = @DEFAULT_INSNEMIT_PARTITIONS@
-+INSNEMIT_SPLITS_SEQ = $(wordlist 1,$(NUM_INSNEMIT_SPLITS),$(one_to_9999))
-+INSNEMIT_SEQ_SRC = $(patsubst %, insn-emit-%.cc, $(INSNEMIT_SPLITS_SEQ))
-+INSNEMIT_SEQ_TMP = $(patsubst %, tmp-emit-%.cc, $(INSNEMIT_SPLITS_SEQ))
-+INSNEMIT_SEQ_O = $(patsubst %, insn-emit-%.o, $(INSNEMIT_SPLITS_SEQ))
-+
- # These files are to have specific diagnostics suppressed, or are not to
- # be subject to -Werror:
- # flex output may yield harmless "no previous prototype" warnings
-@@ -1356,7 +1363,7 @@ OBJS = \
- insn-attrtab.o \
- insn-automata.o \
- insn-dfatab.o \
-- insn-emit.o \
-+ $(INSNEMIT_SEQ_O) \
- insn-extract.o \
- insn-latencytab.o \
- insn-modes.o \
-@@ -1857,7 +1864,8 @@ TREECHECKING = @TREECHECKING@
- FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
-
- MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
-- insn-output.cc insn-recog.cc insn-emit.cc insn-extract.cc insn-peep.cc \
-+ insn-output.cc insn-recog.cc $(INSNEMIT_SEQ_SRC) \
-+ insn-extract.cc insn-peep.cc \
- insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
- insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \
- tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \
-@@ -2489,11 +2497,11 @@ $(common_out_object_file): $(common_out_file)
- # and compile them.
-
- .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
-- insn-emit.cc insn-recog.cc insn-extract.cc insn-output.cc insn-peep.cc \
-- insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
-- insn-latencytab.cc insn-preds.cc $(GIMPLE_MATCH_PD_SEQ_SRC) \
-- $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \
-- insn-target-def.h
-+ $(INSNEMIT_SEQ_SRC) insn-recog.cc insn-extract.cc insn-output.cc \
-+ insn-peep.cc insn-attr.h insn-attr-common.h insn-attrtab.cc \
-+ insn-dfatab.cc insn-latencytab.cc insn-preds.cc \
-+ $(GIMPLE_MATCH_PD_SEQ_SRC) $(GENERIC_MATCH_PD_SEQ_SRC) \
-+ gimple-match-auto.h generic-match-auto.h insn-target-def.h
-
- # Dependencies for the md file. The first time through, we just assume
- # the md file itself and the generated dependency file (in order to get
-@@ -2516,7 +2524,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
- simple_rtl_generated_h = insn-attr.h insn-attr-common.h insn-codes.h \
- insn-config.h insn-flags.h insn-target-def.h
-
--simple_rtl_generated_c = insn-automata.cc insn-emit.cc \
-+simple_rtl_generated_c = insn-automata.cc \
- insn-extract.cc insn-output.cc \
- insn-peep.cc insn-recog.cc
-
-@@ -2545,8 +2553,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
- $(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
- $(STAMP) s-$*
-
-+# genemit splits its output into different files and doesn't write to
-+# stdout. (but rather to tmp-emit-01.cc..tmp-emit-10.cc)
-+$(INSNEMIT_SEQ_SRC): s-tmp-emit; @true
-+s-tmp-emit: build/genemit$(build_exeext) $(MD_DEPS) insn-conditions.md
-+ $(RUN_GEN) build/genemit$(build_exeext) $(md_file) insn-conditions.md \
-+ $(addprefix -O,${INSNEMIT_SEQ_TMP})
-+ $(foreach id, $(INSNEMIT_SPLITS_SEQ), \
-+ $(SHELL) $(srcdir)/../move-if-change tmp-emit-$(id).cc \
-+ insn-emit-$(id).cc;)
-+ $(STAMP) s-tmp-emit
-+
- # gencheck doesn't read the machine description, and the file produced
- # doesn't use the insn-* convention.
-+
- tree-check.h: s-check ; @true
- s-check : build/gencheck$(build_exeext)
- $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
-diff --git a/gcc/configure b/gcc/configure
-index 77f33ee4df6f..d4ad988000f0 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -844,6 +844,7 @@ enable_gcov
- enable_shared
- enable_fixed_point
- enable_decimal_float
-+DEFAULT_INSNEMIT_PARTITIONS
- DEFAULT_MATCHPD_PARTITIONS
- with_float
- with_cpu
-@@ -973,6 +974,7 @@ enable_multilib
- enable_multiarch
- with_stack_clash_protection_guard_size
- with_matchpd_partitions
-+with_insnemit_partitions
- enable___cxa_atexit
- enable_decimal_float
- enable_fixed_point
-@@ -1846,6 +1848,9 @@ Optional Packages:
- --with-matchpd-partitions=num
- Set the number of partitions to make for gimple and
- generic when splitting match.pd. [default=10]
-+ --with-insnemit-partitions=num
-+ Set the number of partitions of insn-emit.cc for
-+ genemit to create. [default=10]
- --with-dwarf2 force the default debug format to be DWARF 2 (or
- later)
- --with-specs=SPECS add SPECS to driver command-line processing
-@@ -7948,6 +7953,21 @@ fi
-
-
-
-+# Specify the number of splits of insn-emit.cc to generate.
-+
-+# Check whether --with-insnemit-partitions was given.
-+if test "${with_insnemit_partitions+set}" = set; then :
-+ withval=$with_insnemit_partitions; DEFAULT_INSNEMIT_PARTITIONS="$with_insnemit_partitions"
-+else
-+ DEFAULT_INSNEMIT_PARTITIONS=10
-+fi
-+
-+if (test $DEFAULT_INSNEMIT_PARTITIONS -lt 1); then
-+ as_fn_error $? "Invalid value $DEFAULT_INSNEMIT_PARTITIONS for --with-insnemit-partitions. Cannot be negative." "$LINENO" 5
-+fi
-+
-+
-+
- # Enable __cxa_atexit for C++.
- # Check whether --enable-__cxa_atexit was given.
- if test "${enable___cxa_atexit+set}" = set; then :
-@@ -19980,7 +20000,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 19983 "configure"
-+#line 19995 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -20086,7 +20106,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 20089 "configure"
-+#line 20101 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 10982cdfc099..dc8cb6a33de2 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -956,6 +956,19 @@ fi
-
- AC_SUBST(DEFAULT_MATCHPD_PARTITIONS)
-
-+# Specify the number of splits of insn-emit.cc to generate.
-+AC_ARG_WITH(insnemit-partitions,
-+[AS_HELP_STRING([--with-insnemit-partitions=num],
-+[Set the number of partitions of insn-emit.cc for genemit to create. [default=10]])],
-+[DEFAULT_INSNEMIT_PARTITIONS="$with_insnemit_partitions"], [DEFAULT_INSNEMIT_PARTITIONS=10])
-+if (test $DEFAULT_INSNEMIT_PARTITIONS -lt 1); then
-+ AC_MSG_ERROR(m4_normalize([
-+ Invalid value $DEFAULT_INSNEMIT_PARTITIONS for --with-insnemit-partitions. \
-+ Cannot be negative.]))
-+fi
-+
-+AC_SUBST(DEFAULT_INSNEMIT_PARTITIONS)
-+
- # Enable __cxa_atexit for C++.
- AC_ARG_ENABLE(__cxa_atexit,
- [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])],
-diff --git a/gcc/genemit.cc b/gcc/genemit.cc
-index 1ce0564076d8..471fd46a10b4 100644
---- a/gcc/genemit.cc
-+++ b/gcc/genemit.cc
-@@ -49,29 +49,29 @@ struct clobber_ent
- struct clobber_ent *next;
- };
-
--static void output_peephole2_scratches (rtx);
-+static void output_peephole2_scratches (rtx, FILE*);
-
- /* True for <X>_optab if that optab isn't allowed to fail. */
- static bool nofail_optabs[NUM_OPTABS];
- \f
- static void
--print_code (RTX_CODE code)
-+print_code (RTX_CODE code, FILE *file)
- {
- const char *p1;
- for (p1 = GET_RTX_NAME (code); *p1; p1++)
-- putchar (TOUPPER (*p1));
-+ fprintf (file, "%c", TOUPPER (*p1));
- }
-
- static void
--gen_rtx_scratch (rtx x, enum rtx_code subroutine_type)
-+gen_rtx_scratch (rtx x, enum rtx_code subroutine_type, FILE *file)
- {
- if (subroutine_type == DEFINE_PEEPHOLE2)
- {
-- printf ("operand%d", XINT (x, 0));
-+ fprintf (file, "operand%d", XINT (x, 0));
- }
- else
- {
-- printf ("gen_rtx_SCRATCH (%smode)", GET_MODE_NAME (GET_MODE (x)));
-+ fprintf (file, "gen_rtx_SCRATCH (%smode)", GET_MODE_NAME (GET_MODE (x)));
- }
- }
-
-@@ -79,7 +79,8 @@ gen_rtx_scratch (rtx x, enum rtx_code subroutine_type)
- substituting any operand references appearing within. */
-
- static void
--gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
-+gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info,
-+ FILE *file)
- {
- RTX_CODE code;
- int i;
-@@ -89,7 +90,7 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
-
- if (x == 0)
- {
-- printf ("NULL_RTX");
-+ fprintf (file, "NULL_RTX");
- return;
- }
-
-@@ -103,67 +104,67 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
- {
- if (used[XINT (x, 0)])
- {
-- printf ("copy_rtx (operand%d)", XINT (x, 0));
-+ fprintf (file, "copy_rtx (operand%d)", XINT (x, 0));
- return;
- }
- used[XINT (x, 0)] = 1;
- }
-- printf ("operand%d", XINT (x, 0));
-+ fprintf (file, "operand%d", XINT (x, 0));
- return;
-
- case MATCH_OP_DUP:
-- printf ("gen_rtx_fmt_");
-+ fprintf (file, "gen_rtx_fmt_");
- for (i = 0; i < XVECLEN (x, 1); i++)
-- printf ("e");
-- printf (" (GET_CODE (operand%d), ", XINT (x, 0));
-+ fprintf (file, "e");
-+ fprintf (file, " (GET_CODE (operand%d), ", XINT (x, 0));
- if (GET_MODE (x) == VOIDmode)
-- printf ("GET_MODE (operand%d)", XINT (x, 0));
-+ fprintf (file, "GET_MODE (operand%d)", XINT (x, 0));
- else
-- printf ("%smode", GET_MODE_NAME (GET_MODE (x)));
-+ fprintf (file, "%smode", GET_MODE_NAME (GET_MODE (x)));
- for (i = 0; i < XVECLEN (x, 1); i++)
- {
-- printf (",\n\t\t");
-- gen_exp (XVECEXP (x, 1, i), subroutine_type, used, info);
-+ fprintf (file, ",\n\t\t");
-+ gen_exp (XVECEXP (x, 1, i), subroutine_type, used, info, file);
- }
-- printf (")");
-+ fprintf (file, ")");
- return;
-
- case MATCH_OPERATOR:
-- printf ("gen_rtx_fmt_");
-+ fprintf (file, "gen_rtx_fmt_");
- for (i = 0; i < XVECLEN (x, 2); i++)
-- printf ("e");
-- printf (" (GET_CODE (operand%d)", XINT (x, 0));
-- printf (", %smode", GET_MODE_NAME (GET_MODE (x)));
-+ fprintf (file, "e");
-+ fprintf (file, " (GET_CODE (operand%d)", XINT (x, 0));
-+ fprintf (file, ", %smode", GET_MODE_NAME (GET_MODE (x)));
- for (i = 0; i < XVECLEN (x, 2); i++)
- {
-- printf (",\n\t\t");
-- gen_exp (XVECEXP (x, 2, i), subroutine_type, used, info);
-+ fprintf (file, ",\n\t\t");
-+ gen_exp (XVECEXP (x, 2, i), subroutine_type, used, info, file);
- }
-- printf (")");
-+ fprintf (file, ")");
- return;
-
- case MATCH_PARALLEL:
- case MATCH_PAR_DUP:
-- printf ("operand%d", XINT (x, 0));
-+ fprintf (file, "operand%d", XINT (x, 0));
- return;
-
- case MATCH_SCRATCH:
-- gen_rtx_scratch (x, subroutine_type);
-+ gen_rtx_scratch (x, subroutine_type, file);
- return;
-
- case PC:
-- printf ("pc_rtx");
-+ fprintf (file, "pc_rtx");
- return;
- case RETURN:
-- printf ("ret_rtx");
-+ fprintf (file, "ret_rtx");
- return;
- case SIMPLE_RETURN:
-- printf ("simple_return_rtx");
-+ fprintf (file, "simple_return_rtx");
- return;
- case CLOBBER:
- if (REG_P (XEXP (x, 0)))
- {
-- printf ("gen_hard_reg_clobber (%smode, %i)",
-+ fprintf (file, "gen_hard_reg_clobber (%smode, %i)",
- GET_MODE_NAME (GET_MODE (XEXP (x, 0))),
- REGNO (XEXP (x, 0)));
- return;
-@@ -172,22 +173,22 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
-
- case CONST_INT:
- if (INTVAL (x) == 0)
-- printf ("const0_rtx");
-+ fprintf (file, "const0_rtx");
- else if (INTVAL (x) == 1)
-- printf ("const1_rtx");
-+ fprintf (file, "const1_rtx");
- else if (INTVAL (x) == -1)
-- printf ("constm1_rtx");
-+ fprintf (file, "constm1_rtx");
- else if (-MAX_SAVED_CONST_INT <= INTVAL (x)
- && INTVAL (x) <= MAX_SAVED_CONST_INT)
-- printf ("const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
-+ fprintf (file, "const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
- (int) INTVAL (x));
- else if (INTVAL (x) == STORE_FLAG_VALUE)
-- printf ("const_true_rtx");
-+ fprintf (file, "const_true_rtx");
- else
- {
-- printf ("GEN_INT (");
-- printf (HOST_WIDE_INT_PRINT_DEC_C, INTVAL (x));
-- printf (")");
-+ fprintf (file, "GEN_INT (");
-+ fprintf (file, HOST_WIDE_INT_PRINT_DEC_C, INTVAL (x));
-+ fprintf (file, ")");
- }
- return;
-
-@@ -195,7 +196,7 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
- /* Handle `const_double_zero' rtx. */
- if (CONST_DOUBLE_REAL_VALUE (x)->cl == rvc_zero)
- {
-- printf ("CONST_DOUBLE_ATOF (\"0\", %smode)",
-+ fprintf (file, "CONST_DOUBLE_ATOF (\"0\", %smode)",
- GET_MODE_NAME (GET_MODE (x)));
- return;
- }
-@@ -210,12 +211,12 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
- break;
- }
-
-- printf ("gen_rtx_");
-- print_code (code);
-- printf (" (");
-+ fprintf (file, "gen_rtx_");
-+ print_code (code, file);
-+ fprintf (file, " (");
- if (!always_void_p (code))
- {
-- printf ("%smode", GET_MODE_NAME (GET_MODE (x)));
-+ fprintf (file, "%smode", GET_MODE_NAME (GET_MODE (x)));
- sep = ",\n\t";
- }
-
-@@ -225,41 +226,41 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
- {
- if (fmt[i] == '0')
- break;
-- fputs (sep, stdout);
-+ fputs (sep, file);
- switch (fmt[i])
- {
- case 'e': case 'u':
-- gen_exp (XEXP (x, i), subroutine_type, used, info);
-+ gen_exp (XEXP (x, i), subroutine_type, used, info, file);
- break;
-
- case 'i':
-- printf ("%u", XINT (x, i));
-+ fprintf (file, "%u", XINT (x, i));
- break;
-
- case 'r':
-- printf ("%u", REGNO (x));
-+ fprintf (file, "%u", REGNO (x));
- break;
-
- case 'p':
- /* We don't have a way of parsing polynomial offsets yet,
- and hopefully never will. */
-- printf ("%d", SUBREG_BYTE (x).to_constant ());
-+ fprintf (file, "%d", SUBREG_BYTE (x).to_constant ());
- break;
-
- case 's':
-- printf ("\"%s\"", XSTR (x, i));
-+ fprintf (file, "\"%s\"", XSTR (x, i));
- break;
-
- case 'E':
- {
- int j;
-- printf ("gen_rtvec (%d", XVECLEN (x, i));
-+ fprintf (file, "gen_rtvec (%d", XVECLEN (x, i));
- for (j = 0; j < XVECLEN (x, i); j++)
- {
-- printf (",\n\t\t");
-- gen_exp (XVECEXP (x, i, j), subroutine_type, used, info);
-+ fprintf (file, ",\n\t\t");
-+ gen_exp (XVECEXP (x, i, j), subroutine_type, used, info, file);
- }
-- printf (")");
-+ fprintf (file, ")");
- break;
- }
-
-@@ -268,14 +269,14 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
- }
- sep = ",\n\t";
- }
-- printf (")");
-+ fprintf (file, ")");
- }
-
- /* Output code to emit the instruction patterns in VEC, with each element
- becoming a separate instruction. USED is as for gen_exp. */
-
- static void
--gen_emit_seq (rtvec vec, char *used, md_rtx_info *info)
-+gen_emit_seq (rtvec vec, char *used, md_rtx_info *info, FILE *file)
- {
- for (int i = 0, len = GET_NUM_ELEM (vec); i < len; ++i)
- {
-@@ -283,17 +284,17 @@ gen_emit_seq (rtvec vec, char *used, md_rtx_info *info)
- rtx next = RTVEC_ELT (vec, i);
- if (const char *name = get_emit_function (next))
- {
-- printf (" %s (", name);
-- gen_exp (next, DEFINE_EXPAND, used, info);
-- printf (");\n");
-+ fprintf (file, " %s (", name);
-+ gen_exp (next, DEFINE_EXPAND, used, info, file);
-+ fprintf (file, ");\n");
- if (!last_p && needs_barrier_p (next))
-- printf (" emit_barrier ();");
-+ fprintf (file, " emit_barrier ();");
- }
- else
- {
-- printf (" emit (");
-- gen_exp (next, DEFINE_EXPAND, used, info);
-- printf (", %s);\n", last_p ? "false" : "true");
-+ fprintf (file, " emit (");
-+ gen_exp (next, DEFINE_EXPAND, used, info, file);
-+ fprintf (file, ", %s);\n", last_p ? "false" : "true");
- }
- }
- }
-@@ -303,27 +304,27 @@ gen_emit_seq (rtvec vec, char *used, md_rtx_info *info)
- for use in error messages. */
-
- static void
--emit_c_code (const char *code, bool can_fail_p, const char *name)
-+emit_c_code (const char *code, bool can_fail_p, const char *name, FILE *file)
- {
- if (can_fail_p)
-- printf ("#define FAIL return (end_sequence (), _val)\n");
-+ fprintf (file, "#define FAIL return (end_sequence (), _val)\n");
- else
-- printf ("#define FAIL _Pragma (\"GCC error \\\"%s cannot FAIL\\\"\")"
-+ fprintf (file, "#define FAIL _Pragma (\"GCC error \\\"%s cannot FAIL\\\"\")"
- " (void)0\n", name);
-- printf ("#define DONE return (_val = get_insns (), "
-+ fprintf (file, "#define DONE return (_val = get_insns (), "
- "end_sequence (), _val)\n");
-
-- rtx_reader_ptr->print_md_ptr_loc (code);
-- printf ("%s\n", code);
-+ rtx_reader_ptr->print_md_ptr_loc (code, file);
-+ fprintf (file, "%s\n", code);
-
-- printf ("#undef DONE\n");
-- printf ("#undef FAIL\n");
-+ fprintf (file, "#undef DONE\n");
-+ fprintf (file, "#undef FAIL\n");
- }
- \f
- /* Generate the `gen_...' function for a DEFINE_INSN. */
-
- static void
--gen_insn (md_rtx_info *info)
-+gen_insn (md_rtx_info *info, FILE *file)
- {
- struct pattern_stats stats;
- int i;
-@@ -409,7 +410,7 @@ gen_insn (md_rtx_info *info)
- if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*')
- return;
-
-- printf ("/* %s:%d */\n", info->loc.filename, info->loc.lineno);
-+ fprintf (file, "/* %s:%d */\n", info->loc.filename, info->loc.lineno);
-
- /* Find out how many operands this function has. */
- get_pattern_stats (&stats, XVEC (insn, 1));
-@@ -417,17 +418,17 @@ gen_insn (md_rtx_info *info)
- fatal_at (info->loc, "match_dup operand number has no match_operand");
-
- /* Output the function name and argument declarations. */
-- printf ("rtx\ngen_%s (", XSTR (insn, 0));
-+ fprintf (file, "rtx\ngen_%s (", XSTR (insn, 0));
- if (stats.num_generator_args)
- for (i = 0; i < stats.num_generator_args; i++)
- if (i)
-- printf (",\n\trtx operand%d ATTRIBUTE_UNUSED", i);
-+ fprintf (file, ",\n\trtx operand%d ATTRIBUTE_UNUSED", i);
- else
-- printf ("rtx operand%d ATTRIBUTE_UNUSED", i);
-+ fprintf (file, "rtx operand%d ATTRIBUTE_UNUSED", i);
- else
-- printf ("void");
-- printf (")\n");
-- printf ("{\n");
-+ fprintf (file, "void");
-+ fprintf (file, ")\n");
-+ fprintf (file, "{\n");
-
- /* Output code to construct and return the rtl for the instruction body. */
-
-@@ -436,16 +437,16 @@ gen_insn (md_rtx_info *info)
- char *used = (XVECLEN (insn, 1) == 1
- ? NULL
- : XCNEWVEC (char, stats.num_generator_args));
-- printf (" return ");
-- gen_exp (pattern, DEFINE_INSN, used, info);
-- printf (";\n}\n\n");
-+ fprintf (file, " return ");
-+ gen_exp (pattern, DEFINE_INSN, used, info, file);
-+ fprintf (file, ";\n}\n\n");
- XDELETEVEC (used);
- }
- \f
- /* Generate the `gen_...' function for a DEFINE_EXPAND. */
-
- static void
--gen_expand (md_rtx_info *info)
-+gen_expand (md_rtx_info *info, FILE *file)
- {
- struct pattern_stats stats;
- int i;
-@@ -466,17 +467,17 @@ gen_expand (md_rtx_info *info)
- "numbers above all other operands", XSTR (expand, 0));
-
- /* Output the function name and argument declarations. */
-- printf ("rtx\ngen_%s (", XSTR (expand, 0));
-+ fprintf (file, "rtx\ngen_%s (", XSTR (expand, 0));
- if (stats.num_generator_args)
- for (i = 0; i < stats.num_generator_args; i++)
- if (i)
-- printf (",\n\trtx operand%d", i);
-+ fprintf (file, ",\n\trtx operand%d", i);
- else
-- printf ("rtx operand%d", i);
-+ fprintf (file, "rtx operand%d", i);
- else
-- printf ("void");
-- printf (")\n");
-- printf ("{\n");
-+ fprintf (file, "void");
-+ fprintf (file, ")\n");
-+ fprintf (file, "{\n");
-
- /* If we don't have any C code to write, only one insn is being written,
- and no MATCH_DUPs are present, we can just return the desired insn
-@@ -485,18 +486,18 @@ gen_expand (md_rtx_info *info)
- && stats.max_opno >= stats.max_dup_opno
- && XVECLEN (expand, 1) == 1)
- {
-- printf (" return ");
-- gen_exp (XVECEXP (expand, 1, 0), DEFINE_EXPAND, NULL, info);
-- printf (";\n}\n\n");
-+ fprintf (file, " return ");
-+ gen_exp (XVECEXP (expand, 1, 0), DEFINE_EXPAND, NULL, info, file);
-+ fprintf (file, ";\n}\n\n");
- return;
- }
-
- /* For each operand referred to only with MATCH_DUPs,
- make a local variable. */
- for (i = stats.num_generator_args; i <= stats.max_dup_opno; i++)
-- printf (" rtx operand%d;\n", i);
-- printf (" rtx_insn *_val = 0;\n");
-- printf (" start_sequence ();\n");
-+ fprintf (file, " rtx operand%d;\n", i);
-+ fprintf (file, " rtx_insn *_val = 0;\n");
-+ fprintf (file, " start_sequence ();\n");
-
- /* The fourth operand of DEFINE_EXPAND is some code to be executed
- before the actual construction.
-@@ -506,13 +507,13 @@ gen_expand (md_rtx_info *info)
- So copy the operand values there before executing it. */
- if (XSTR (expand, 3) && *XSTR (expand, 3))
- {
-- printf (" {\n");
-+ fprintf (file, " {\n");
- if (stats.num_operand_vars > 0)
-- printf (" rtx operands[%d];\n", stats.num_operand_vars);
-+ fprintf (file, " rtx operands[%d];\n", stats.num_operand_vars);
-
- /* Output code to copy the arguments into `operands'. */
- for (i = 0; i < stats.num_generator_args; i++)
-- printf (" operands[%d] = operand%d;\n", i, i);
-+ fprintf (file, " operands[%d] = operand%d;\n", i, i);
-
- /* Output the special code to be executed before the sequence
- is generated. */
-@@ -524,7 +525,7 @@ gen_expand (md_rtx_info *info)
- if (nofail_optabs[p.op])
- can_fail_p = false;
- }
-- emit_c_code (XSTR (expand, 3), can_fail_p, XSTR (expand, 0));
-+ emit_c_code (XSTR (expand, 3), can_fail_p, XSTR (expand, 0), file);
-
- /* Output code to copy the arguments back out of `operands'
- (unless we aren't going to use them at all). */
-@@ -532,29 +533,29 @@ gen_expand (md_rtx_info *info)
- {
- for (i = 0; i <= MAX (stats.max_opno, stats.max_dup_opno); i++)
- {
-- printf (" operand%d = operands[%d];\n", i, i);
-- printf (" (void) operand%d;\n", i);
-+ fprintf (file, " operand%d = operands[%d];\n", i, i);
-+ fprintf (file, " (void) operand%d;\n", i);
- }
- }
-- printf (" }\n");
-+ fprintf (file, " }\n");
- }
-
- used = XCNEWVEC (char, stats.num_operand_vars);
-- gen_emit_seq (XVEC (expand, 1), used, info);
-+ gen_emit_seq (XVEC (expand, 1), used, info, file);
- XDELETEVEC (used);
-
- /* Call `get_insns' to extract the list of all the
- insns emitted within this gen_... function. */
-
-- printf (" _val = get_insns ();\n");
-- printf (" end_sequence ();\n");
-- printf (" return _val;\n}\n\n");
-+ fprintf (file, " _val = get_insns ();\n");
-+ fprintf (file, " end_sequence ();\n");
-+ fprintf (file, " return _val;\n}\n\n");
- }
-
- /* Like gen_expand, but generates insns resulting from splitting SPLIT. */
-
- static void
--gen_split (md_rtx_info *info)
-+gen_split (md_rtx_info *info, FILE *file)
- {
- struct pattern_stats stats;
- int i;
-@@ -580,62 +581,62 @@ gen_split (md_rtx_info *info)
- /* Output the prototype, function name and argument declarations. */
- if (GET_CODE (split) == DEFINE_PEEPHOLE2)
- {
-- printf ("extern rtx_insn *gen_%s_%d (rtx_insn *, rtx *);\n",
-+ fprintf (file, "extern rtx_insn *gen_%s_%d (rtx_insn *, rtx *);\n",
- name, info->index);
-- printf ("rtx_insn *\ngen_%s_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED,"
-+ fprintf (file, "rtx_insn *\ngen_%s_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED,"
- " rtx *operands%s)\n",
- name, info->index, unused);
- }
- else
- {
-- printf ("extern rtx_insn *gen_split_%d (rtx_insn *, rtx *);\n",
-+ fprintf (file, "extern rtx_insn *gen_split_%d (rtx_insn *, rtx *);\n",
- info->index);
-- printf ("rtx_insn *\ngen_split_%d "
-+ fprintf (file, "rtx_insn *\ngen_split_%d "
- "(rtx_insn *curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n",
- info->index, unused);
- }
-- printf ("{\n");
-+ fprintf (file, "{\n");
-
- /* Declare all local variables. */
- for (i = 0; i < stats.num_operand_vars; i++)
-- printf (" rtx operand%d;\n", i);
-- printf (" rtx_insn *_val = NULL;\n");
-+ fprintf (file, " rtx operand%d;\n", i);
-+ fprintf (file, " rtx_insn *_val = NULL;\n");
-
- if (GET_CODE (split) == DEFINE_PEEPHOLE2)
-- output_peephole2_scratches (split);
-+ output_peephole2_scratches (split, file);
-
- const char *fn = info->loc.filename;
- for (const char *p = fn; *p; p++)
- if (*p == '/')
- fn = p + 1;
-
-- printf (" if (dump_file)\n");
-- printf (" fprintf (dump_file, \"Splitting with gen_%s_%d (%s:%d)\\n\");\n",
-+ fprintf (file, " if (dump_file)\n");
-+ fprintf (file, " fprintf (dump_file, \"Splitting with gen_%s_%d (%s:%d)\\n\");\n",
- name, info->index, fn, info->loc.lineno);
-
-- printf (" start_sequence ();\n");
-+ fprintf (file, " start_sequence ();\n");
-
- /* The fourth operand of DEFINE_SPLIT is some code to be executed
- before the actual construction. */
-
- if (XSTR (split, 3))
-- emit_c_code (XSTR (split, 3), true, name);
-+ emit_c_code (XSTR (split, 3), true, name, file);
-
- /* Output code to copy the arguments back out of `operands' */
- for (i = 0; i < stats.num_operand_vars; i++)
- {
-- printf (" operand%d = operands[%d];\n", i, i);
-- printf (" (void) operand%d;\n", i);
-+ fprintf (file, " operand%d = operands[%d];\n", i, i);
-+ fprintf (file, " (void) operand%d;\n", i);
- }
-
-- gen_emit_seq (XVEC (split, 2), used, info);
-+ gen_emit_seq (XVEC (split, 2), used, info, file);
-
- /* Call `get_insns' to make a list of all the
- insns emitted within this gen_... function. */
-
-- printf (" _val = get_insns ();\n");
-- printf (" end_sequence ();\n");
-- printf (" return _val;\n}\n\n");
-+ fprintf (file, " _val = get_insns ();\n");
-+ fprintf (file, " end_sequence ();\n");
-+ fprintf (file, " return _val;\n}\n\n");
-
- free (used);
- }
-@@ -645,37 +646,37 @@ gen_split (md_rtx_info *info)
- the end of the vector. */
-
- static void
--output_add_clobbers (md_rtx_info *info)
-+output_add_clobbers (md_rtx_info *info, FILE *file)
- {
- struct clobber_pat *clobber;
- struct clobber_ent *ent;
- int i;
-
-- printf ("\n\nvoid\nadd_clobbers (rtx pattern ATTRIBUTE_UNUSED, int insn_code_number)\n");
-- printf ("{\n");
-- printf (" switch (insn_code_number)\n");
-- printf (" {\n");
-+ fprintf (file, "\n\nvoid\nadd_clobbers (rtx pattern ATTRIBUTE_UNUSED, int insn_code_number)\n");
-+ fprintf (file, "{\n");
-+ fprintf (file, " switch (insn_code_number)\n");
-+ fprintf (file, " {\n");
-
- for (clobber = clobber_list; clobber; clobber = clobber->next)
- {
- for (ent = clobber->insns; ent; ent = ent->next)
-- printf (" case %d:\n", ent->code_number);
-+ fprintf (file, " case %d:\n", ent->code_number);
-
- for (i = clobber->first_clobber; i < XVECLEN (clobber->pattern, 1); i++)
- {
-- printf (" XVECEXP (pattern, 0, %d) = ", i);
-+ fprintf (file, " XVECEXP (pattern, 0, %d) = ", i);
- gen_exp (XVECEXP (clobber->pattern, 1, i),
-- GET_CODE (clobber->pattern), NULL, info);
-- printf (";\n");
-+ GET_CODE (clobber->pattern), NULL, info, file);
-+ fprintf (file, ";\n");
- }
-
-- printf (" break;\n\n");
-+ fprintf (file, " break;\n\n");
- }
-
-- printf (" default:\n");
-- printf (" gcc_unreachable ();\n");
-- printf (" }\n");
-- printf ("}\n");
-+ fprintf (file, " default:\n");
-+ fprintf (file, " gcc_unreachable ();\n");
-+ fprintf (file, " }\n");
-+ fprintf (file, "}\n");
- }
- \f
- /* Write a function, `added_clobbers_hard_reg_p' that is given an insn_code
-@@ -684,17 +685,17 @@ output_add_clobbers (md_rtx_info *info)
- SCRATCH. */
-
- static void
--output_added_clobbers_hard_reg_p (void)
-+output_added_clobbers_hard_reg_p (FILE *file)
- {
- struct clobber_pat *clobber;
- struct clobber_ent *ent;
- int clobber_p;
- bool used;
-
-- printf ("\n\nbool\nadded_clobbers_hard_reg_p (int insn_code_number)\n");
-- printf ("{\n");
-- printf (" switch (insn_code_number)\n");
-- printf (" {\n");
-+ fprintf (file, "\n\nbool\nadded_clobbers_hard_reg_p (int insn_code_number)\n");
-+ fprintf (file, "{\n");
-+ fprintf (file, " switch (insn_code_number)\n");
-+ fprintf (file, " {\n");
-
- for (clobber_p = 0; clobber_p <= 1; clobber_p++)
- {
-@@ -703,25 +704,25 @@ output_added_clobbers_hard_reg_p (void)
- if (clobber->has_hard_reg == clobber_p)
- for (ent = clobber->insns; ent; ent = ent->next)
- {
-- printf (" case %d:\n", ent->code_number);
-+ fprintf (file, " case %d:\n", ent->code_number);
- used = true;
- }
-
- if (used)
-- printf (" return %s;\n\n", clobber_p ? "true" : "false");
-+ fprintf (file, " return %s;\n\n", clobber_p ? "true" : "false");
- }
-
-- printf (" default:\n");
-- printf (" gcc_unreachable ();\n");
-- printf (" }\n");
-- printf ("}\n");
-+ fprintf (file, " default:\n");
-+ fprintf (file, " gcc_unreachable ();\n");
-+ fprintf (file, " }\n");
-+ fprintf (file, "}\n");
- }
- \f
- /* Generate code to invoke find_free_register () as needed for the
- scratch registers used by the peephole2 pattern in SPLIT. */
-
- static void
--output_peephole2_scratches (rtx split)
-+output_peephole2_scratches (rtx split, FILE *file)
- {
- int i;
- int insn_nr = 0;
-@@ -746,12 +747,12 @@ output_peephole2_scratches (rtx split)
-
- if (first)
- {
-- printf (" HARD_REG_SET _regs_allocated;\n");
-- printf (" CLEAR_HARD_REG_SET (_regs_allocated);\n");
-+ fprintf (file, " HARD_REG_SET _regs_allocated;\n");
-+ fprintf (file, " CLEAR_HARD_REG_SET (_regs_allocated);\n");
- first = false;
- }
-
-- printf (" if ((operands[%d] = peep2_find_free_register (%d, %d, \"%s\", %smode, &_regs_allocated)) == NULL_RTX)\n\
-+ fprintf (file, " if ((operands[%d] = peep2_find_free_register (%d, %d, \"%s\", %smode, &_regs_allocated)) == NULL_RTX)\n\
- return NULL;\n",
- XINT (elt, 0),
- insn_nr, last_insn_nr,
-@@ -767,50 +768,50 @@ output_peephole2_scratches (rtx split)
- /* Print "arg<N>" parameter declarations for each argument N of ONAME. */
-
- static void
--print_overload_arguments (overloaded_name *oname)
-+print_overload_arguments (overloaded_name *oname, FILE *file)
- {
- for (unsigned int i = 0; i < oname->arg_types.length (); ++i)
-- printf ("%s%s arg%d", i == 0 ? "" : ", ", oname->arg_types[i], i);
-+ fprintf (file, "%s%s arg%d", i == 0 ? "" : ", ", oname->arg_types[i], i);
- }
-
- /* Print code to test whether INSTANCE should be chosen, given that
- argument N of the overload is available as "arg<N>". */
-
- static void
--print_overload_test (overloaded_instance *instance)
-+print_overload_test (overloaded_instance *instance, FILE *file)
- {
- for (unsigned int i = 0; i < instance->arg_values.length (); ++i)
-- printf ("%sarg%d == %s", i == 0 ? " if (" : "\n && ",
-+ fprintf (file, "%sarg%d == %s", i == 0 ? " if (" : "\n && ",
- i, instance->arg_values[i]);
-- printf (")\n");
-+ fprintf (file, ")\n");
- }
-
- /* Emit a maybe_code_for_* function for ONAME. */
-
- static void
--handle_overloaded_code_for (overloaded_name *oname)
-+handle_overloaded_code_for (overloaded_name *oname, FILE *file)
- {
- /* Print the function prototype. */
-- printf ("\ninsn_code\nmaybe_code_for_%s (", oname->name);
-- print_overload_arguments (oname);
-- printf (")\n{\n");
-+ fprintf (file, "\ninsn_code\nmaybe_code_for_%s (", oname->name);
-+ print_overload_arguments (oname, file);
-+ fprintf (file, ")\n{\n");
-
- /* Use a sequence of "if" statements for each instance. */
- for (overloaded_instance *instance = oname->first_instance;
- instance; instance = instance->next)
- {
-- print_overload_test (instance);
-- printf (" return CODE_FOR_%s;\n", instance->name);
-+ print_overload_test (instance, file);
-+ fprintf (file, " return CODE_FOR_%s;\n", instance->name);
- }
-
- /* Return null if no match was found. */
-- printf (" return CODE_FOR_nothing;\n}\n");
-+ fprintf (file, " return CODE_FOR_nothing;\n}\n");
- }
-
- /* Emit a maybe_gen_* function for ONAME. */
-
- static void
--handle_overloaded_gen (overloaded_name *oname)
-+handle_overloaded_gen (overloaded_name *oname, FILE *file)
- {
- unsigned HOST_WIDE_INT seen = 0;
- /* All patterns must have the same number of operands. */
-@@ -827,25 +828,25 @@ handle_overloaded_gen (overloaded_name *oname)
- seen |= mask;
-
- /* Print the function prototype. */
-- printf ("\nrtx\nmaybe_gen_%s (", oname->name);
-- print_overload_arguments (oname);
-+ fprintf (file, "\nrtx\nmaybe_gen_%s (", oname->name);
-+ print_overload_arguments (oname, file);
- for (int i = 0; i < stats.num_generator_args; ++i)
-- printf (", rtx x%d", i);
-- printf (")\n{\n");
-+ fprintf (file, ", rtx x%d", i);
-+ fprintf (file, ")\n{\n");
-
- /* Use maybe_code_for_*, instead of duplicating the selection
- logic here. */
-- printf (" insn_code code = maybe_code_for_%s (", oname->name);
-+ fprintf (file, " insn_code code = maybe_code_for_%s (", oname->name);
- for (unsigned int i = 0; i < oname->arg_types.length (); ++i)
-- printf ("%sarg%d", i == 0 ? "" : ", ", i);
-- printf (");\n"
-+ fprintf (file, "%sarg%d", i == 0 ? "" : ", ", i);
-+ fprintf (file, ");\n"
- " if (code != CODE_FOR_nothing)\n"
- " {\n"
- " gcc_assert (insn_data[code].n_generator_args == %d);\n"
- " return GEN_FCN (code) (", stats.num_generator_args);
- for (int i = 0; i < stats.num_generator_args; ++i)
-- printf ("%sx%d", i == 0 ? "" : ", ", i);
-- printf (");\n"
-+ fprintf (file, "%sx%d", i == 0 ? "" : ", ", i);
-+ fprintf (file, ");\n"
- " }\n"
- " else\n"
- " return NULL_RTX;\n"
-@@ -853,12 +854,68 @@ handle_overloaded_gen (overloaded_name *oname)
- }
- }
-
-+void
-+print_header (FILE *file)
-+{
-+ fprintf (file, "/* Generated automatically by the program `genemit'\n\
-+from the machine description file `md'. */\n\n");
-+
-+ fprintf (file, "#define IN_TARGET_CODE 1\n");
-+ fprintf (file, "#include \"config.h\"\n");
-+ fprintf (file, "#include \"system.h\"\n");
-+ fprintf (file, "#include \"coretypes.h\"\n");
-+ fprintf (file, "#include \"backend.h\"\n");
-+ fprintf (file, "#include \"predict.h\"\n");
-+ fprintf (file, "#include \"tree.h\"\n");
-+ fprintf (file, "#include \"rtl.h\"\n");
-+ fprintf (file, "#include \"alias.h\"\n");
-+ fprintf (file, "#include \"varasm.h\"\n");
-+ fprintf (file, "#include \"stor-layout.h\"\n");
-+ fprintf (file, "#include \"calls.h\"\n");
-+ fprintf (file, "#include \"memmodel.h\"\n");
-+ fprintf (file, "#include \"tm_p.h\"\n");
-+ fprintf (file, "#include \"flags.h\"\n");
-+ fprintf (file, "#include \"insn-config.h\"\n");
-+ fprintf (file, "#include \"expmed.h\"\n");
-+ fprintf (file, "#include \"dojump.h\"\n");
-+ fprintf (file, "#include \"explow.h\"\n");
-+ fprintf (file, "#include \"emit-rtl.h\"\n");
-+ fprintf (file, "#include \"stmt.h\"\n");
-+ fprintf (file, "#include \"expr.h\"\n");
-+ fprintf (file, "#include \"insn-codes.h\"\n");
-+ fprintf (file, "#include \"optabs.h\"\n");
-+ fprintf (file, "#include \"dfp.h\"\n");
-+ fprintf (file, "#include \"output.h\"\n");
-+ fprintf (file, "#include \"recog.h\"\n");
-+ fprintf (file, "#include \"df.h\"\n");
-+ fprintf (file, "#include \"resource.h\"\n");
-+ fprintf (file, "#include \"reload.h\"\n");
-+ fprintf (file, "#include \"diagnostic-core.h\"\n");
-+ fprintf (file, "#include \"regs.h\"\n");
-+ fprintf (file, "#include \"tm-constrs.h\"\n");
-+ fprintf (file, "#include \"ggc.h\"\n");
-+ fprintf (file, "#include \"target.h\"\n\n");
-+}
-+
-+auto_vec<const char *, 10> output_files;
-+
-+static bool
-+handle_arg (const char *arg)
-+{
-+ if (arg[1] == 'O')
-+ {
-+ output_files.safe_push (&arg[2]);
-+ return true;
-+ }
-+ return false;
-+}
-+
- int
- main (int argc, const char **argv)
- {
- progname = "genemit";
-
-- if (!init_rtx_reader_args (argc, argv))
-+ if (!init_rtx_reader_args_cb (argc, argv, handle_arg))
- return (FATAL_EXIT_CODE);
-
- #define DEF_INTERNAL_OPTAB_FN(NAME, FLAGS, OPTAB, TYPE) \
-@@ -868,86 +925,87 @@ main (int argc, const char **argv)
- /* Assign sequential codes to all entries in the machine description
- in parallel with the tables in insn-output.cc. */
-
-- printf ("/* Generated automatically by the program `genemit'\n\
--from the machine description file `md'. */\n\n");
-+ int npatterns = count_patterns ();
-+ md_rtx_info info;
-+
-+ bool to_stdout = false;
-+ int npatterns_per_file = npatterns;
-+ if (!output_files.is_empty ())
-+ npatterns_per_file = npatterns / output_files.length () + 1;
-+ else
-+ to_stdout = true;
-
-- printf ("#define IN_TARGET_CODE 1\n");
-- printf ("#include \"config.h\"\n");
-- printf ("#include \"system.h\"\n");
-- printf ("#include \"coretypes.h\"\n");
-- printf ("#include \"backend.h\"\n");
-- printf ("#include \"predict.h\"\n");
-- printf ("#include \"tree.h\"\n");
-- printf ("#include \"rtl.h\"\n");
-- printf ("#include \"alias.h\"\n");
-- printf ("#include \"varasm.h\"\n");
-- printf ("#include \"stor-layout.h\"\n");
-- printf ("#include \"calls.h\"\n");
-- printf ("#include \"memmodel.h\"\n");
-- printf ("#include \"tm_p.h\"\n");
-- printf ("#include \"flags.h\"\n");
-- printf ("#include \"insn-config.h\"\n");
-- printf ("#include \"expmed.h\"\n");
-- printf ("#include \"dojump.h\"\n");
-- printf ("#include \"explow.h\"\n");
-- printf ("#include \"emit-rtl.h\"\n");
-- printf ("#include \"stmt.h\"\n");
-- printf ("#include \"expr.h\"\n");
-- printf ("#include \"insn-codes.h\"\n");
-- printf ("#include \"optabs.h\"\n");
-- printf ("#include \"dfp.h\"\n");
-- printf ("#include \"output.h\"\n");
-- printf ("#include \"recog.h\"\n");
-- printf ("#include \"df.h\"\n");
-- printf ("#include \"resource.h\"\n");
-- printf ("#include \"reload.h\"\n");
-- printf ("#include \"diagnostic-core.h\"\n");
-- printf ("#include \"regs.h\"\n");
-- printf ("#include \"tm-constrs.h\"\n");
-- printf ("#include \"ggc.h\"\n");
-- printf ("#include \"target.h\"\n\n");
-+ gcc_assert (npatterns_per_file > 1);
-
-- /* Read the machine description. */
-+ /* Reverse so we can pop the first-added element. */
-+ output_files.reverse ();
-
-- md_rtx_info info;
-+ int count = 0;
-+ FILE *file = NULL;
-+
-+ /* Read the machine description. */
- while (read_md_rtx (&info))
-- switch (GET_CODE (info.def))
-- {
-- case DEFINE_INSN:
-- gen_insn (&info);
-- break;
-+ {
-+ if (count == 0 || count == npatterns_per_file)
-+ {
-+ bool is_last = !to_stdout && output_files.is_empty ();
-+ if (file && !is_last)
-+ if (fclose (file) != 0)
-+ return FATAL_EXIT_CODE;
-
-- case DEFINE_EXPAND:
-- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
-- gen_expand (&info);
-- break;
-+ if (!output_files.is_empty ())
-+ {
-+ const char *const filename = output_files.pop ();
-+ file = fopen (filename, "w");
-+ }
-+ else if (to_stdout)
-+ file = stdout;
-+ else
-+ break;
-
-- case DEFINE_SPLIT:
-- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
-- gen_split (&info);
-- break;
-+ print_header (file);
-+ count = 0;
-+ }
-
-- case DEFINE_PEEPHOLE2:
-- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
-- gen_split (&info);
-- break;
-+ switch (GET_CODE (info.def))
-+ {
-+ case DEFINE_INSN:
-+ gen_insn (&info, file);
-+ break;
-
-- default:
-- break;
-- }
-+ case DEFINE_EXPAND:
-+ fprintf (file, "/* %s:%d */\n", info.loc.filename, info.loc.lineno);
-+ gen_expand (&info, file);
-+ break;
-+
-+ case DEFINE_SPLIT:
-+ fprintf (file, "/* %s:%d */\n", info.loc.filename, info.loc.lineno);
-+ gen_split (&info, file);
-+ break;
-+
-+ case DEFINE_PEEPHOLE2:
-+ fprintf (file, "/* %s:%d */\n", info.loc.filename, info.loc.lineno);
-+ gen_split (&info, file);
-+ break;
-+
-+ default:
-+ break;
-+ }
-+
-+ count++;
-+ }
-
- /* Write out the routines to add CLOBBERs to a pattern and say whether they
- clobber a hard reg. */
-- output_add_clobbers (&info);
-- output_added_clobbers_hard_reg_p ();
-+ output_add_clobbers (&info, file);
-+ output_added_clobbers_hard_reg_p (file);
-
- for (overloaded_name *oname = rtx_reader_ptr->get_overloads ();
- oname; oname = oname->next)
- {
-- handle_overloaded_code_for (oname);
-- handle_overloaded_gen (oname);
-+ handle_overloaded_code_for (oname, file);
-+ handle_overloaded_gen (oname, file);
- }
-
-- fflush (stdout);
-- return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
-+ return (fclose (file) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
- }
-diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc
-index dd920d673b45..688808c7d12b 100644
---- a/gcc/gensupport.cc
-+++ b/gcc/gensupport.cc
-@@ -3131,6 +3131,61 @@ init_rtx_reader_args (int argc, const char **argv)
- return init_rtx_reader_args_cb (argc, argv, 0);
- }
- \f
-+/* Count the number of patterns in all queues and return the count. */
-+int
-+count_patterns ()
-+{
-+ int count = 0, truth = 1;
-+ rtx def;
-+ class queue_elem *cur = define_attr_queue;
-+ while (cur)
-+ {
-+ def = cur->data;
-+
-+ truth = maybe_eval_c_test (get_c_test (def));
-+ if (truth || !insn_elision)
-+ count++;
-+ cur = cur->next;
-+ }
-+
-+ cur = define_pred_queue;
-+ while (cur)
-+ {
-+ def = cur->data;
-+
-+ truth = maybe_eval_c_test (get_c_test (def));
-+ if (truth || !insn_elision)
-+ count++;
-+ cur = cur->next;
-+ }
-+
-+ cur = define_insn_queue;
-+ truth = 1;
-+ while (cur)
-+ {
-+ def = cur->data;
-+
-+ truth = maybe_eval_c_test (get_c_test (def));
-+ if (truth || !insn_elision)
-+ count++;
-+ cur = cur->next;
-+ }
-+
-+ cur = other_queue;
-+ truth = 1;
-+ while (cur)
-+ {
-+ def = cur->data;
-+
-+ truth = maybe_eval_c_test (get_c_test (def));
-+ if (truth || !insn_elision)
-+ count++;
-+ cur = cur->next;
-+ }
-+
-+ return count;
-+}
-+\f
- /* Try to read a single rtx from the file. Return true on success,
- describing it in *INFO. */
-
-diff --git a/gcc/gensupport.h b/gcc/gensupport.h
-index 7925e22ed418..7396118714bc 100644
---- a/gcc/gensupport.h
-+++ b/gcc/gensupport.h
-@@ -130,6 +130,7 @@ extern rtx add_implicit_parallel (rtvec);
- extern rtx_reader *init_rtx_reader_args_cb (int, const char **,
- bool (*)(const char *));
- extern rtx_reader *init_rtx_reader_args (int, const char **);
-+extern int count_patterns ();
- extern bool read_md_rtx (md_rtx_info *);
- extern unsigned int get_num_insn_codes ();
-
-diff --git a/gcc/read-md.cc b/gcc/read-md.cc
-index fd38818e3a3e..46ab9065e3e4 100644
---- a/gcc/read-md.cc
-+++ b/gcc/read-md.cc
-@@ -132,9 +132,9 @@ md_reader::fprint_md_ptr_loc (FILE *outf, const void *ptr)
-
- /* Special fprint_md_ptr_loc for writing to STDOUT. */
- void
--md_reader::print_md_ptr_loc (const void *ptr)
-+md_reader::print_md_ptr_loc (const void *ptr, FILE *file)
- {
-- fprint_md_ptr_loc (stdout, ptr);
-+ fprint_md_ptr_loc (file, ptr);
- }
-
- /* Return a condition that satisfies both COND1 and COND2. Either string
-diff --git a/gcc/read-md.h b/gcc/read-md.h
-index b309c9c3deb6..2adcb58478fe 100644
---- a/gcc/read-md.h
-+++ b/gcc/read-md.h
-@@ -194,7 +194,7 @@ class md_reader
- const struct ptr_loc *get_md_ptr_loc (const void *ptr);
- void copy_md_ptr_loc (const void *new_ptr, const void *old_ptr);
- void fprint_md_ptr_loc (FILE *outf, const void *ptr);
-- void print_md_ptr_loc (const void *ptr);
-+ void print_md_ptr_loc (const void *ptr, FILE * = stdout);
-
- struct enum_type *lookup_enum_type (const char *name);
- void traverse_enum_types (htab_trav callback, void *info);
---
-2.42.0
-
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-10-27 23:43 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-10-27 23:43 UTC (permalink / raw
To: gentoo-commits
commit: a8500ccbb951d8e6b395cab78c3a67be3f7c0018
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 27 23:41:21 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 23:41:21 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=a8500ccb
14.0.0: update 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
Signed-off-by: Sam James <sam <AT> gentoo.org>
...genemit-Split-insn-emit.cc-into-ten-files.patch | 154 ++++++++++++++++-----
14.0.0/gentoo/README.history | 4 +
2 files changed, 122 insertions(+), 36 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
index 988c0f4..bd31760 100644
--- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
@@ -1,10 +1,36 @@
https://gcc.gnu.org/PR54179
https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com/
-From 544943ea6b4d0e9a57408ca92464e22b84ffcb12 Mon Sep 17 00:00:00 2001
+From a3804c98c5f73c02b3732b06a15dc4a397e60dad Mon Sep 17 00:00:00 2001
From: Robin Dapp <rdapp.gcc@gmail.com>
-Date: Fri, 20 Oct 2023 13:27:41 +0200
-Subject: [PATCH] genemit: Split insn-emit.cc into several partitions.
+Date: Fri, 27 Oct 2023 21:04:25 +0200
+Subject: [PATCH] genemit: Split insn-emit.cc into ten files.
+
+After working with Sam off-list (thanks) I managed to get hppa to
+build. Initially it looked as if hppa just had a very small number of
+instruction patterns so we wouldn't generate all 10 output files.
+However, the actual issue (which we will only hit with a low
+pattern count) was with counting all the patterns vs only counting
+the patterns that will be output. A wrong pattern count lead to
+prematurely stopping to write output files.
+
+With that corrected, hppa "just works" until I hit linker errors
+due to relocations - most likely unrelated:
+
+bin/ld: unwind-dw2-fde-dip_s.o(.data.rel.ro+0): cannot handle
+R_PARISC_FPTR64 for __pthread_key_create@@GLIBC_2.34
+
+Attached is v3 that has been bootstrapped and tested on x86 and power10,
+aarch64 bootstrap was ok, testsuite is still running. A riscv build and
+testsuite run was successful as well.
+
+Regards
+ Robin
+
+>From 248744c328440bff9cc339d2bf622852cbaac343 Mon Sep 17 00:00:00 2001
+From: Robin Dapp <rdapp@ventanamicro.com>
+Date: Thu, 12 Oct 2023 11:23:26 +0200
+Subject: [PATCH v3] genemit: Split insn-emit.cc into several partitions.
On riscv insn-emit.cc has grown to over 1.2 mio lines of code and
compiling it takes considerable time.
@@ -46,6 +72,19 @@ gcc/ChangeLog:
* gensupport.h (count_patterns): Define.
* read-md.cc (md_reader::print_md_ptr_loc): Add file argument.
* read-md.h (class md_reader): Change definition.
+---
+ gcc/Makefile.in | 36 ++-
+ gcc/configure | 24 +-
+ gcc/configure.ac | 13 ++
+ gcc/genemit.cc | 542 +++++++++++++++++++++++++---------------------
+ gcc/gensupport.cc | 55 +++++
+ gcc/gensupport.h | 1 +
+ gcc/read-md.cc | 4 +-
+ gcc/read-md.h | 2 +-
+ 8 files changed, 422 insertions(+), 255 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 91d6bfbea4d0..d8bfad8de154 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
@@ -71,7 +110,7 @@ gcc/ChangeLog:
insn-extract.o \
insn-latencytab.o \
insn-modes.o \
-@@ -1856,7 +1863,8 @@ TREECHECKING = @TREECHECKING@
+@@ -1857,7 +1864,8 @@ TREECHECKING = @TREECHECKING@
FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
@@ -81,7 +120,7 @@ gcc/ChangeLog:
insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \
tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \
-@@ -2488,11 +2496,11 @@ $(common_out_object_file): $(common_out_file)
+@@ -2489,11 +2497,11 @@ $(common_out_object_file): $(common_out_file)
# and compile them.
.PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
@@ -98,7 +137,7 @@ gcc/ChangeLog:
# Dependencies for the md file. The first time through, we just assume
# the md file itself and the generated dependency file (in order to get
-@@ -2515,7 +2523,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
+@@ -2516,7 +2524,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
simple_rtl_generated_h = insn-attr.h insn-attr-common.h insn-codes.h \
insn-config.h insn-flags.h insn-target-def.h
@@ -107,7 +146,7 @@ gcc/ChangeLog:
insn-extract.cc insn-output.cc \
insn-peep.cc insn-recog.cc
-@@ -2544,8 +2552,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
+@@ -2545,8 +2553,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
$(STAMP) s-$*
@@ -129,7 +168,7 @@ gcc/ChangeLog:
s-check : build/gencheck$(build_exeext)
$(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
diff --git a/gcc/configure b/gcc/configure
-index c47a8c5..0e4e0e4 100755
+index 77f33ee4df6f..d4ad988000f0 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -844,6 +844,7 @@ enable_gcov
@@ -158,7 +197,7 @@ index c47a8c5..0e4e0e4 100755
--with-dwarf2 force the default debug format to be DWARF 2 (or
later)
--with-specs=SPECS add SPECS to driver command-line processing
-@@ -7941,6 +7946,21 @@ fi
+@@ -7948,6 +7953,21 @@ fi
@@ -180,11 +219,29 @@ index c47a8c5..0e4e0e4 100755
# Enable __cxa_atexit for C++.
# Check whether --enable-__cxa_atexit was given.
if test "${enable___cxa_atexit+set}" = set; then :
+@@ -19980,7 +20000,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 19983 "configure"
++#line 19995 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -20086,7 +20106,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 20089 "configure"
++#line 20101 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index b443da5..d4a6fff 100644
+index 10982cdfc099..dc8cb6a33de2 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -949,6 +949,19 @@ fi
+@@ -956,6 +956,19 @@ fi
AC_SUBST(DEFAULT_MATCHPD_PARTITIONS)
@@ -205,7 +262,7 @@ index b443da5..d4a6fff 100644
AC_ARG_ENABLE(__cxa_atexit,
[AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])],
diff --git a/gcc/genemit.cc b/gcc/genemit.cc
-index 1ce0564..8d8a3c4 100644
+index 1ce0564076d8..471fd46a10b4 100644
--- a/gcc/genemit.cc
+++ b/gcc/genemit.cc
@@ -49,29 +49,29 @@ struct clobber_ent
@@ -1083,7 +1140,7 @@ index 1ce0564..8d8a3c4 100644
return (FATAL_EXIT_CODE);
#define DEF_INTERNAL_OPTAB_FN(NAME, FLAGS, OPTAB, TYPE) \
-@@ -868,86 +925,81 @@ main (int argc, const char **argv)
+@@ -868,86 +925,87 @@ main (int argc, const char **argv)
/* Assign sequential codes to all entries in the machine description
in parallel with the tables in insn-output.cc. */
@@ -1091,6 +1148,13 @@ index 1ce0564..8d8a3c4 100644
-from the machine description file `md'. */\n\n");
+ int npatterns = count_patterns ();
+ md_rtx_info info;
++
++ bool to_stdout = false;
++ int npatterns_per_file = npatterns;
++ if (!output_files.is_empty ())
++ npatterns_per_file = npatterns / output_files.length () + 1;
++ else
++ to_stdout = true;
- printf ("#define IN_TARGET_CODE 1\n");
- printf ("#include \"config.h\"\n");
@@ -1127,17 +1191,13 @@ index 1ce0564..8d8a3c4 100644
- printf ("#include \"tm-constrs.h\"\n");
- printf ("#include \"ggc.h\"\n");
- printf ("#include \"target.h\"\n\n");
-+ int npatterns_per_file = npatterns;
-+ if (!output_files.is_empty ())
-+ npatterns_per_file = npatterns / output_files.length () + 1;
-
-- /* Read the machine description. */
+ gcc_assert (npatterns_per_file > 1);
-- md_rtx_info info;
+- /* Read the machine description. */
+ /* Reverse so we can pop the first-added element. */
+ output_files.reverse ();
-+
+
+- md_rtx_info info;
+ int count = 0;
+ FILE *file = NULL;
+
@@ -1151,7 +1211,8 @@ index 1ce0564..8d8a3c4 100644
+ {
+ if (count == 0 || count == npatterns_per_file)
+ {
-+ if (file)
++ bool is_last = !to_stdout && output_files.is_empty ();
++ if (file && !is_last)
+ if (fclose (file) != 0)
+ return FATAL_EXIT_CODE;
@@ -1164,8 +1225,10 @@ index 1ce0564..8d8a3c4 100644
+ const char *const filename = output_files.pop ();
+ file = fopen (filename, "w");
+ }
-+ else
++ else if (to_stdout)
+ file = stdout;
++ else
++ break;
- case DEFINE_SPLIT:
- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
@@ -1231,10 +1294,10 @@ index 1ce0564..8d8a3c4 100644
+ return (fclose (file) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc
-index dd920d6..367ba1a 100644
+index dd920d673b45..688808c7d12b 100644
--- a/gcc/gensupport.cc
+++ b/gcc/gensupport.cc
-@@ -3131,6 +3131,42 @@ init_rtx_reader_args (int argc, const char **argv)
+@@ -3131,6 +3131,61 @@ init_rtx_reader_args (int argc, const char **argv)
return init_rtx_reader_args_cb (argc, argv, 0);
}
\f
@@ -1242,32 +1305,51 @@ index dd920d6..367ba1a 100644
+int
+count_patterns ()
+{
-+ int count = 0;
++ int count = 0, truth = 1;
++ rtx def;
+ class queue_elem *cur = define_attr_queue;
-+ while (cur != NULL)
++ while (cur)
+ {
-+ count++;
++ def = cur->data;
++
++ truth = maybe_eval_c_test (get_c_test (def));
++ if (truth || !insn_elision)
++ count++;
+ cur = cur->next;
+ }
+
+ cur = define_pred_queue;
-+ while (cur != NULL)
++ while (cur)
+ {
-+ count++;
++ def = cur->data;
++
++ truth = maybe_eval_c_test (get_c_test (def));
++ if (truth || !insn_elision)
++ count++;
+ cur = cur->next;
+ }
+
+ cur = define_insn_queue;
-+ while (cur != NULL)
++ truth = 1;
++ while (cur)
+ {
-+ count++;
++ def = cur->data;
++
++ truth = maybe_eval_c_test (get_c_test (def));
++ if (truth || !insn_elision)
++ count++;
+ cur = cur->next;
+ }
+
+ cur = other_queue;
-+ while (cur != NULL)
++ truth = 1;
++ while (cur)
+ {
-+ count++;
++ def = cur->data;
++
++ truth = maybe_eval_c_test (get_c_test (def));
++ if (truth || !insn_elision)
++ count++;
+ cur = cur->next;
+ }
+
@@ -1278,7 +1360,7 @@ index dd920d6..367ba1a 100644
describing it in *INFO. */
diff --git a/gcc/gensupport.h b/gcc/gensupport.h
-index 7925e22..7396118 100644
+index 7925e22ed418..7396118714bc 100644
--- a/gcc/gensupport.h
+++ b/gcc/gensupport.h
@@ -130,6 +130,7 @@ extern rtx add_implicit_parallel (rtvec);
@@ -1290,7 +1372,7 @@ index 7925e22..7396118 100644
extern unsigned int get_num_insn_codes ();
diff --git a/gcc/read-md.cc b/gcc/read-md.cc
-index fd38818..46ab906 100644
+index fd38818e3a3e..46ab9065e3e4 100644
--- a/gcc/read-md.cc
+++ b/gcc/read-md.cc
@@ -132,9 +132,9 @@ md_reader::fprint_md_ptr_loc (FILE *outf, const void *ptr)
@@ -1306,7 +1388,7 @@ index fd38818..46ab906 100644
/* Return a condition that satisfies both COND1 and COND2. Either string
diff --git a/gcc/read-md.h b/gcc/read-md.h
-index b309c9c..2adcb58 100644
+index b309c9c3deb6..2adcb58478fe 100644
--- a/gcc/read-md.h
+++ b/gcc/read-md.h
@@ -194,7 +194,7 @@ class md_reader
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index f8c8e61..4bd7684 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+7 28 Oct 2023
+
+ U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+
6 22 Oct 2023
U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-10-22 23:00 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-10-22 23:00 UTC (permalink / raw
To: gentoo-commits
commit: aabcc9fe95c292c890038c9ba56c27cada2070bc
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 22 22:51:45 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 22 22:51:51 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=aabcc9fe
14.0.0: rebase 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
Signed-off-by: Sam James <sam <AT> gentoo.org>
...genemit-Split-insn-emit.cc-into-ten-files.patch | 68 +++++++---------------
14.0.0/gentoo/README.history | 4 ++
2 files changed, 24 insertions(+), 48 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
index 723d78a..988c0f4 100644
--- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
@@ -1,3 +1,6 @@
+https://gcc.gnu.org/PR54179
+https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com/
+
From 544943ea6b4d0e9a57408ca92464e22b84ffcb12 Mon Sep 17 00:00:00 2001
From: Robin Dapp <rdapp.gcc@gmail.com>
Date: Fri, 20 Oct 2023 13:27:41 +0200
@@ -43,19 +46,6 @@ gcc/ChangeLog:
* gensupport.h (count_patterns): Define.
* read-md.cc (md_reader::print_md_ptr_loc): Add file argument.
* read-md.h (class md_reader): Change definition.
----
- gcc/Makefile.in | 36 +++-
- gcc/configure | 24 ++-
- gcc/configure.ac | 13 ++
- gcc/genemit.cc | 536 +++++++++++++++++++++++++---------------------
- gcc/gensupport.cc | 36 ++++
- gcc/gensupport.h | 1 +
- gcc/read-md.cc | 4 +-
- gcc/read-md.h | 2 +-
- 8 files changed, 397 insertions(+), 255 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index a25a1e32fbc..dc63c67409b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
@@ -72,7 +62,7 @@ index a25a1e32fbc..dc63c67409b 100644
# These files are to have specific diagnostics suppressed, or are not to
# be subject to -Werror:
# flex output may yield harmless "no previous prototype" warnings
-@@ -1354,7 +1361,7 @@ OBJS = \
+@@ -1356,7 +1363,7 @@ OBJS = \
insn-attrtab.o \
insn-automata.o \
insn-dfatab.o \
@@ -81,7 +71,7 @@ index a25a1e32fbc..dc63c67409b 100644
insn-extract.o \
insn-latencytab.o \
insn-modes.o \
-@@ -1854,7 +1861,8 @@ TREECHECKING = @TREECHECKING@
+@@ -1856,7 +1863,8 @@ TREECHECKING = @TREECHECKING@
FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
@@ -91,7 +81,7 @@ index a25a1e32fbc..dc63c67409b 100644
insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \
tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \
-@@ -2483,11 +2491,11 @@ $(common_out_object_file): $(common_out_file)
+@@ -2488,11 +2496,11 @@ $(common_out_object_file): $(common_out_file)
# and compile them.
.PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
@@ -108,7 +98,7 @@ index a25a1e32fbc..dc63c67409b 100644
# Dependencies for the md file. The first time through, we just assume
# the md file itself and the generated dependency file (in order to get
-@@ -2510,7 +2518,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
+@@ -2515,7 +2523,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
simple_rtl_generated_h = insn-attr.h insn-attr-common.h insn-codes.h \
insn-config.h insn-flags.h insn-target-def.h
@@ -117,7 +107,7 @@ index a25a1e32fbc..dc63c67409b 100644
insn-extract.cc insn-output.cc \
insn-peep.cc insn-recog.cc
-@@ -2539,8 +2547,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
+@@ -2544,8 +2552,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
$(STAMP) s-$*
@@ -139,10 +129,10 @@ index a25a1e32fbc..dc63c67409b 100644
s-check : build/gencheck$(build_exeext)
$(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
diff --git a/gcc/configure b/gcc/configure
-index 9f5b7081992..cf35b8fac89 100755
+index c47a8c5..0e4e0e4 100755
--- a/gcc/configure
+++ b/gcc/configure
-@@ -842,6 +842,7 @@ enable_gcov
+@@ -844,6 +844,7 @@ enable_gcov
enable_shared
enable_fixed_point
enable_decimal_float
@@ -150,7 +140,7 @@ index 9f5b7081992..cf35b8fac89 100755
DEFAULT_MATCHPD_PARTITIONS
with_float
with_cpu
-@@ -971,6 +972,7 @@ enable_multilib
+@@ -973,6 +974,7 @@ enable_multilib
enable_multiarch
with_stack_clash_protection_guard_size
with_matchpd_partitions
@@ -158,7 +148,7 @@ index 9f5b7081992..cf35b8fac89 100755
enable___cxa_atexit
enable_decimal_float
enable_fixed_point
-@@ -1839,6 +1841,9 @@ Optional Packages:
+@@ -1846,6 +1848,9 @@ Optional Packages:
--with-matchpd-partitions=num
Set the number of partitions to make for gimple and
generic when splitting match.pd. [default=10]
@@ -168,7 +158,7 @@ index 9f5b7081992..cf35b8fac89 100755
--with-dwarf2 force the default debug format to be DWARF 2 (or
later)
--with-specs=SPECS add SPECS to driver command-line processing
-@@ -7938,6 +7943,21 @@ fi
+@@ -7941,6 +7946,21 @@ fi
@@ -190,29 +180,11 @@ index 9f5b7081992..cf35b8fac89 100755
# Enable __cxa_atexit for C++.
# Check whether --enable-__cxa_atexit was given.
if test "${enable___cxa_atexit+set}" = set; then :
-@@ -19923,7 +19943,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 19926 "configure"
-+#line 19946 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
-@@ -20029,7 +20049,7 @@ else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
--#line 20032 "configure"
-+#line 20052 "configure"
- #include "confdefs.h"
-
- #if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index c10e007f9bf..eac2cadab00 100644
+index b443da5..d4a6fff 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
-@@ -956,6 +956,19 @@ fi
+@@ -949,6 +949,19 @@ fi
AC_SUBST(DEFAULT_MATCHPD_PARTITIONS)
@@ -233,7 +205,7 @@ index c10e007f9bf..eac2cadab00 100644
AC_ARG_ENABLE(__cxa_atexit,
[AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])],
diff --git a/gcc/genemit.cc b/gcc/genemit.cc
-index 1ce0564076d..8d8a3c4aa80 100644
+index 1ce0564..8d8a3c4 100644
--- a/gcc/genemit.cc
+++ b/gcc/genemit.cc
@@ -49,29 +49,29 @@ struct clobber_ent
@@ -1259,7 +1231,7 @@ index 1ce0564076d..8d8a3c4aa80 100644
+ return (fclose (file) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
}
diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc
-index dd920d673b4..367ba1a30a4 100644
+index dd920d6..367ba1a 100644
--- a/gcc/gensupport.cc
+++ b/gcc/gensupport.cc
@@ -3131,6 +3131,42 @@ init_rtx_reader_args (int argc, const char **argv)
@@ -1306,7 +1278,7 @@ index dd920d673b4..367ba1a30a4 100644
describing it in *INFO. */
diff --git a/gcc/gensupport.h b/gcc/gensupport.h
-index 7925e22ed41..7396118714b 100644
+index 7925e22..7396118 100644
--- a/gcc/gensupport.h
+++ b/gcc/gensupport.h
@@ -130,6 +130,7 @@ extern rtx add_implicit_parallel (rtvec);
@@ -1318,7 +1290,7 @@ index 7925e22ed41..7396118714b 100644
extern unsigned int get_num_insn_codes ();
diff --git a/gcc/read-md.cc b/gcc/read-md.cc
-index fd38818e3a3..46ab9065e3e 100644
+index fd38818..46ab906 100644
--- a/gcc/read-md.cc
+++ b/gcc/read-md.cc
@@ -132,9 +132,9 @@ md_reader::fprint_md_ptr_loc (FILE *outf, const void *ptr)
@@ -1334,7 +1306,7 @@ index fd38818e3a3..46ab9065e3e 100644
/* Return a condition that satisfies both COND1 and COND2. Either string
diff --git a/gcc/read-md.h b/gcc/read-md.h
-index b309c9c3deb..2adcb58478f 100644
+index b309c9c..2adcb58 100644
--- a/gcc/read-md.h
+++ b/gcc/read-md.h
@@ -194,7 +194,7 @@ class md_reader
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 096dfcb..f8c8e61 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+6 22 Oct 2023
+
+ U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+
5 21 Oct 2023
U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-10-21 17:42 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-10-21 17:42 UTC (permalink / raw
To: gentoo-commits
commit: 990901f6580beef856459bb679b3f6f69d410b85
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 21 17:42:04 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 17:42:20 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=990901f6
14.0.0: update 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
Pull in a version from private email w/ Robin for more testing.
Signed-off-by: Sam James <sam <AT> gentoo.org>
...genemit-Split-insn-emit.cc-into-ten-files.patch | 142 +++------------------
14.0.0/gentoo/README.history | 4 +
2 files changed, 24 insertions(+), 122 deletions(-)
diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
index dbcea97..723d78a 100644
--- a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
@@ -1,111 +1,13 @@
-https://gcc.gnu.org/PR54179
-https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com/
-
-From mboxrd@z Thu Jan 1 00:00:00 1970
-Return-Path: <SRS0=V+kJ=F6=gmail.com=rdapp.gcc@sourceware.org>
-Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435])
- by sourceware.org (Postfix) with ESMTPS id 494063858D33
- for <gcc-patches@gcc.gnu.org>; Mon, 16 Oct 2023 10:17:21 +0000 (GMT)
-DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 494063858D33
-Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com
-Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
-ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 494063858D33
-Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::435
-ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697451446; cv=none;
- b=p7qdXp6tA02vcm8FYp8Z94RsTNBTMF12iWlVcXVLWFaSW8HGwwCYhMGYoGFaifZQRu4UKyuAB+IzEF6a/yAg4YIoSatzLygSXd8C4Y5pTzNOedtsXKySOf2H5tU0JllZhFiL0j839yK0ULkru902Fm5qYfCWOI/oclFGFv0QJhk=
-ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
- t=1697451446; c=relaxed/simple;
- bh=F5nvjfODgAkwvN6oz045m/y2cCq1Y5w/bjL6/Zx7/us=;
- h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Irn6EDwgJ++gSjzeSooV3KQnHee12GYc2RQmTDoYZo/FSdddOhiPTfdaC7P29HmOXa4CPBOS8Yv9BTZMwm6YLK9J2wCQws5N76sMTuINsJ4seyvCF4hUO/2icjNn/K1NCpiAh/hGfqdO7ASiqbVBoFfgM7fwtCOYLKF6sIY1lyM=
-ARC-Authentication-Results: i=1; server2.sourceware.org
-Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32d834ec222so4107319f8f.0
- for <gcc-patches@gcc.gnu.org>; Mon, 16 Oct 2023 03:17:21 -0700 (PDT)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
- d=gmail.com; s=20230601; t=1697451440; x=1698056240; darn=gcc.gnu.org;
- h=content-transfer-encoding:in-reply-to:from:references:to
- :content-language:subject:cc:user-agent:mime-version:date:message-id
- :from:to:cc:subject:date:message-id:reply-to;
- bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=;
- b=ir8fQ9LhX/rsjkKQE99tm5M/K+iNNIYZ/1cdZ5bz4WDndMrk52oidsfzruyMfSbRhB
- rHSI1uSAzTr3Hp0f3ugYQInO3KFgdrvSiZ1sUhIcSA9SG7fCECczgD7GcW6OZn6F8c9u
- XbFgqbWLIFtqXeKsmQs+CY2nS4KS/CRT9eoUafES8rZNYXDOe9QVbHjblx7rtXWO2HXQ
- lmfzqTktf3I7JxtYpl0r0MYMcjSfcq0DOuL80NWyMDlBWOQT3IBAdyulrLAEW+jH/Z8p
- xQ15SULgu0m2yiv/KGWXTkZfr7tvRGnSmmdtRRH0FCoXSf8jg/zHFTkl/j+SzlSzDwGs
- c1qg==
-X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
- d=1e100.net; s=20230601; t=1697451440; x=1698056240;
- h=content-transfer-encoding:in-reply-to:from:references:to
- :content-language:subject:cc:user-agent:mime-version:date:message-id
- :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
- bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=;
- b=kKfXLuOWBPVcAyFOUh31XizZ+aCfxMvezPMmblFS/UpzD2W/C0uFKwEGnChfefXi2/
- +bzYReU5vtLu8pAloncEatu5L4GV1u+WdTSbW1T5xIy+5oMx++9PpyY4AE247J0yd86k
- 1y7iJTKapjRfltZuFYEXFXtk+EUb6KM8JtlwJvoxl1WA5eUMF3QS7mrB/a4aM4x6i+Eg
- YlOoTXYO0bLGOCdeXOLJfjDEkck1ELrHj2LtlRHyrlB9cfOgf17T6ndeeHGFfXNQHPZ9
- 6ozlhvhckpJQgI9lmwx9y62sUeq7EvLbrq6iRQm/urmU7ONjSXtvH9MhuU6vUBxvHZ7m
- L7/Q==
-X-Gm-Message-State: AOJu0Yx8eFwSIp03QtdxQpmlUlQqKK5PYRJxvpOd/sAQ1a6DUl745e7C
- /BMIbVYdWvfmdTlOA4Fq7wwu2tV7IwY=
-X-Google-Smtp-Source: AGHT+IHxbooDFrEU9aYJYA4rfQo2Hg5vBRYXtzpX5blf0iOYdzDMzsRxuyqHl6Jlfcy9/43ovuJMnQ==
-X-Received: by 2002:a5d:4402:0:b0:32d:8907:2b18 with SMTP id z2-20020a5d4402000000b0032d89072b18mr12076090wrq.66.1697451439584;
- Mon, 16 Oct 2023 03:17:19 -0700 (PDT)
-Received: from [192.168.1.23] (ip-046-223-203-173.um13.pools.vodafone-ip.de. [46.223.203.173])
- by smtp.gmail.com with ESMTPSA id e10-20020a5d65ca000000b0032da6f17ffdsm4983379wrw.38.2023.10.16.03.17.18
- (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
- Mon, 16 Oct 2023 03:17:19 -0700 (PDT)
-Message-ID: <0867077f-12ac-4a89-8745-440cc782fe5b@gmail.com>
-Date: Mon, 16 Oct 2023 12:17:07 +0200
-MIME-Version: 1.0
-User-Agent: Mozilla Thunderbird
-Cc: rdapp.gcc@gmail.com, jeffreyalaw <jeffreyalaw@gmail.com>,
- "rjiejie@linux.alibaba.com" <rjiejie@linux.alibaba.com>
-Subject: Re: [PATCH] genemit: Split insn-emit.cc into ten files.
-Content-Language: en-US
-To: Tamar Christina <Tamar.Christina@arm.com>,
- gcc-patches <gcc-patches@gcc.gnu.org>
-References: <de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com>
- <be6174c7-820c-45b2-abb6-177c0701e3f5@gmail.com>
- <VI1PR08MB53258DF11D842AD7BBDA7434FFD2A@VI1PR08MB5325.eurprd08.prod.outlook.com>
- <37f1c7f7-411e-46de-8d68-a1e21ff440ae@gmail.com>
+From 544943ea6b4d0e9a57408ca92464e22b84ffcb12 Mon Sep 17 00:00:00 2001
From: Robin Dapp <rdapp.gcc@gmail.com>
-In-Reply-To: <37f1c7f7-411e-46de-8d68-a1e21ff440ae@gmail.com>
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 7bit
-X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6
-X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org
-List-Id: <gcc-patches.gcc.gnu.org>
-
-Hi,
-
-the attached v2 includes Tamar's suggestion of keeping the current
-stdout behavior. When no output files are passed (via -O) the output
-is written to stdout as before.
-
-Tamar also mentioned off-list that, similar to match.pd, it might make
-sense to balance the partitions in a better way than a fixed number
-of patterns threshold. That's a good idea but I'd rather do that
-separately as the current approach already helps considerably.
-
-Attached v2 was bootstrapped and regtested on power10, aarch64 and
-x86 are still running.
-Stefan also tested v1 on s390 where the partitioning does not help
-but also doesn't slow anything down. insn-emit.cc isn't very large
-to begin with on s390.
-
-Regards
- Robin
-
->From 34d05113a4e3c7e83a4731020307e26c1144af69 Mon Sep 17 00:00:00 2001
-From: Robin Dapp <rdapp@ventanamicro.com>
-Date: Thu, 12 Oct 2023 11:23:26 +0200
-Subject: [PATCH v2] genemit: Split insn-emit.cc into several partitions.
+Date: Fri, 20 Oct 2023 13:27:41 +0200
+Subject: [PATCH] genemit: Split insn-emit.cc into several partitions.
On riscv insn-emit.cc has grown to over 1.2 mio lines of code and
compiling it takes considerable time.
Therefore, this patch adjust genemit to create several partitions
-(insn-emit-1.cc to insn-emit-n.cc). In order to do so it first counts
-the number of available patterns, calculates the number of patterns per
-file and starts a new file whenever that number is reached.
+(insn-emit-1.cc to insn-emit-n.cc). The available patterns are
+written to the given files in a sequential fashion.
Similar to match.pd a configure option --with-emitinsn-partitions=num
is introduced that makes the number of partition configurable.
@@ -142,7 +44,7 @@ gcc/ChangeLog:
* read-md.cc (md_reader::print_md_ptr_loc): Add file argument.
* read-md.h (class md_reader): Change definition.
---
- gcc/Makefile.in | 38 +++-
+ gcc/Makefile.in | 36 +++-
gcc/configure | 24 ++-
gcc/configure.ac | 13 ++
gcc/genemit.cc | 536 +++++++++++++++++++++++++---------------------
@@ -150,10 +52,10 @@ gcc/ChangeLog:
gcc/gensupport.h | 1 +
gcc/read-md.cc | 4 +-
gcc/read-md.h | 2 +-
- 8 files changed, 399 insertions(+), 255 deletions(-)
+ 8 files changed, 397 insertions(+), 255 deletions(-)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 9cc16268abf..ca0a616f768 100644
+index a25a1e32fbc..dc63c67409b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
@@ -179,7 +81,7 @@ index 9cc16268abf..ca0a616f768 100644
insn-extract.o \
insn-latencytab.o \
insn-modes.o \
-@@ -1852,7 +1859,8 @@ TREECHECKING = @TREECHECKING@
+@@ -1854,7 +1861,8 @@ TREECHECKING = @TREECHECKING@
FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
@@ -189,7 +91,7 @@ index 9cc16268abf..ca0a616f768 100644
insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \
tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \
-@@ -2481,11 +2489,11 @@ $(common_out_object_file): $(common_out_file)
+@@ -2483,11 +2491,11 @@ $(common_out_object_file): $(common_out_file)
# and compile them.
.PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
@@ -206,7 +108,7 @@ index 9cc16268abf..ca0a616f768 100644
# Dependencies for the md file. The first time through, we just assume
# the md file itself and the generated dependency file (in order to get
-@@ -2508,7 +2516,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
+@@ -2510,7 +2518,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
simple_rtl_generated_h = insn-attr.h insn-attr-common.h insn-codes.h \
insn-config.h insn-flags.h insn-target-def.h
@@ -215,31 +117,29 @@ index 9cc16268abf..ca0a616f768 100644
insn-extract.cc insn-output.cc \
insn-peep.cc insn-recog.cc
-@@ -2537,8 +2545,22 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
+@@ -2539,8 +2547,20 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
$(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
$(STAMP) s-$*
+# genemit splits its output into different files and doesn't write to
+# stdout. (but rather to tmp-emit-01.cc..tmp-emit-10.cc)
-+s-tmp-emit: build/genemit$(build_exeext) insn-conditions.md
++$(INSNEMIT_SEQ_SRC): s-tmp-emit; @true
++s-tmp-emit: build/genemit$(build_exeext) $(MD_DEPS) insn-conditions.md
+ $(RUN_GEN) build/genemit$(build_exeext) $(md_file) insn-conditions.md \
+ $(addprefix -O,${INSNEMIT_SEQ_TMP})
++ $(foreach id, $(INSNEMIT_SPLITS_SEQ), \
++ $(SHELL) $(srcdir)/../move-if-change tmp-emit-$(id).cc \
++ insn-emit-$(id).cc;)
+ $(STAMP) s-tmp-emit
-+
-+$(INSNEMIT_SEQ_SRC): insn-emit-%.cc: s-insn-emit-%; @true
-+$(INSNEMIT_SEQ_SRC:insn-emit-%.cc=s-insn-emit-%): s-insn-emit-%: s-tmp-emit
-+ $(SHELL) $(srcdir)/../move-if-change tmp-emit-$*.cc insn-emit-$*.cc
-+ $(STAMP) s-insn-emit-$*
+
# gencheck doesn't read the machine description, and the file produced
# doesn't use the insn-* convention.
+
-+# --> s-check has prerequisite tree-check.h (though nothing to do)
tree-check.h: s-check ; @true
s-check : build/gencheck$(build_exeext)
$(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
diff --git a/gcc/configure b/gcc/configure
-index c43bde8174b..00672b18f72 100755
+index 9f5b7081992..cf35b8fac89 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -842,6 +842,7 @@ enable_gcov
@@ -309,7 +209,7 @@ index c43bde8174b..00672b18f72 100755
#if HAVE_DLFCN_H
diff --git a/gcc/configure.ac b/gcc/configure.ac
-index fb8e32f8ee5..bc0ef734e6c 100644
+index c10e007f9bf..eac2cadab00 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -956,6 +956,19 @@ fi
@@ -1447,7 +1347,5 @@ index b309c9c3deb..2adcb58478f 100644
struct enum_type *lookup_enum_type (const char *name);
void traverse_enum_types (htab_trav callback, void *info);
--
-2.41.0
-
-
+2.42.0
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index fe5b568..096dfcb 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,7 @@
+5 21 Oct 2023
+
+ U 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+
4 18 Oct 2023
+ 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-10-16 12:41 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-10-16 12:41 UTC (permalink / raw
To: gentoo-commits
commit: cfe1a42149964e54a250698e9d8dc50f4745caf9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 16 12:33:30 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 16 12:40:58 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=cfe1a421
14.0.0: backport insn-emit split patches
For parity with 13.x.
This is a continuation of 7a6b2d23ec02e75475a6123254ccd44d73827f39 ('13.2.0: backport split match.pd changes')
in a sense - see that commit for rationale for backporting.
Motivated here again by more reports of OOMs with insn-match.cc.
Bug: https://gcc.gnu.org/PR54179
Bug: https://gcc.gnu.org/PR84402
Bug: https://gcc.gnu.org/PR111600
Signed-off-by: Sam James <sam <AT> gentoo.org>
...genemit-Split-insn-emit.cc-into-ten-files.patch | 1453 ++++++++++++++++++++
14.0.0/gentoo/README.history | 6 +
2 files changed, 1459 insertions(+)
diff --git a/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
new file mode 100644
index 0000000..dbcea97
--- /dev/null
+++ b/14.0.0/gentoo/75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
@@ -0,0 +1,1453 @@
+https://gcc.gnu.org/PR54179
+https://inbox.sourceware.org/gcc-patches/de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com/
+
+From mboxrd@z Thu Jan 1 00:00:00 1970
+Return-Path: <SRS0=V+kJ=F6=gmail.com=rdapp.gcc@sourceware.org>
+Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435])
+ by sourceware.org (Postfix) with ESMTPS id 494063858D33
+ for <gcc-patches@gcc.gnu.org>; Mon, 16 Oct 2023 10:17:21 +0000 (GMT)
+DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 494063858D33
+Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com
+Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
+ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 494063858D33
+Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::435
+ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697451446; cv=none;
+ b=p7qdXp6tA02vcm8FYp8Z94RsTNBTMF12iWlVcXVLWFaSW8HGwwCYhMGYoGFaifZQRu4UKyuAB+IzEF6a/yAg4YIoSatzLygSXd8C4Y5pTzNOedtsXKySOf2H5tU0JllZhFiL0j839yK0ULkru902Fm5qYfCWOI/oclFGFv0QJhk=
+ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
+ t=1697451446; c=relaxed/simple;
+ bh=F5nvjfODgAkwvN6oz045m/y2cCq1Y5w/bjL6/Zx7/us=;
+ h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Irn6EDwgJ++gSjzeSooV3KQnHee12GYc2RQmTDoYZo/FSdddOhiPTfdaC7P29HmOXa4CPBOS8Yv9BTZMwm6YLK9J2wCQws5N76sMTuINsJ4seyvCF4hUO/2icjNn/K1NCpiAh/hGfqdO7ASiqbVBoFfgM7fwtCOYLKF6sIY1lyM=
+ARC-Authentication-Results: i=1; server2.sourceware.org
+Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32d834ec222so4107319f8f.0
+ for <gcc-patches@gcc.gnu.org>; Mon, 16 Oct 2023 03:17:21 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=gmail.com; s=20230601; t=1697451440; x=1698056240; darn=gcc.gnu.org;
+ h=content-transfer-encoding:in-reply-to:from:references:to
+ :content-language:subject:cc:user-agent:mime-version:date:message-id
+ :from:to:cc:subject:date:message-id:reply-to;
+ bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=;
+ b=ir8fQ9LhX/rsjkKQE99tm5M/K+iNNIYZ/1cdZ5bz4WDndMrk52oidsfzruyMfSbRhB
+ rHSI1uSAzTr3Hp0f3ugYQInO3KFgdrvSiZ1sUhIcSA9SG7fCECczgD7GcW6OZn6F8c9u
+ XbFgqbWLIFtqXeKsmQs+CY2nS4KS/CRT9eoUafES8rZNYXDOe9QVbHjblx7rtXWO2HXQ
+ lmfzqTktf3I7JxtYpl0r0MYMcjSfcq0DOuL80NWyMDlBWOQT3IBAdyulrLAEW+jH/Z8p
+ xQ15SULgu0m2yiv/KGWXTkZfr7tvRGnSmmdtRRH0FCoXSf8jg/zHFTkl/j+SzlSzDwGs
+ c1qg==
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=1e100.net; s=20230601; t=1697451440; x=1698056240;
+ h=content-transfer-encoding:in-reply-to:from:references:to
+ :content-language:subject:cc:user-agent:mime-version:date:message-id
+ :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
+ bh=wq5w+s2m/P53eb5oT6XaK+NiaOj7NqTTS7VH5l0hPUk=;
+ b=kKfXLuOWBPVcAyFOUh31XizZ+aCfxMvezPMmblFS/UpzD2W/C0uFKwEGnChfefXi2/
+ +bzYReU5vtLu8pAloncEatu5L4GV1u+WdTSbW1T5xIy+5oMx++9PpyY4AE247J0yd86k
+ 1y7iJTKapjRfltZuFYEXFXtk+EUb6KM8JtlwJvoxl1WA5eUMF3QS7mrB/a4aM4x6i+Eg
+ YlOoTXYO0bLGOCdeXOLJfjDEkck1ELrHj2LtlRHyrlB9cfOgf17T6ndeeHGFfXNQHPZ9
+ 6ozlhvhckpJQgI9lmwx9y62sUeq7EvLbrq6iRQm/urmU7ONjSXtvH9MhuU6vUBxvHZ7m
+ L7/Q==
+X-Gm-Message-State: AOJu0Yx8eFwSIp03QtdxQpmlUlQqKK5PYRJxvpOd/sAQ1a6DUl745e7C
+ /BMIbVYdWvfmdTlOA4Fq7wwu2tV7IwY=
+X-Google-Smtp-Source: AGHT+IHxbooDFrEU9aYJYA4rfQo2Hg5vBRYXtzpX5blf0iOYdzDMzsRxuyqHl6Jlfcy9/43ovuJMnQ==
+X-Received: by 2002:a5d:4402:0:b0:32d:8907:2b18 with SMTP id z2-20020a5d4402000000b0032d89072b18mr12076090wrq.66.1697451439584;
+ Mon, 16 Oct 2023 03:17:19 -0700 (PDT)
+Received: from [192.168.1.23] (ip-046-223-203-173.um13.pools.vodafone-ip.de. [46.223.203.173])
+ by smtp.gmail.com with ESMTPSA id e10-20020a5d65ca000000b0032da6f17ffdsm4983379wrw.38.2023.10.16.03.17.18
+ (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
+ Mon, 16 Oct 2023 03:17:19 -0700 (PDT)
+Message-ID: <0867077f-12ac-4a89-8745-440cc782fe5b@gmail.com>
+Date: Mon, 16 Oct 2023 12:17:07 +0200
+MIME-Version: 1.0
+User-Agent: Mozilla Thunderbird
+Cc: rdapp.gcc@gmail.com, jeffreyalaw <jeffreyalaw@gmail.com>,
+ "rjiejie@linux.alibaba.com" <rjiejie@linux.alibaba.com>
+Subject: Re: [PATCH] genemit: Split insn-emit.cc into ten files.
+Content-Language: en-US
+To: Tamar Christina <Tamar.Christina@arm.com>,
+ gcc-patches <gcc-patches@gcc.gnu.org>
+References: <de0f7bdc-d236-4f5b-9504-d5bfb215d023@gmail.com>
+ <be6174c7-820c-45b2-abb6-177c0701e3f5@gmail.com>
+ <VI1PR08MB53258DF11D842AD7BBDA7434FFD2A@VI1PR08MB5325.eurprd08.prod.outlook.com>
+ <37f1c7f7-411e-46de-8d68-a1e21ff440ae@gmail.com>
+From: Robin Dapp <rdapp.gcc@gmail.com>
+In-Reply-To: <37f1c7f7-411e-46de-8d68-a1e21ff440ae@gmail.com>
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 7bit
+X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6
+X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org
+List-Id: <gcc-patches.gcc.gnu.org>
+
+Hi,
+
+the attached v2 includes Tamar's suggestion of keeping the current
+stdout behavior. When no output files are passed (via -O) the output
+is written to stdout as before.
+
+Tamar also mentioned off-list that, similar to match.pd, it might make
+sense to balance the partitions in a better way than a fixed number
+of patterns threshold. That's a good idea but I'd rather do that
+separately as the current approach already helps considerably.
+
+Attached v2 was bootstrapped and regtested on power10, aarch64 and
+x86 are still running.
+Stefan also tested v1 on s390 where the partitioning does not help
+but also doesn't slow anything down. insn-emit.cc isn't very large
+to begin with on s390.
+
+Regards
+ Robin
+
+>From 34d05113a4e3c7e83a4731020307e26c1144af69 Mon Sep 17 00:00:00 2001
+From: Robin Dapp <rdapp@ventanamicro.com>
+Date: Thu, 12 Oct 2023 11:23:26 +0200
+Subject: [PATCH v2] genemit: Split insn-emit.cc into several partitions.
+
+On riscv insn-emit.cc has grown to over 1.2 mio lines of code and
+compiling it takes considerable time.
+Therefore, this patch adjust genemit to create several partitions
+(insn-emit-1.cc to insn-emit-n.cc). In order to do so it first counts
+the number of available patterns, calculates the number of patterns per
+file and starts a new file whenever that number is reached.
+
+Similar to match.pd a configure option --with-emitinsn-partitions=num
+is introduced that makes the number of partition configurable.
+
+gcc/ChangeLog:
+
+ PR bootstrap/84402
+ PR target/111600
+
+ * Makefile.in: Handle split insn-emit.cc.
+ * configure: Regenerate.
+ * configure.ac: Add --with-insnemit-partitions.
+ * genemit.cc (output_peephole2_scratches): Print to file instead
+ of stdout.
+ (print_code): Ditto.
+ (gen_rtx_scratch): Ditto.
+ (gen_exp): Ditto.
+ (gen_emit_seq): Ditto.
+ (emit_c_code): Ditto.
+ (gen_insn): Ditto.
+ (gen_expand): Ditto.
+ (gen_split): Ditto.
+ (output_add_clobbers): Ditto.
+ (output_added_clobbers_hard_reg_p): Ditto.
+ (print_overload_arguments): Ditto.
+ (print_overload_test): Ditto.
+ (handle_overloaded_code_for): Ditto.
+ (handle_overloaded_gen): Ditto.
+ (print_header): New function.
+ (handle_arg): New function.
+ (main): Split output into 10 files.
+ * gensupport.cc (count_patterns): New function.
+ * gensupport.h (count_patterns): Define.
+ * read-md.cc (md_reader::print_md_ptr_loc): Add file argument.
+ * read-md.h (class md_reader): Change definition.
+---
+ gcc/Makefile.in | 38 +++-
+ gcc/configure | 24 ++-
+ gcc/configure.ac | 13 ++
+ gcc/genemit.cc | 536 +++++++++++++++++++++++++---------------------
+ gcc/gensupport.cc | 36 ++++
+ gcc/gensupport.h | 1 +
+ gcc/read-md.cc | 4 +-
+ gcc/read-md.h | 2 +-
+ 8 files changed, 399 insertions(+), 255 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 9cc16268abf..ca0a616f768 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -236,6 +236,13 @@ GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ))
+ GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ))
+ GENERIC_MATCH_PD_SEQ_O = $(patsubst %, generic-match-%.o, $(MATCH_SPLITS_SEQ))
+
++# The number of splits to be made for the insn-emit files.
++NUM_INSNEMIT_SPLITS = @DEFAULT_INSNEMIT_PARTITIONS@
++INSNEMIT_SPLITS_SEQ = $(wordlist 1,$(NUM_INSNEMIT_SPLITS),$(one_to_9999))
++INSNEMIT_SEQ_SRC = $(patsubst %, insn-emit-%.cc, $(INSNEMIT_SPLITS_SEQ))
++INSNEMIT_SEQ_TMP = $(patsubst %, tmp-emit-%.cc, $(INSNEMIT_SPLITS_SEQ))
++INSNEMIT_SEQ_O = $(patsubst %, insn-emit-%.o, $(INSNEMIT_SPLITS_SEQ))
++
+ # These files are to have specific diagnostics suppressed, or are not to
+ # be subject to -Werror:
+ # flex output may yield harmless "no previous prototype" warnings
+@@ -1354,7 +1361,7 @@ OBJS = \
+ insn-attrtab.o \
+ insn-automata.o \
+ insn-dfatab.o \
+- insn-emit.o \
++ $(INSNEMIT_SEQ_O) \
+ insn-extract.o \
+ insn-latencytab.o \
+ insn-modes.o \
+@@ -1852,7 +1859,8 @@ TREECHECKING = @TREECHECKING@
+ FULL_DRIVER_NAME=$(target_noncanonical)-gcc-$(version)$(exeext)
+
+ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \
+- insn-output.cc insn-recog.cc insn-emit.cc insn-extract.cc insn-peep.cc \
++ insn-output.cc insn-recog.cc $(INSNEMIT_SEQ_SRC) \
++ insn-extract.cc insn-peep.cc \
+ insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
+ insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \
+ tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \
+@@ -2481,11 +2489,11 @@ $(common_out_object_file): $(common_out_file)
+ # and compile them.
+
+ .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-emit.cc insn-recog.cc insn-extract.cc insn-output.cc insn-peep.cc \
+- insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \
+- insn-latencytab.cc insn-preds.cc $(GIMPLE_MATCH_PD_SEQ_SRC) \
+- $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \
+- insn-target-def.h
++ $(INSNEMIT_SEQ_SRC) insn-recog.cc insn-extract.cc insn-output.cc \
++ insn-peep.cc insn-attr.h insn-attr-common.h insn-attrtab.cc \
++ insn-dfatab.cc insn-latencytab.cc insn-preds.cc \
++ $(GIMPLE_MATCH_PD_SEQ_SRC) $(GENERIC_MATCH_PD_SEQ_SRC) \
++ gimple-match-auto.h generic-match-auto.h insn-target-def.h
+
+ # Dependencies for the md file. The first time through, we just assume
+ # the md file itself and the generated dependency file (in order to get
+@@ -2508,7 +2516,7 @@ s-mddeps: $(md_file) $(MD_INCLUDES) build/genmddeps$(build_exeext)
+ simple_rtl_generated_h = insn-attr.h insn-attr-common.h insn-codes.h \
+ insn-config.h insn-flags.h insn-target-def.h
+
+-simple_rtl_generated_c = insn-automata.cc insn-emit.cc \
++simple_rtl_generated_c = insn-automata.cc \
+ insn-extract.cc insn-output.cc \
+ insn-peep.cc insn-recog.cc
+
+@@ -2537,8 +2545,22 @@ $(simple_generated_c:insn-%.cc=s-%): s-%: build/gen%$(build_exeext)
+ $(SHELL) $(srcdir)/../move-if-change tmp-$*.cc insn-$*.cc
+ $(STAMP) s-$*
+
++# genemit splits its output into different files and doesn't write to
++# stdout. (but rather to tmp-emit-01.cc..tmp-emit-10.cc)
++s-tmp-emit: build/genemit$(build_exeext) insn-conditions.md
++ $(RUN_GEN) build/genemit$(build_exeext) $(md_file) insn-conditions.md \
++ $(addprefix -O,${INSNEMIT_SEQ_TMP})
++ $(STAMP) s-tmp-emit
++
++$(INSNEMIT_SEQ_SRC): insn-emit-%.cc: s-insn-emit-%; @true
++$(INSNEMIT_SEQ_SRC:insn-emit-%.cc=s-insn-emit-%): s-insn-emit-%: s-tmp-emit
++ $(SHELL) $(srcdir)/../move-if-change tmp-emit-$*.cc insn-emit-$*.cc
++ $(STAMP) s-insn-emit-$*
++
+ # gencheck doesn't read the machine description, and the file produced
+ # doesn't use the insn-* convention.
++
++# --> s-check has prerequisite tree-check.h (though nothing to do)
+ tree-check.h: s-check ; @true
+ s-check : build/gencheck$(build_exeext)
+ $(RUN_GEN) build/gencheck$(build_exeext) > tmp-check.h
+diff --git a/gcc/configure b/gcc/configure
+index c43bde8174b..00672b18f72 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -842,6 +842,7 @@ enable_gcov
+ enable_shared
+ enable_fixed_point
+ enable_decimal_float
++DEFAULT_INSNEMIT_PARTITIONS
+ DEFAULT_MATCHPD_PARTITIONS
+ with_float
+ with_cpu
+@@ -971,6 +972,7 @@ enable_multilib
+ enable_multiarch
+ with_stack_clash_protection_guard_size
+ with_matchpd_partitions
++with_insnemit_partitions
+ enable___cxa_atexit
+ enable_decimal_float
+ enable_fixed_point
+@@ -1839,6 +1841,9 @@ Optional Packages:
+ --with-matchpd-partitions=num
+ Set the number of partitions to make for gimple and
+ generic when splitting match.pd. [default=10]
++ --with-insnemit-partitions=num
++ Set the number of partitions of insn-emit.cc for
++ genemit to create. [default=10]
+ --with-dwarf2 force the default debug format to be DWARF 2 (or
+ later)
+ --with-specs=SPECS add SPECS to driver command-line processing
+@@ -7938,6 +7943,21 @@ fi
+
+
+
++# Specify the number of splits of insn-emit.cc to generate.
++
++# Check whether --with-insnemit-partitions was given.
++if test "${with_insnemit_partitions+set}" = set; then :
++ withval=$with_insnemit_partitions; DEFAULT_INSNEMIT_PARTITIONS="$with_insnemit_partitions"
++else
++ DEFAULT_INSNEMIT_PARTITIONS=10
++fi
++
++if (test $DEFAULT_INSNEMIT_PARTITIONS -lt 1); then
++ as_fn_error $? "Invalid value $DEFAULT_INSNEMIT_PARTITIONS for --with-insnemit-partitions. Cannot be negative." "$LINENO" 5
++fi
++
++
++
+ # Enable __cxa_atexit for C++.
+ # Check whether --enable-__cxa_atexit was given.
+ if test "${enable___cxa_atexit+set}" = set; then :
+@@ -19923,7 +19943,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 19926 "configure"
++#line 19946 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -20029,7 +20049,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 20032 "configure"
++#line 20052 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index fb8e32f8ee5..bc0ef734e6c 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -956,6 +956,19 @@ fi
+
+ AC_SUBST(DEFAULT_MATCHPD_PARTITIONS)
+
++# Specify the number of splits of insn-emit.cc to generate.
++AC_ARG_WITH(insnemit-partitions,
++[AS_HELP_STRING([--with-insnemit-partitions=num],
++[Set the number of partitions of insn-emit.cc for genemit to create. [default=10]])],
++[DEFAULT_INSNEMIT_PARTITIONS="$with_insnemit_partitions"], [DEFAULT_INSNEMIT_PARTITIONS=10])
++if (test $DEFAULT_INSNEMIT_PARTITIONS -lt 1); then
++ AC_MSG_ERROR(m4_normalize([
++ Invalid value $DEFAULT_INSNEMIT_PARTITIONS for --with-insnemit-partitions. \
++ Cannot be negative.]))
++fi
++
++AC_SUBST(DEFAULT_INSNEMIT_PARTITIONS)
++
+ # Enable __cxa_atexit for C++.
+ AC_ARG_ENABLE(__cxa_atexit,
+ [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])],
+diff --git a/gcc/genemit.cc b/gcc/genemit.cc
+index 1ce0564076d..8d8a3c4aa80 100644
+--- a/gcc/genemit.cc
++++ b/gcc/genemit.cc
+@@ -49,29 +49,29 @@ struct clobber_ent
+ struct clobber_ent *next;
+ };
+
+-static void output_peephole2_scratches (rtx);
++static void output_peephole2_scratches (rtx, FILE*);
+
+ /* True for <X>_optab if that optab isn't allowed to fail. */
+ static bool nofail_optabs[NUM_OPTABS];
+ \f
+ static void
+-print_code (RTX_CODE code)
++print_code (RTX_CODE code, FILE *file)
+ {
+ const char *p1;
+ for (p1 = GET_RTX_NAME (code); *p1; p1++)
+- putchar (TOUPPER (*p1));
++ fprintf (file, "%c", TOUPPER (*p1));
+ }
+
+ static void
+-gen_rtx_scratch (rtx x, enum rtx_code subroutine_type)
++gen_rtx_scratch (rtx x, enum rtx_code subroutine_type, FILE *file)
+ {
+ if (subroutine_type == DEFINE_PEEPHOLE2)
+ {
+- printf ("operand%d", XINT (x, 0));
++ fprintf (file, "operand%d", XINT (x, 0));
+ }
+ else
+ {
+- printf ("gen_rtx_SCRATCH (%smode)", GET_MODE_NAME (GET_MODE (x)));
++ fprintf (file, "gen_rtx_SCRATCH (%smode)", GET_MODE_NAME (GET_MODE (x)));
+ }
+ }
+
+@@ -79,7 +79,8 @@ gen_rtx_scratch (rtx x, enum rtx_code subroutine_type)
+ substituting any operand references appearing within. */
+
+ static void
+-gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
++gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info,
++ FILE *file)
+ {
+ RTX_CODE code;
+ int i;
+@@ -89,7 +90,7 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+
+ if (x == 0)
+ {
+- printf ("NULL_RTX");
++ fprintf (file, "NULL_RTX");
+ return;
+ }
+
+@@ -103,67 +104,67 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+ {
+ if (used[XINT (x, 0)])
+ {
+- printf ("copy_rtx (operand%d)", XINT (x, 0));
++ fprintf (file, "copy_rtx (operand%d)", XINT (x, 0));
+ return;
+ }
+ used[XINT (x, 0)] = 1;
+ }
+- printf ("operand%d", XINT (x, 0));
++ fprintf (file, "operand%d", XINT (x, 0));
+ return;
+
+ case MATCH_OP_DUP:
+- printf ("gen_rtx_fmt_");
++ fprintf (file, "gen_rtx_fmt_");
+ for (i = 0; i < XVECLEN (x, 1); i++)
+- printf ("e");
+- printf (" (GET_CODE (operand%d), ", XINT (x, 0));
++ fprintf (file, "e");
++ fprintf (file, " (GET_CODE (operand%d), ", XINT (x, 0));
+ if (GET_MODE (x) == VOIDmode)
+- printf ("GET_MODE (operand%d)", XINT (x, 0));
++ fprintf (file, "GET_MODE (operand%d)", XINT (x, 0));
+ else
+- printf ("%smode", GET_MODE_NAME (GET_MODE (x)));
++ fprintf (file, "%smode", GET_MODE_NAME (GET_MODE (x)));
+ for (i = 0; i < XVECLEN (x, 1); i++)
+ {
+- printf (",\n\t\t");
+- gen_exp (XVECEXP (x, 1, i), subroutine_type, used, info);
++ fprintf (file, ",\n\t\t");
++ gen_exp (XVECEXP (x, 1, i), subroutine_type, used, info, file);
+ }
+- printf (")");
++ fprintf (file, ")");
+ return;
+
+ case MATCH_OPERATOR:
+- printf ("gen_rtx_fmt_");
++ fprintf (file, "gen_rtx_fmt_");
+ for (i = 0; i < XVECLEN (x, 2); i++)
+- printf ("e");
+- printf (" (GET_CODE (operand%d)", XINT (x, 0));
+- printf (", %smode", GET_MODE_NAME (GET_MODE (x)));
++ fprintf (file, "e");
++ fprintf (file, " (GET_CODE (operand%d)", XINT (x, 0));
++ fprintf (file, ", %smode", GET_MODE_NAME (GET_MODE (x)));
+ for (i = 0; i < XVECLEN (x, 2); i++)
+ {
+- printf (",\n\t\t");
+- gen_exp (XVECEXP (x, 2, i), subroutine_type, used, info);
++ fprintf (file, ",\n\t\t");
++ gen_exp (XVECEXP (x, 2, i), subroutine_type, used, info, file);
+ }
+- printf (")");
++ fprintf (file, ")");
+ return;
+
+ case MATCH_PARALLEL:
+ case MATCH_PAR_DUP:
+- printf ("operand%d", XINT (x, 0));
++ fprintf (file, "operand%d", XINT (x, 0));
+ return;
+
+ case MATCH_SCRATCH:
+- gen_rtx_scratch (x, subroutine_type);
++ gen_rtx_scratch (x, subroutine_type, file);
+ return;
+
+ case PC:
+- printf ("pc_rtx");
++ fprintf (file, "pc_rtx");
+ return;
+ case RETURN:
+- printf ("ret_rtx");
++ fprintf (file, "ret_rtx");
+ return;
+ case SIMPLE_RETURN:
+- printf ("simple_return_rtx");
++ fprintf (file, "simple_return_rtx");
+ return;
+ case CLOBBER:
+ if (REG_P (XEXP (x, 0)))
+ {
+- printf ("gen_hard_reg_clobber (%smode, %i)",
++ fprintf (file, "gen_hard_reg_clobber (%smode, %i)",
+ GET_MODE_NAME (GET_MODE (XEXP (x, 0))),
+ REGNO (XEXP (x, 0)));
+ return;
+@@ -172,22 +173,22 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+
+ case CONST_INT:
+ if (INTVAL (x) == 0)
+- printf ("const0_rtx");
++ fprintf (file, "const0_rtx");
+ else if (INTVAL (x) == 1)
+- printf ("const1_rtx");
++ fprintf (file, "const1_rtx");
+ else if (INTVAL (x) == -1)
+- printf ("constm1_rtx");
++ fprintf (file, "constm1_rtx");
+ else if (-MAX_SAVED_CONST_INT <= INTVAL (x)
+ && INTVAL (x) <= MAX_SAVED_CONST_INT)
+- printf ("const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
++ fprintf (file, "const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
+ (int) INTVAL (x));
+ else if (INTVAL (x) == STORE_FLAG_VALUE)
+- printf ("const_true_rtx");
++ fprintf (file, "const_true_rtx");
+ else
+ {
+- printf ("GEN_INT (");
+- printf (HOST_WIDE_INT_PRINT_DEC_C, INTVAL (x));
+- printf (")");
++ fprintf (file, "GEN_INT (");
++ fprintf (file, HOST_WIDE_INT_PRINT_DEC_C, INTVAL (x));
++ fprintf (file, ")");
+ }
+ return;
+
+@@ -195,7 +196,7 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+ /* Handle `const_double_zero' rtx. */
+ if (CONST_DOUBLE_REAL_VALUE (x)->cl == rvc_zero)
+ {
+- printf ("CONST_DOUBLE_ATOF (\"0\", %smode)",
++ fprintf (file, "CONST_DOUBLE_ATOF (\"0\", %smode)",
+ GET_MODE_NAME (GET_MODE (x)));
+ return;
+ }
+@@ -210,12 +211,12 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+ break;
+ }
+
+- printf ("gen_rtx_");
+- print_code (code);
+- printf (" (");
++ fprintf (file, "gen_rtx_");
++ print_code (code, file);
++ fprintf (file, " (");
+ if (!always_void_p (code))
+ {
+- printf ("%smode", GET_MODE_NAME (GET_MODE (x)));
++ fprintf (file, "%smode", GET_MODE_NAME (GET_MODE (x)));
+ sep = ",\n\t";
+ }
+
+@@ -225,41 +226,41 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+ {
+ if (fmt[i] == '0')
+ break;
+- fputs (sep, stdout);
++ fputs (sep, file);
+ switch (fmt[i])
+ {
+ case 'e': case 'u':
+- gen_exp (XEXP (x, i), subroutine_type, used, info);
++ gen_exp (XEXP (x, i), subroutine_type, used, info, file);
+ break;
+
+ case 'i':
+- printf ("%u", XINT (x, i));
++ fprintf (file, "%u", XINT (x, i));
+ break;
+
+ case 'r':
+- printf ("%u", REGNO (x));
++ fprintf (file, "%u", REGNO (x));
+ break;
+
+ case 'p':
+ /* We don't have a way of parsing polynomial offsets yet,
+ and hopefully never will. */
+- printf ("%d", SUBREG_BYTE (x).to_constant ());
++ fprintf (file, "%d", SUBREG_BYTE (x).to_constant ());
+ break;
+
+ case 's':
+- printf ("\"%s\"", XSTR (x, i));
++ fprintf (file, "\"%s\"", XSTR (x, i));
+ break;
+
+ case 'E':
+ {
+ int j;
+- printf ("gen_rtvec (%d", XVECLEN (x, i));
++ fprintf (file, "gen_rtvec (%d", XVECLEN (x, i));
+ for (j = 0; j < XVECLEN (x, i); j++)
+ {
+- printf (",\n\t\t");
+- gen_exp (XVECEXP (x, i, j), subroutine_type, used, info);
++ fprintf (file, ",\n\t\t");
++ gen_exp (XVECEXP (x, i, j), subroutine_type, used, info, file);
+ }
+- printf (")");
++ fprintf (file, ")");
+ break;
+ }
+
+@@ -268,14 +269,14 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
+ }
+ sep = ",\n\t";
+ }
+- printf (")");
++ fprintf (file, ")");
+ }
+
+ /* Output code to emit the instruction patterns in VEC, with each element
+ becoming a separate instruction. USED is as for gen_exp. */
+
+ static void
+-gen_emit_seq (rtvec vec, char *used, md_rtx_info *info)
++gen_emit_seq (rtvec vec, char *used, md_rtx_info *info, FILE *file)
+ {
+ for (int i = 0, len = GET_NUM_ELEM (vec); i < len; ++i)
+ {
+@@ -283,17 +284,17 @@ gen_emit_seq (rtvec vec, char *used, md_rtx_info *info)
+ rtx next = RTVEC_ELT (vec, i);
+ if (const char *name = get_emit_function (next))
+ {
+- printf (" %s (", name);
+- gen_exp (next, DEFINE_EXPAND, used, info);
+- printf (");\n");
++ fprintf (file, " %s (", name);
++ gen_exp (next, DEFINE_EXPAND, used, info, file);
++ fprintf (file, ");\n");
+ if (!last_p && needs_barrier_p (next))
+- printf (" emit_barrier ();");
++ fprintf (file, " emit_barrier ();");
+ }
+ else
+ {
+- printf (" emit (");
+- gen_exp (next, DEFINE_EXPAND, used, info);
+- printf (", %s);\n", last_p ? "false" : "true");
++ fprintf (file, " emit (");
++ gen_exp (next, DEFINE_EXPAND, used, info, file);
++ fprintf (file, ", %s);\n", last_p ? "false" : "true");
+ }
+ }
+ }
+@@ -303,27 +304,27 @@ gen_emit_seq (rtvec vec, char *used, md_rtx_info *info)
+ for use in error messages. */
+
+ static void
+-emit_c_code (const char *code, bool can_fail_p, const char *name)
++emit_c_code (const char *code, bool can_fail_p, const char *name, FILE *file)
+ {
+ if (can_fail_p)
+- printf ("#define FAIL return (end_sequence (), _val)\n");
++ fprintf (file, "#define FAIL return (end_sequence (), _val)\n");
+ else
+- printf ("#define FAIL _Pragma (\"GCC error \\\"%s cannot FAIL\\\"\")"
++ fprintf (file, "#define FAIL _Pragma (\"GCC error \\\"%s cannot FAIL\\\"\")"
+ " (void)0\n", name);
+- printf ("#define DONE return (_val = get_insns (), "
++ fprintf (file, "#define DONE return (_val = get_insns (), "
+ "end_sequence (), _val)\n");
+
+- rtx_reader_ptr->print_md_ptr_loc (code);
+- printf ("%s\n", code);
++ rtx_reader_ptr->print_md_ptr_loc (code, file);
++ fprintf (file, "%s\n", code);
+
+- printf ("#undef DONE\n");
+- printf ("#undef FAIL\n");
++ fprintf (file, "#undef DONE\n");
++ fprintf (file, "#undef FAIL\n");
+ }
+ \f
+ /* Generate the `gen_...' function for a DEFINE_INSN. */
+
+ static void
+-gen_insn (md_rtx_info *info)
++gen_insn (md_rtx_info *info, FILE *file)
+ {
+ struct pattern_stats stats;
+ int i;
+@@ -409,7 +410,7 @@ gen_insn (md_rtx_info *info)
+ if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*')
+ return;
+
+- printf ("/* %s:%d */\n", info->loc.filename, info->loc.lineno);
++ fprintf (file, "/* %s:%d */\n", info->loc.filename, info->loc.lineno);
+
+ /* Find out how many operands this function has. */
+ get_pattern_stats (&stats, XVEC (insn, 1));
+@@ -417,17 +418,17 @@ gen_insn (md_rtx_info *info)
+ fatal_at (info->loc, "match_dup operand number has no match_operand");
+
+ /* Output the function name and argument declarations. */
+- printf ("rtx\ngen_%s (", XSTR (insn, 0));
++ fprintf (file, "rtx\ngen_%s (", XSTR (insn, 0));
+ if (stats.num_generator_args)
+ for (i = 0; i < stats.num_generator_args; i++)
+ if (i)
+- printf (",\n\trtx operand%d ATTRIBUTE_UNUSED", i);
++ fprintf (file, ",\n\trtx operand%d ATTRIBUTE_UNUSED", i);
+ else
+- printf ("rtx operand%d ATTRIBUTE_UNUSED", i);
++ fprintf (file, "rtx operand%d ATTRIBUTE_UNUSED", i);
+ else
+- printf ("void");
+- printf (")\n");
+- printf ("{\n");
++ fprintf (file, "void");
++ fprintf (file, ")\n");
++ fprintf (file, "{\n");
+
+ /* Output code to construct and return the rtl for the instruction body. */
+
+@@ -436,16 +437,16 @@ gen_insn (md_rtx_info *info)
+ char *used = (XVECLEN (insn, 1) == 1
+ ? NULL
+ : XCNEWVEC (char, stats.num_generator_args));
+- printf (" return ");
+- gen_exp (pattern, DEFINE_INSN, used, info);
+- printf (";\n}\n\n");
++ fprintf (file, " return ");
++ gen_exp (pattern, DEFINE_INSN, used, info, file);
++ fprintf (file, ";\n}\n\n");
+ XDELETEVEC (used);
+ }
+ \f
+ /* Generate the `gen_...' function for a DEFINE_EXPAND. */
+
+ static void
+-gen_expand (md_rtx_info *info)
++gen_expand (md_rtx_info *info, FILE *file)
+ {
+ struct pattern_stats stats;
+ int i;
+@@ -466,17 +467,17 @@ gen_expand (md_rtx_info *info)
+ "numbers above all other operands", XSTR (expand, 0));
+
+ /* Output the function name and argument declarations. */
+- printf ("rtx\ngen_%s (", XSTR (expand, 0));
++ fprintf (file, "rtx\ngen_%s (", XSTR (expand, 0));
+ if (stats.num_generator_args)
+ for (i = 0; i < stats.num_generator_args; i++)
+ if (i)
+- printf (",\n\trtx operand%d", i);
++ fprintf (file, ",\n\trtx operand%d", i);
+ else
+- printf ("rtx operand%d", i);
++ fprintf (file, "rtx operand%d", i);
+ else
+- printf ("void");
+- printf (")\n");
+- printf ("{\n");
++ fprintf (file, "void");
++ fprintf (file, ")\n");
++ fprintf (file, "{\n");
+
+ /* If we don't have any C code to write, only one insn is being written,
+ and no MATCH_DUPs are present, we can just return the desired insn
+@@ -485,18 +486,18 @@ gen_expand (md_rtx_info *info)
+ && stats.max_opno >= stats.max_dup_opno
+ && XVECLEN (expand, 1) == 1)
+ {
+- printf (" return ");
+- gen_exp (XVECEXP (expand, 1, 0), DEFINE_EXPAND, NULL, info);
+- printf (";\n}\n\n");
++ fprintf (file, " return ");
++ gen_exp (XVECEXP (expand, 1, 0), DEFINE_EXPAND, NULL, info, file);
++ fprintf (file, ";\n}\n\n");
+ return;
+ }
+
+ /* For each operand referred to only with MATCH_DUPs,
+ make a local variable. */
+ for (i = stats.num_generator_args; i <= stats.max_dup_opno; i++)
+- printf (" rtx operand%d;\n", i);
+- printf (" rtx_insn *_val = 0;\n");
+- printf (" start_sequence ();\n");
++ fprintf (file, " rtx operand%d;\n", i);
++ fprintf (file, " rtx_insn *_val = 0;\n");
++ fprintf (file, " start_sequence ();\n");
+
+ /* The fourth operand of DEFINE_EXPAND is some code to be executed
+ before the actual construction.
+@@ -506,13 +507,13 @@ gen_expand (md_rtx_info *info)
+ So copy the operand values there before executing it. */
+ if (XSTR (expand, 3) && *XSTR (expand, 3))
+ {
+- printf (" {\n");
++ fprintf (file, " {\n");
+ if (stats.num_operand_vars > 0)
+- printf (" rtx operands[%d];\n", stats.num_operand_vars);
++ fprintf (file, " rtx operands[%d];\n", stats.num_operand_vars);
+
+ /* Output code to copy the arguments into `operands'. */
+ for (i = 0; i < stats.num_generator_args; i++)
+- printf (" operands[%d] = operand%d;\n", i, i);
++ fprintf (file, " operands[%d] = operand%d;\n", i, i);
+
+ /* Output the special code to be executed before the sequence
+ is generated. */
+@@ -524,7 +525,7 @@ gen_expand (md_rtx_info *info)
+ if (nofail_optabs[p.op])
+ can_fail_p = false;
+ }
+- emit_c_code (XSTR (expand, 3), can_fail_p, XSTR (expand, 0));
++ emit_c_code (XSTR (expand, 3), can_fail_p, XSTR (expand, 0), file);
+
+ /* Output code to copy the arguments back out of `operands'
+ (unless we aren't going to use them at all). */
+@@ -532,29 +533,29 @@ gen_expand (md_rtx_info *info)
+ {
+ for (i = 0; i <= MAX (stats.max_opno, stats.max_dup_opno); i++)
+ {
+- printf (" operand%d = operands[%d];\n", i, i);
+- printf (" (void) operand%d;\n", i);
++ fprintf (file, " operand%d = operands[%d];\n", i, i);
++ fprintf (file, " (void) operand%d;\n", i);
+ }
+ }
+- printf (" }\n");
++ fprintf (file, " }\n");
+ }
+
+ used = XCNEWVEC (char, stats.num_operand_vars);
+- gen_emit_seq (XVEC (expand, 1), used, info);
++ gen_emit_seq (XVEC (expand, 1), used, info, file);
+ XDELETEVEC (used);
+
+ /* Call `get_insns' to extract the list of all the
+ insns emitted within this gen_... function. */
+
+- printf (" _val = get_insns ();\n");
+- printf (" end_sequence ();\n");
+- printf (" return _val;\n}\n\n");
++ fprintf (file, " _val = get_insns ();\n");
++ fprintf (file, " end_sequence ();\n");
++ fprintf (file, " return _val;\n}\n\n");
+ }
+
+ /* Like gen_expand, but generates insns resulting from splitting SPLIT. */
+
+ static void
+-gen_split (md_rtx_info *info)
++gen_split (md_rtx_info *info, FILE *file)
+ {
+ struct pattern_stats stats;
+ int i;
+@@ -580,62 +581,62 @@ gen_split (md_rtx_info *info)
+ /* Output the prototype, function name and argument declarations. */
+ if (GET_CODE (split) == DEFINE_PEEPHOLE2)
+ {
+- printf ("extern rtx_insn *gen_%s_%d (rtx_insn *, rtx *);\n",
++ fprintf (file, "extern rtx_insn *gen_%s_%d (rtx_insn *, rtx *);\n",
+ name, info->index);
+- printf ("rtx_insn *\ngen_%s_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED,"
++ fprintf (file, "rtx_insn *\ngen_%s_%d (rtx_insn *curr_insn ATTRIBUTE_UNUSED,"
+ " rtx *operands%s)\n",
+ name, info->index, unused);
+ }
+ else
+ {
+- printf ("extern rtx_insn *gen_split_%d (rtx_insn *, rtx *);\n",
++ fprintf (file, "extern rtx_insn *gen_split_%d (rtx_insn *, rtx *);\n",
+ info->index);
+- printf ("rtx_insn *\ngen_split_%d "
++ fprintf (file, "rtx_insn *\ngen_split_%d "
+ "(rtx_insn *curr_insn ATTRIBUTE_UNUSED, rtx *operands%s)\n",
+ info->index, unused);
+ }
+- printf ("{\n");
++ fprintf (file, "{\n");
+
+ /* Declare all local variables. */
+ for (i = 0; i < stats.num_operand_vars; i++)
+- printf (" rtx operand%d;\n", i);
+- printf (" rtx_insn *_val = NULL;\n");
++ fprintf (file, " rtx operand%d;\n", i);
++ fprintf (file, " rtx_insn *_val = NULL;\n");
+
+ if (GET_CODE (split) == DEFINE_PEEPHOLE2)
+- output_peephole2_scratches (split);
++ output_peephole2_scratches (split, file);
+
+ const char *fn = info->loc.filename;
+ for (const char *p = fn; *p; p++)
+ if (*p == '/')
+ fn = p + 1;
+
+- printf (" if (dump_file)\n");
+- printf (" fprintf (dump_file, \"Splitting with gen_%s_%d (%s:%d)\\n\");\n",
++ fprintf (file, " if (dump_file)\n");
++ fprintf (file, " fprintf (dump_file, \"Splitting with gen_%s_%d (%s:%d)\\n\");\n",
+ name, info->index, fn, info->loc.lineno);
+
+- printf (" start_sequence ();\n");
++ fprintf (file, " start_sequence ();\n");
+
+ /* The fourth operand of DEFINE_SPLIT is some code to be executed
+ before the actual construction. */
+
+ if (XSTR (split, 3))
+- emit_c_code (XSTR (split, 3), true, name);
++ emit_c_code (XSTR (split, 3), true, name, file);
+
+ /* Output code to copy the arguments back out of `operands' */
+ for (i = 0; i < stats.num_operand_vars; i++)
+ {
+- printf (" operand%d = operands[%d];\n", i, i);
+- printf (" (void) operand%d;\n", i);
++ fprintf (file, " operand%d = operands[%d];\n", i, i);
++ fprintf (file, " (void) operand%d;\n", i);
+ }
+
+- gen_emit_seq (XVEC (split, 2), used, info);
++ gen_emit_seq (XVEC (split, 2), used, info, file);
+
+ /* Call `get_insns' to make a list of all the
+ insns emitted within this gen_... function. */
+
+- printf (" _val = get_insns ();\n");
+- printf (" end_sequence ();\n");
+- printf (" return _val;\n}\n\n");
++ fprintf (file, " _val = get_insns ();\n");
++ fprintf (file, " end_sequence ();\n");
++ fprintf (file, " return _val;\n}\n\n");
+
+ free (used);
+ }
+@@ -645,37 +646,37 @@ gen_split (md_rtx_info *info)
+ the end of the vector. */
+
+ static void
+-output_add_clobbers (md_rtx_info *info)
++output_add_clobbers (md_rtx_info *info, FILE *file)
+ {
+ struct clobber_pat *clobber;
+ struct clobber_ent *ent;
+ int i;
+
+- printf ("\n\nvoid\nadd_clobbers (rtx pattern ATTRIBUTE_UNUSED, int insn_code_number)\n");
+- printf ("{\n");
+- printf (" switch (insn_code_number)\n");
+- printf (" {\n");
++ fprintf (file, "\n\nvoid\nadd_clobbers (rtx pattern ATTRIBUTE_UNUSED, int insn_code_number)\n");
++ fprintf (file, "{\n");
++ fprintf (file, " switch (insn_code_number)\n");
++ fprintf (file, " {\n");
+
+ for (clobber = clobber_list; clobber; clobber = clobber->next)
+ {
+ for (ent = clobber->insns; ent; ent = ent->next)
+- printf (" case %d:\n", ent->code_number);
++ fprintf (file, " case %d:\n", ent->code_number);
+
+ for (i = clobber->first_clobber; i < XVECLEN (clobber->pattern, 1); i++)
+ {
+- printf (" XVECEXP (pattern, 0, %d) = ", i);
++ fprintf (file, " XVECEXP (pattern, 0, %d) = ", i);
+ gen_exp (XVECEXP (clobber->pattern, 1, i),
+- GET_CODE (clobber->pattern), NULL, info);
+- printf (";\n");
++ GET_CODE (clobber->pattern), NULL, info, file);
++ fprintf (file, ";\n");
+ }
+
+- printf (" break;\n\n");
++ fprintf (file, " break;\n\n");
+ }
+
+- printf (" default:\n");
+- printf (" gcc_unreachable ();\n");
+- printf (" }\n");
+- printf ("}\n");
++ fprintf (file, " default:\n");
++ fprintf (file, " gcc_unreachable ();\n");
++ fprintf (file, " }\n");
++ fprintf (file, "}\n");
+ }
+ \f
+ /* Write a function, `added_clobbers_hard_reg_p' that is given an insn_code
+@@ -684,17 +685,17 @@ output_add_clobbers (md_rtx_info *info)
+ SCRATCH. */
+
+ static void
+-output_added_clobbers_hard_reg_p (void)
++output_added_clobbers_hard_reg_p (FILE *file)
+ {
+ struct clobber_pat *clobber;
+ struct clobber_ent *ent;
+ int clobber_p;
+ bool used;
+
+- printf ("\n\nbool\nadded_clobbers_hard_reg_p (int insn_code_number)\n");
+- printf ("{\n");
+- printf (" switch (insn_code_number)\n");
+- printf (" {\n");
++ fprintf (file, "\n\nbool\nadded_clobbers_hard_reg_p (int insn_code_number)\n");
++ fprintf (file, "{\n");
++ fprintf (file, " switch (insn_code_number)\n");
++ fprintf (file, " {\n");
+
+ for (clobber_p = 0; clobber_p <= 1; clobber_p++)
+ {
+@@ -703,25 +704,25 @@ output_added_clobbers_hard_reg_p (void)
+ if (clobber->has_hard_reg == clobber_p)
+ for (ent = clobber->insns; ent; ent = ent->next)
+ {
+- printf (" case %d:\n", ent->code_number);
++ fprintf (file, " case %d:\n", ent->code_number);
+ used = true;
+ }
+
+ if (used)
+- printf (" return %s;\n\n", clobber_p ? "true" : "false");
++ fprintf (file, " return %s;\n\n", clobber_p ? "true" : "false");
+ }
+
+- printf (" default:\n");
+- printf (" gcc_unreachable ();\n");
+- printf (" }\n");
+- printf ("}\n");
++ fprintf (file, " default:\n");
++ fprintf (file, " gcc_unreachable ();\n");
++ fprintf (file, " }\n");
++ fprintf (file, "}\n");
+ }
+ \f
+ /* Generate code to invoke find_free_register () as needed for the
+ scratch registers used by the peephole2 pattern in SPLIT. */
+
+ static void
+-output_peephole2_scratches (rtx split)
++output_peephole2_scratches (rtx split, FILE *file)
+ {
+ int i;
+ int insn_nr = 0;
+@@ -746,12 +747,12 @@ output_peephole2_scratches (rtx split)
+
+ if (first)
+ {
+- printf (" HARD_REG_SET _regs_allocated;\n");
+- printf (" CLEAR_HARD_REG_SET (_regs_allocated);\n");
++ fprintf (file, " HARD_REG_SET _regs_allocated;\n");
++ fprintf (file, " CLEAR_HARD_REG_SET (_regs_allocated);\n");
+ first = false;
+ }
+
+- printf (" if ((operands[%d] = peep2_find_free_register (%d, %d, \"%s\", %smode, &_regs_allocated)) == NULL_RTX)\n\
++ fprintf (file, " if ((operands[%d] = peep2_find_free_register (%d, %d, \"%s\", %smode, &_regs_allocated)) == NULL_RTX)\n\
+ return NULL;\n",
+ XINT (elt, 0),
+ insn_nr, last_insn_nr,
+@@ -767,50 +768,50 @@ output_peephole2_scratches (rtx split)
+ /* Print "arg<N>" parameter declarations for each argument N of ONAME. */
+
+ static void
+-print_overload_arguments (overloaded_name *oname)
++print_overload_arguments (overloaded_name *oname, FILE *file)
+ {
+ for (unsigned int i = 0; i < oname->arg_types.length (); ++i)
+- printf ("%s%s arg%d", i == 0 ? "" : ", ", oname->arg_types[i], i);
++ fprintf (file, "%s%s arg%d", i == 0 ? "" : ", ", oname->arg_types[i], i);
+ }
+
+ /* Print code to test whether INSTANCE should be chosen, given that
+ argument N of the overload is available as "arg<N>". */
+
+ static void
+-print_overload_test (overloaded_instance *instance)
++print_overload_test (overloaded_instance *instance, FILE *file)
+ {
+ for (unsigned int i = 0; i < instance->arg_values.length (); ++i)
+- printf ("%sarg%d == %s", i == 0 ? " if (" : "\n && ",
++ fprintf (file, "%sarg%d == %s", i == 0 ? " if (" : "\n && ",
+ i, instance->arg_values[i]);
+- printf (")\n");
++ fprintf (file, ")\n");
+ }
+
+ /* Emit a maybe_code_for_* function for ONAME. */
+
+ static void
+-handle_overloaded_code_for (overloaded_name *oname)
++handle_overloaded_code_for (overloaded_name *oname, FILE *file)
+ {
+ /* Print the function prototype. */
+- printf ("\ninsn_code\nmaybe_code_for_%s (", oname->name);
+- print_overload_arguments (oname);
+- printf (")\n{\n");
++ fprintf (file, "\ninsn_code\nmaybe_code_for_%s (", oname->name);
++ print_overload_arguments (oname, file);
++ fprintf (file, ")\n{\n");
+
+ /* Use a sequence of "if" statements for each instance. */
+ for (overloaded_instance *instance = oname->first_instance;
+ instance; instance = instance->next)
+ {
+- print_overload_test (instance);
+- printf (" return CODE_FOR_%s;\n", instance->name);
++ print_overload_test (instance, file);
++ fprintf (file, " return CODE_FOR_%s;\n", instance->name);
+ }
+
+ /* Return null if no match was found. */
+- printf (" return CODE_FOR_nothing;\n}\n");
++ fprintf (file, " return CODE_FOR_nothing;\n}\n");
+ }
+
+ /* Emit a maybe_gen_* function for ONAME. */
+
+ static void
+-handle_overloaded_gen (overloaded_name *oname)
++handle_overloaded_gen (overloaded_name *oname, FILE *file)
+ {
+ unsigned HOST_WIDE_INT seen = 0;
+ /* All patterns must have the same number of operands. */
+@@ -827,25 +828,25 @@ handle_overloaded_gen (overloaded_name *oname)
+ seen |= mask;
+
+ /* Print the function prototype. */
+- printf ("\nrtx\nmaybe_gen_%s (", oname->name);
+- print_overload_arguments (oname);
++ fprintf (file, "\nrtx\nmaybe_gen_%s (", oname->name);
++ print_overload_arguments (oname, file);
+ for (int i = 0; i < stats.num_generator_args; ++i)
+- printf (", rtx x%d", i);
+- printf (")\n{\n");
++ fprintf (file, ", rtx x%d", i);
++ fprintf (file, ")\n{\n");
+
+ /* Use maybe_code_for_*, instead of duplicating the selection
+ logic here. */
+- printf (" insn_code code = maybe_code_for_%s (", oname->name);
++ fprintf (file, " insn_code code = maybe_code_for_%s (", oname->name);
+ for (unsigned int i = 0; i < oname->arg_types.length (); ++i)
+- printf ("%sarg%d", i == 0 ? "" : ", ", i);
+- printf (");\n"
++ fprintf (file, "%sarg%d", i == 0 ? "" : ", ", i);
++ fprintf (file, ");\n"
+ " if (code != CODE_FOR_nothing)\n"
+ " {\n"
+ " gcc_assert (insn_data[code].n_generator_args == %d);\n"
+ " return GEN_FCN (code) (", stats.num_generator_args);
+ for (int i = 0; i < stats.num_generator_args; ++i)
+- printf ("%sx%d", i == 0 ? "" : ", ", i);
+- printf (");\n"
++ fprintf (file, "%sx%d", i == 0 ? "" : ", ", i);
++ fprintf (file, ");\n"
+ " }\n"
+ " else\n"
+ " return NULL_RTX;\n"
+@@ -853,12 +854,68 @@ handle_overloaded_gen (overloaded_name *oname)
+ }
+ }
+
++void
++print_header (FILE *file)
++{
++ fprintf (file, "/* Generated automatically by the program `genemit'\n\
++from the machine description file `md'. */\n\n");
++
++ fprintf (file, "#define IN_TARGET_CODE 1\n");
++ fprintf (file, "#include \"config.h\"\n");
++ fprintf (file, "#include \"system.h\"\n");
++ fprintf (file, "#include \"coretypes.h\"\n");
++ fprintf (file, "#include \"backend.h\"\n");
++ fprintf (file, "#include \"predict.h\"\n");
++ fprintf (file, "#include \"tree.h\"\n");
++ fprintf (file, "#include \"rtl.h\"\n");
++ fprintf (file, "#include \"alias.h\"\n");
++ fprintf (file, "#include \"varasm.h\"\n");
++ fprintf (file, "#include \"stor-layout.h\"\n");
++ fprintf (file, "#include \"calls.h\"\n");
++ fprintf (file, "#include \"memmodel.h\"\n");
++ fprintf (file, "#include \"tm_p.h\"\n");
++ fprintf (file, "#include \"flags.h\"\n");
++ fprintf (file, "#include \"insn-config.h\"\n");
++ fprintf (file, "#include \"expmed.h\"\n");
++ fprintf (file, "#include \"dojump.h\"\n");
++ fprintf (file, "#include \"explow.h\"\n");
++ fprintf (file, "#include \"emit-rtl.h\"\n");
++ fprintf (file, "#include \"stmt.h\"\n");
++ fprintf (file, "#include \"expr.h\"\n");
++ fprintf (file, "#include \"insn-codes.h\"\n");
++ fprintf (file, "#include \"optabs.h\"\n");
++ fprintf (file, "#include \"dfp.h\"\n");
++ fprintf (file, "#include \"output.h\"\n");
++ fprintf (file, "#include \"recog.h\"\n");
++ fprintf (file, "#include \"df.h\"\n");
++ fprintf (file, "#include \"resource.h\"\n");
++ fprintf (file, "#include \"reload.h\"\n");
++ fprintf (file, "#include \"diagnostic-core.h\"\n");
++ fprintf (file, "#include \"regs.h\"\n");
++ fprintf (file, "#include \"tm-constrs.h\"\n");
++ fprintf (file, "#include \"ggc.h\"\n");
++ fprintf (file, "#include \"target.h\"\n\n");
++}
++
++auto_vec<const char *, 10> output_files;
++
++static bool
++handle_arg (const char *arg)
++{
++ if (arg[1] == 'O')
++ {
++ output_files.safe_push (&arg[2]);
++ return true;
++ }
++ return false;
++}
++
+ int
+ main (int argc, const char **argv)
+ {
+ progname = "genemit";
+
+- if (!init_rtx_reader_args (argc, argv))
++ if (!init_rtx_reader_args_cb (argc, argv, handle_arg))
+ return (FATAL_EXIT_CODE);
+
+ #define DEF_INTERNAL_OPTAB_FN(NAME, FLAGS, OPTAB, TYPE) \
+@@ -868,86 +925,81 @@ main (int argc, const char **argv)
+ /* Assign sequential codes to all entries in the machine description
+ in parallel with the tables in insn-output.cc. */
+
+- printf ("/* Generated automatically by the program `genemit'\n\
+-from the machine description file `md'. */\n\n");
++ int npatterns = count_patterns ();
++ md_rtx_info info;
+
+- printf ("#define IN_TARGET_CODE 1\n");
+- printf ("#include \"config.h\"\n");
+- printf ("#include \"system.h\"\n");
+- printf ("#include \"coretypes.h\"\n");
+- printf ("#include \"backend.h\"\n");
+- printf ("#include \"predict.h\"\n");
+- printf ("#include \"tree.h\"\n");
+- printf ("#include \"rtl.h\"\n");
+- printf ("#include \"alias.h\"\n");
+- printf ("#include \"varasm.h\"\n");
+- printf ("#include \"stor-layout.h\"\n");
+- printf ("#include \"calls.h\"\n");
+- printf ("#include \"memmodel.h\"\n");
+- printf ("#include \"tm_p.h\"\n");
+- printf ("#include \"flags.h\"\n");
+- printf ("#include \"insn-config.h\"\n");
+- printf ("#include \"expmed.h\"\n");
+- printf ("#include \"dojump.h\"\n");
+- printf ("#include \"explow.h\"\n");
+- printf ("#include \"emit-rtl.h\"\n");
+- printf ("#include \"stmt.h\"\n");
+- printf ("#include \"expr.h\"\n");
+- printf ("#include \"insn-codes.h\"\n");
+- printf ("#include \"optabs.h\"\n");
+- printf ("#include \"dfp.h\"\n");
+- printf ("#include \"output.h\"\n");
+- printf ("#include \"recog.h\"\n");
+- printf ("#include \"df.h\"\n");
+- printf ("#include \"resource.h\"\n");
+- printf ("#include \"reload.h\"\n");
+- printf ("#include \"diagnostic-core.h\"\n");
+- printf ("#include \"regs.h\"\n");
+- printf ("#include \"tm-constrs.h\"\n");
+- printf ("#include \"ggc.h\"\n");
+- printf ("#include \"target.h\"\n\n");
++ int npatterns_per_file = npatterns;
++ if (!output_files.is_empty ())
++ npatterns_per_file = npatterns / output_files.length () + 1;
+
+- /* Read the machine description. */
++ gcc_assert (npatterns_per_file > 1);
+
+- md_rtx_info info;
++ /* Reverse so we can pop the first-added element. */
++ output_files.reverse ();
++
++ int count = 0;
++ FILE *file = NULL;
++
++ /* Read the machine description. */
+ while (read_md_rtx (&info))
+- switch (GET_CODE (info.def))
+- {
+- case DEFINE_INSN:
+- gen_insn (&info);
+- break;
++ {
++ if (count == 0 || count == npatterns_per_file)
++ {
++ if (file)
++ if (fclose (file) != 0)
++ return FATAL_EXIT_CODE;
+
+- case DEFINE_EXPAND:
+- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
+- gen_expand (&info);
+- break;
++ if (!output_files.is_empty ())
++ {
++ const char *const filename = output_files.pop ();
++ file = fopen (filename, "w");
++ }
++ else
++ file = stdout;
+
+- case DEFINE_SPLIT:
+- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
+- gen_split (&info);
+- break;
++ print_header (file);
++ count = 0;
++ }
+
+- case DEFINE_PEEPHOLE2:
+- printf ("/* %s:%d */\n", info.loc.filename, info.loc.lineno);
+- gen_split (&info);
+- break;
++ switch (GET_CODE (info.def))
++ {
++ case DEFINE_INSN:
++ gen_insn (&info, file);
++ break;
+
+- default:
+- break;
+- }
++ case DEFINE_EXPAND:
++ fprintf (file, "/* %s:%d */\n", info.loc.filename, info.loc.lineno);
++ gen_expand (&info, file);
++ break;
++
++ case DEFINE_SPLIT:
++ fprintf (file, "/* %s:%d */\n", info.loc.filename, info.loc.lineno);
++ gen_split (&info, file);
++ break;
++
++ case DEFINE_PEEPHOLE2:
++ fprintf (file, "/* %s:%d */\n", info.loc.filename, info.loc.lineno);
++ gen_split (&info, file);
++ break;
++
++ default:
++ break;
++ }
++
++ count++;
++ }
+
+ /* Write out the routines to add CLOBBERs to a pattern and say whether they
+ clobber a hard reg. */
+- output_add_clobbers (&info);
+- output_added_clobbers_hard_reg_p ();
++ output_add_clobbers (&info, file);
++ output_added_clobbers_hard_reg_p (file);
+
+ for (overloaded_name *oname = rtx_reader_ptr->get_overloads ();
+ oname; oname = oname->next)
+ {
+- handle_overloaded_code_for (oname);
+- handle_overloaded_gen (oname);
++ handle_overloaded_code_for (oname, file);
++ handle_overloaded_gen (oname, file);
+ }
+
+- fflush (stdout);
+- return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
++ return (fclose (file) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
+ }
+diff --git a/gcc/gensupport.cc b/gcc/gensupport.cc
+index dd920d673b4..367ba1a30a4 100644
+--- a/gcc/gensupport.cc
++++ b/gcc/gensupport.cc
+@@ -3131,6 +3131,42 @@ init_rtx_reader_args (int argc, const char **argv)
+ return init_rtx_reader_args_cb (argc, argv, 0);
+ }
+ \f
++/* Count the number of patterns in all queues and return the count. */
++int
++count_patterns ()
++{
++ int count = 0;
++ class queue_elem *cur = define_attr_queue;
++ while (cur != NULL)
++ {
++ count++;
++ cur = cur->next;
++ }
++
++ cur = define_pred_queue;
++ while (cur != NULL)
++ {
++ count++;
++ cur = cur->next;
++ }
++
++ cur = define_insn_queue;
++ while (cur != NULL)
++ {
++ count++;
++ cur = cur->next;
++ }
++
++ cur = other_queue;
++ while (cur != NULL)
++ {
++ count++;
++ cur = cur->next;
++ }
++
++ return count;
++}
++\f
+ /* Try to read a single rtx from the file. Return true on success,
+ describing it in *INFO. */
+
+diff --git a/gcc/gensupport.h b/gcc/gensupport.h
+index 7925e22ed41..7396118714b 100644
+--- a/gcc/gensupport.h
++++ b/gcc/gensupport.h
+@@ -130,6 +130,7 @@ extern rtx add_implicit_parallel (rtvec);
+ extern rtx_reader *init_rtx_reader_args_cb (int, const char **,
+ bool (*)(const char *));
+ extern rtx_reader *init_rtx_reader_args (int, const char **);
++extern int count_patterns ();
+ extern bool read_md_rtx (md_rtx_info *);
+ extern unsigned int get_num_insn_codes ();
+
+diff --git a/gcc/read-md.cc b/gcc/read-md.cc
+index fd38818e3a3..46ab9065e3e 100644
+--- a/gcc/read-md.cc
++++ b/gcc/read-md.cc
+@@ -132,9 +132,9 @@ md_reader::fprint_md_ptr_loc (FILE *outf, const void *ptr)
+
+ /* Special fprint_md_ptr_loc for writing to STDOUT. */
+ void
+-md_reader::print_md_ptr_loc (const void *ptr)
++md_reader::print_md_ptr_loc (const void *ptr, FILE *file)
+ {
+- fprint_md_ptr_loc (stdout, ptr);
++ fprint_md_ptr_loc (file, ptr);
+ }
+
+ /* Return a condition that satisfies both COND1 and COND2. Either string
+diff --git a/gcc/read-md.h b/gcc/read-md.h
+index b309c9c3deb..2adcb58478f 100644
+--- a/gcc/read-md.h
++++ b/gcc/read-md.h
+@@ -194,7 +194,7 @@ class md_reader
+ const struct ptr_loc *get_md_ptr_loc (const void *ptr);
+ void copy_md_ptr_loc (const void *new_ptr, const void *old_ptr);
+ void fprint_md_ptr_loc (FILE *outf, const void *ptr);
+- void print_md_ptr_loc (const void *ptr);
++ void print_md_ptr_loc (const void *ptr, FILE * = stdout);
+
+ struct enum_type *lookup_enum_type (const char *name);
+ void traverse_enum_types (htab_trav callback, void *info);
+--
+2.41.0
+
+
+
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 0e5fac9..fe5b568 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,7 +1,13 @@
+4 18 Oct 2023
+
+ + 75_all_PR54179_genemit-Split-insn-emit.cc-into-ten-files.patch
+
3 02 Oct 2023
+
U 26_all_enable-cet.patch
2 18 June 2023
+
- 09_all_nopie-all-flags.patch
1 23 April 2023
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-10-02 13:23 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-10-02 13:23 UTC (permalink / raw
To: gentoo-commits
commit: 72cde8ad25618f62dbfbe941dade77351dd358d8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 2 13:13:32 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 2 13:13:53 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=72cde8ad
14.0.0: rebase 26_all_enable-cet.patch
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/26_all_enable-cet.patch | 20 ++++++++++----------
14.0.0/gentoo/README.history | 3 +++
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/14.0.0/gentoo/26_all_enable-cet.patch b/14.0.0/gentoo/26_all_enable-cet.patch
index b13abab..b9bbbf0 100644
--- a/14.0.0/gentoo/26_all_enable-cet.patch
+++ b/14.0.0/gentoo/26_all_enable-cet.patch
@@ -18,7 +18,7 @@ Only supported on amd64.
- " %(cc1_options) %2"
+ " %(cc1_options) %(default_flag_cf_spec) %2"
" %{!fsyntax-only:"
- " %{!S:-o %g.s%V}"
+ " %{!S:-o %g.s}"
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see
" %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
@@ -27,7 +27,7 @@ Only supported on amd64.
- " %(cc1_options) %2"
+ " %(cc1_options) %(default_flag_cf_spec) %2"
" %{!fsyntax-only:"
- " %{!S:-o %g.s%V}"
+ " %{!S:-o %g.s}"
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see
" %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
@@ -36,7 +36,7 @@ Only supported on amd64.
- " %(cc1_options) %2"
+ " %(cc1_options) %(default_flag_cf_spec) %2"
" %{!fsyntax-only:"
- " %{!S:-o %g.s%V}"
+ " %{!S:-o %g.s}"
" %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see
" cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed"
@@ -58,7 +58,7 @@ Only supported on amd64.
" %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}"
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
-@@ -994,6 +994,18 @@ proper position among the other output files. */
+@@ -999,6 +999,18 @@ proper position among the other output files. */
#define LINK_NOW_SPEC ""
#endif
@@ -77,7 +77,7 @@ Only supported on amd64.
#ifdef ENABLE_DEFAULT_PIE
#define PIE_SPEC "!no-pie"
#define NO_FPIE1_SPEC "fno-pie"
-@@ -1196,6 +1208,7 @@ static const char *cpp_spec = CPP_SPEC;
+@@ -1201,6 +1213,7 @@ static const char *cpp_spec = CPP_SPEC;
static const char *cc1_spec = CC1_SPEC OS_CC1_SPEC;
static const char *cc1plus_spec = CC1PLUS_SPEC;
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
@@ -85,7 +85,7 @@ Only supported on amd64.
static const char *link_ssp_spec = LINK_SSP_SPEC;
static const char *asm_spec = ASM_SPEC;
static const char *asm_final_spec = ASM_FINAL_SPEC;
-@@ -1254,7 +1267,7 @@ static const char *cpp_options =
+@@ -1261,7 +1274,7 @@ static const char *cpp_options =
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
%{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
%{!fno-working-directory:-fworking-directory}}} %{O*}\
@@ -94,7 +94,7 @@ Only supported on amd64.
/* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
-@@ -1448,9 +1461,9 @@ static const struct compiler default_compilers[] =
+@@ -1455,9 +1468,9 @@ static const struct compiler default_compilers[] =
%{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
@@ -106,8 +106,8 @@ Only supported on amd64.
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1},
{"-",
"%{!E:%e-E or -x required when input is from standard input}\
-@@ -1475,7 +1488,7 @@ static const struct compiler default_compilers[] =
- %W{o*:--output-pch %*}}%V}}}}}}}", 0, 0, 0},
+@@ -1482,7 +1495,7 @@ static const struct compiler default_compilers[] =
+ %W{o*:--output-pch %w%*}}%{!S:%V}}}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
@@ -115,7 +115,7 @@ Only supported on amd64.
{".s", "@assembler", 0, 0, 0},
{"@assembler",
"%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
-@@ -1707,6 +1720,7 @@ static struct spec_list static_specs[] =
+@@ -1714,6 +1727,7 @@ static struct spec_list static_specs[] =
INIT_STATIC_SPEC ("cc1_options", &cc1_options),
INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec),
INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 3d72078..0e5fac9 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,6 @@
+3 02 Oct 2023
+ U 26_all_enable-cet.patch
+
2 18 June 2023
- 09_all_nopie-all-flags.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-06-18 23:02 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-06-18 23:02 UTC (permalink / raw
To: gentoo-commits
commit: 6cb33e2f39e289ec4f25f845d8153053147c5c49
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 18 22:51:10 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 18 22:51:10 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6cb33e2f
14.0.0: cut patchset 2
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/README.history | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 54617a7..3d72078 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,4 +1,4 @@
-2 ??
+2 18 June 2023
- 09_all_nopie-all-flags.patch
1 23 April 2023
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-06-15 23:06 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-06-15 23:06 UTC (permalink / raw
To: gentoo-commits
commit: f9de5c24b9a6172d48786289035eed8f947c04c1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 15 23:03:22 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 15 23:03:27 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f9de5c24
14.0.0: drop 09_all_nopie-all-flags.patch
Conflicts with https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b6cb10af12cf869c1ae348c0e5cb2d364ef0abce upstream
and upon review, I don't think we need this anymore at all.
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/09_all_nopie-all-flags.patch | 18 ------------------
14.0.0/gentoo/README.history | 3 +++
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/14.0.0/gentoo/09_all_nopie-all-flags.patch b/14.0.0/gentoo/09_all_nopie-all-flags.patch
deleted file mode 100644
index fe1cd80..0000000
--- a/14.0.0/gentoo/09_all_nopie-all-flags.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when
-we compile it with older gcc and pie.
-
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -1054,10 +1054,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
- ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
-
- # This is the variable to use when using $(COMPILER).
--ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
-+ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # This is the variable to use when using $(LINKER).
--ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
-+ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
-
- # Build and host support libraries.
-
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
index 6204a28..54617a7 100644
--- a/14.0.0/gentoo/README.history
+++ b/14.0.0/gentoo/README.history
@@ -1,3 +1,6 @@
+2 ??
+ - 09_all_nopie-all-flags.patch
+
1 23 April 2023
+ 01_all_default-fortify-source.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
* [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/
@ 2023-04-23 23:03 Sam James
0 siblings, 0 replies; 47+ messages in thread
From: Sam James @ 2023-04-23 23:03 UTC (permalink / raw
To: gentoo-commits
commit: b00cfbdaa4cc20d38bf779109ef351925e878921
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 23 22:52:29 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 23 22:52:29 2023 +0000
URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b00cfbda
14.0.0: add initial patchset
Clone of 13.1.0 modulo dropping M2 patch.
Signed-off-by: Sam James <sam <AT> gentoo.org>
14.0.0/gentoo/01_all_default-fortify-source.patch | 26 +++
.../02_all_default-warn-format-security.patch | 22 +++
.../gentoo/03_all_default-warn-trampolines.patch | 13 ++
14.0.0/gentoo/04_all_nossp-on-nostdlib.patch | 27 +++
14.0.0/gentoo/05_all_alpha-mieee-default.patch | 39 +++++
14.0.0/gentoo/06_all_ia64_note.GNU-stack.patch | 92 ++++++++++
14.0.0/gentoo/07_all_libiberty-asprintf.patch | 18 ++
14.0.0/gentoo/08_all_libiberty-pic.patch | 10 ++
14.0.0/gentoo/09_all_nopie-all-flags.patch | 18 ++
14.0.0/gentoo/10_all_sh-drop-sysroot-suffix.patch | 26 +++
14.0.0/gentoo/11_all_ia64-TEXTREL.patch | 22 +++
14.0.0/gentoo/14_all_respect-build-cxxflags.patch | 39 +++++
.../15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch | 14 ++
14.0.0/gentoo/20_all_libstdcxx-no-vtv.patch | 61 +++++++
14.0.0/gentoo/22_all_default_ssp-buffer-size.patch | 14 ++
14.0.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch | 26 +++
...ll_DEF_GENTOO_SCP-fstack-clash-protection.patch | 65 +++++++
.../25_all_lto-intl-workaround-PR95194.patch | 20 +++
14.0.0/gentoo/26_all_enable-cet.patch | 193 +++++++++++++++++++++
14.0.0/gentoo/28_all_drop_CFLAGS_sed.patch | 35 ++++
14.0.0/gentoo/29_all_msgfmt-libstdc++-link.patch | 39 +++++
14.0.0/gentoo/30_all_tar_libstdc++-link.patch | 57 ++++++
14.0.0/gentoo/README.history | 24 +++
23 files changed, 900 insertions(+)
diff --git a/14.0.0/gentoo/01_all_default-fortify-source.patch b/14.0.0/gentoo/01_all_default-fortify-source.patch
new file mode 100644
index 0000000..4cdf5f6
--- /dev/null
+++ b/14.0.0/gentoo/01_all_default-fortify-source.patch
@@ -0,0 +1,26 @@
+Taken Debian's patch and removed docs matches:
+ https://salsa.debian.org/toolchain-team/gcc.git
+Also see https://bugs.gentoo.org/621036 where
+initially Gentoo used too complicated macro.
+
+# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
+# DP: if the optimization level is > 0
+--- a/gcc/c-family/c-cppbuiltin.cc
++++ b/gcc/c-family/c-cppbuiltin.cc
+@@ -1510,6 +1510,16 @@ c_cpp_builtins (cpp_reader *pfile)
+ builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
+ builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
+
++#if !defined(ACCEL_COMPILER)
++ #ifndef GENTOO_FORTIFY_SOURCE_LEVEL
++ #define GENTOO_FORTIFY_SOURCE_LEVEL 2
++ #endif
++
++ /* F_S enabled by default for optimization levels > 0, except for ASAN: https://github.com/google/sanitizers/issues/247 */
++ if (optimize && ! (flag_sanitize & SANITIZE_ADDRESS))
++ builtin_define_with_int_value ("_FORTIFY_SOURCE", GENTOO_FORTIFY_SOURCE_LEVEL);
++#endif
++
+ /* Misc. */
+ if (flag_gnu89_inline)
+ cpp_define (pfile, "__GNUC_GNU_INLINE__");
diff --git a/14.0.0/gentoo/02_all_default-warn-format-security.patch b/14.0.0/gentoo/02_all_default-warn-format-security.patch
new file mode 100644
index 0000000..9723a1c
--- /dev/null
+++ b/14.0.0/gentoo/02_all_default-warn-format-security.patch
@@ -0,0 +1,22 @@
+Enable -Wformat and -Wformat-security by default.
+
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -696,7 +696,7 @@ Warn about function calls with format strings that write past the end
+ of the destination region. Same as -Wformat-overflow=1.
+
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+ Warn about possible security problems with format functions.
+
+ Wformat-signedness
+@@ -717,7 +717,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
+ Warn about zero-length formats.
+
+ Wformat=
+-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+ Warn about printf/scanf/strftime/strfmon format string anomalies.
+
+ Wformat-overflow=
diff --git a/14.0.0/gentoo/03_all_default-warn-trampolines.patch b/14.0.0/gentoo/03_all_default-warn-trampolines.patch
new file mode 100644
index 0000000..fb6d8bc
--- /dev/null
+++ b/14.0.0/gentoo/03_all_default-warn-trampolines.patch
@@ -0,0 +1,13 @@
+Enable -Wtrampolines by default.
+
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -798,7 +798,7 @@ Common Var(warn_system_headers) Warning
+ Do not suppress warnings from system headers.
+
+ Wtrampolines
+-Common Var(warn_trampolines) Warning
++Common Var(warn_trampolines) Init(1) Warning
+ Warn whenever a trampoline is generated.
+
+ Wtrivial-auto-var-init
diff --git a/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch b/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch
new file mode 100644
index 0000000..b633d7f
--- /dev/null
+++ b/14.0.0/gentoo/04_all_nossp-on-nostdlib.patch
@@ -0,0 +1,27 @@
+Disable ssp on -nostdlib, -nodefaultlibs and -ffreestanding
+
+https://bugs.gentoo.org/484714
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -984,6 +984,12 @@ proper position among the other output files. */
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
+ #endif
+
++#ifdef ENABLE_DEFAULT_SSP
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
++#else
++#define NO_SSP_SPEC ""
++#endif
++
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+@@ -1280,7 +1286,7 @@ static const char *cc1_options =
+ %{-version:--version}\
+ %{-help=*:--help=%*}\
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\
+- %{fsyntax-only:-o %j} %{-param*}\
++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
+ %{coverage:-fprofile-arcs -ftest-coverage}\
+ %{fprofile-arcs|fprofile-generate*|coverage:\
+ %{!fprofile-update=single:\
diff --git a/14.0.0/gentoo/05_all_alpha-mieee-default.patch b/14.0.0/gentoo/05_all_alpha-mieee-default.patch
new file mode 100644
index 0000000..fd1de71
--- /dev/null
+++ b/14.0.0/gentoo/05_all_alpha-mieee-default.patch
@@ -0,0 +1,39 @@
+Set the default behavior on alpha to use -mieee since the large majority of
+time we want this (bad/weird things can happen with packages built without
+it).
+
+To satisfy those people who may not want -mieee forced on them all the time,
+we also provide -mno-ieee.
+
+Patch by Mike Frysinger <vapier@gentoo.org>
+
+Note: upstream doesn't want to take this due to long standing behavior, and
+because it'd make behavior across OS's inconsistent:
+ https://gcc.gnu.org/ml/gcc-patches/2003-07/msg02144.html
+
+This makes sense for upstream, but Gentoo is more concerned about packages
+behaving the same across arches under Linux.
+
+--- a/gcc/config/alpha/alpha.h
++++ b/gcc/config/alpha/alpha.h
+@@ -94,6 +94,8 @@ along with GCC; see the file COPYING3. If not see
+ while (0)
+ #endif
+
++#define CPP_SPEC "%{!no-ieee:-mieee}"
++
+ /* Run-time compilation parameters selecting different hardware subsets. */
+
+ /* Which processor to schedule for. The cpu attribute defines a list that
+--- a/gcc/config/alpha/alpha.opt
++++ b/gcc/config/alpha/alpha.opt
+@@ -35,7 +35,7 @@
+ Request IEEE-conformant math library routines (OSF/1).
+
+ mieee
+-Target RejectNegative Mask(IEEE)
++Target Mask(IEEE)
+ Emit IEEE-conformant code, without inexact exceptions.
+
+ mieee-with-inexact
+
diff --git a/14.0.0/gentoo/06_all_ia64_note.GNU-stack.patch b/14.0.0/gentoo/06_all_ia64_note.GNU-stack.patch
new file mode 100644
index 0000000..7a1d4c6
--- /dev/null
+++ b/14.0.0/gentoo/06_all_ia64_note.GNU-stack.patch
@@ -0,0 +1,92 @@
+http://gcc.gnu.org/PR21098
+
+
+2004-09-20 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
+ on ppc64-linux.
+
+ * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
+ ia64-linux.
+ * config/ia64/crtbegin.asm: Likewise.
+ * config/ia64/crtend.asm: Likewise.
+ * config/ia64/crti.asm: Likewise.
+ * config/ia64/crtn.asm: Likewise.
+
+2004-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ * config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
+
+
+--- a/gcc/config/ia64/linux.h
++++ b/gcc/config/ia64/linux.h
+@@ -23,6 +23,8 @@ a copy of the GCC Runtime Library Exception along with this program;
+ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ <http://www.gnu.org/licenses/>. */
+
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
+ /* This is for -profile to use -lc_p instead of -lc. */
+ #undef CC1_SPEC
+ #define CC1_SPEC "%{profile:-p} %{G*}"
+--- a/gcc/config/rs6000/ppc-asm.h
++++ b/gcc/config/rs6000/ppc-asm.h
+@@ -384,7 +384,7 @@ GLUE(.L,name): \
+ #endif
+ #endif
+
+-#if defined __linux__ && !defined __powerpc64__
++#if defined __linux__
+ .section .note.GNU-stack
+ .previous
+ #endif
+--- a/libgcc/config/ia64/crtbegin.S
++++ b/libgcc/config/ia64/crtbegin.S
+@@ -185,3 +185,7 @@ __do_jv_register_classes:
+ .weak __cxa_finalize
+ #endif
+ .weak _Jv_RegisterClasses
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/libgcc/config/ia64/crtend.S
++++ b/libgcc/config/ia64/crtend.S
+@@ -114,3 +114,6 @@ __do_global_ctors_aux:
+
+ br.ret.sptk.many rp
+ .endp __do_global_ctors_aux
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/libgcc/config/ia64/crti.S
++++ b/libgcc/config/ia64/crti.S
+@@ -49,5 +49,8 @@ _fini:
+ .save rp, r33
+ mov r33 = b0
+ .body
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+
+ # end of crti.S
+--- a/libgcc/config/ia64/crtn.S
++++ b/libgcc/config/ia64/crtn.S
+@@ -39,5 +39,8 @@
+ .restore sp
+ mov r12 = r35
+ br.ret.sptk.many b0
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+
+ # end of crtn.S
+--- a/libgcc/config/ia64/lib1funcs.S
++++ b/libgcc/config/ia64/lib1funcs.S
+@@ -793,3 +793,6 @@ __floattitf:
+ .endp __floattitf
+ #endif
+ #endif
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
diff --git a/14.0.0/gentoo/07_all_libiberty-asprintf.patch b/14.0.0/gentoo/07_all_libiberty-asprintf.patch
new file mode 100644
index 0000000..1ed2ba3
--- /dev/null
+++ b/14.0.0/gentoo/07_all_libiberty-asprintf.patch
@@ -0,0 +1,18 @@
+2008-07-25 Magnus Granberg <zorry@ume.nu>
+
+ * include/libiberty.h (asprintf): Don't declare if defined as a macro
+
+--- a/include/libiberty.h
++++ b/include/libiberty.h
+@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
+ /* Like sprintf but provides a pointer to malloc'd storage, which must
+ be freed by the caller. */
+
++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
++#ifndef asprintf
+ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
+ #endif
++#endif
+
+ /* Like asprintf but allocates memory without fail. This works like
+ xmalloc. */
diff --git a/14.0.0/gentoo/08_all_libiberty-pic.patch b/14.0.0/gentoo/08_all_libiberty-pic.patch
new file mode 100644
index 0000000..3f0bae1
--- /dev/null
+++ b/14.0.0/gentoo/08_all_libiberty-pic.patch
@@ -0,0 +1,10 @@
+--- a/libiberty/Makefile.in
++++ b/libiberty/Makefile.in
+@@ -265,6 +265,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
+ $(RANLIB) $(TARGETLIB); \
++ cp $(TARGETLIB) ../ ; \
+ cd ..; \
+ else true; fi
+
diff --git a/14.0.0/gentoo/09_all_nopie-all-flags.patch b/14.0.0/gentoo/09_all_nopie-all-flags.patch
new file mode 100644
index 0000000..fe1cd80
--- /dev/null
+++ b/14.0.0/gentoo/09_all_nopie-all-flags.patch
@@ -0,0 +1,18 @@
+We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when
+we compile it with older gcc and pie.
+
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1054,10 +1054,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
+ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
+
+ # This is the variable to use when using $(COMPILER).
+-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
++ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
+
+ # This is the variable to use when using $(LINKER).
+-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
++ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
+
+ # Build and host support libraries.
+
diff --git a/14.0.0/gentoo/10_all_sh-drop-sysroot-suffix.patch b/14.0.0/gentoo/10_all_sh-drop-sysroot-suffix.patch
new file mode 100644
index 0000000..e778f81
--- /dev/null
+++ b/14.0.0/gentoo/10_all_sh-drop-sysroot-suffix.patch
@@ -0,0 +1,26 @@
+From 5eeeff19bb4978a8d3c0d53bc81744bc25d82993 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 14 Apr 2018 13:07:39 +0100
+Subject: [PATCH] gcc/config.gcc: sh-*: Disable sysroot-suffix (PR42947)
+
+sh-* is a multilib target. It is also one of 2 sysroot-prefix targets.
+Unfortunately two options do not mix well. Attempt to use default
+multilib flavour always prepends sysroot-prefix.
+
+Bug: https://bugs.gentoo.org/511548
+Bug: https://gcc.gnu.org/PR42947
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -3328,8 +3328,6 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
+ if test x${enable_incomplete_targets} = xyes ; then
+ tm_defines="$tm_defines SUPPORT_SH1=1 SUPPORT_SH2E=1 SUPPORT_SH4=1 SUPPORT_SH4_SINGLE=1 SUPPORT_SH2A=1 SUPPORT_SH2A_SINGLE=1"
+ fi
+- tm_file="$tm_file ./sysroot-suffix.h"
+- tmake_file="$tmake_file t-sysroot-suffix"
+ ;;
+ sh-*-rtems*)
+ tmake_file="${tmake_file} sh/t-sh sh/t-rtems"
+--
+2.17.0
+
diff --git a/14.0.0/gentoo/11_all_ia64-TEXTREL.patch b/14.0.0/gentoo/11_all_ia64-TEXTREL.patch
new file mode 100644
index 0000000..f5d0a99
--- /dev/null
+++ b/14.0.0/gentoo/11_all_ia64-TEXTREL.patch
@@ -0,0 +1,22 @@
+Fix textrels on -rdynamic binaries:
+Bug: https://gcc.gnu.org/PR84553
+Bug: https://bugs.gentoo.org/566118
+--- a/gcc/config/ia64/ia64.cc
++++ b/gcc/config/ia64/ia64.cc
+@@ -10840,12 +10840,14 @@ ia64_hpux_reloc_rw_mask (void)
+
+ /* For others, relax this so that relocations to local data goes in
+ read-only segments, but we still cannot allow global relocations
+- in read-only segments. */
++ in read-only segments. Except that use of -rdynamic at link time
++ may make any local data global, so we can't allow local data in
++ read-only segments either. */
+
+ static int
+ ia64_reloc_rw_mask (void)
+ {
+- return flag_pic ? 3 : 2;
++ return flag_pic ? 3 : 3;
+ }
+
+ /* Return the section to use for X. The only special thing we do here
diff --git a/14.0.0/gentoo/14_all_respect-build-cxxflags.patch b/14.0.0/gentoo/14_all_respect-build-cxxflags.patch
new file mode 100644
index 0000000..1f9a774
--- /dev/null
+++ b/14.0.0/gentoo/14_all_respect-build-cxxflags.patch
@@ -0,0 +1,39 @@
+Pass CXXFLAGS as CXXFLAGS_FOR_BUILD to stage1.
+
+Fixes build failure when CXXFLAGS contains
+TARGET-specific flags.
+
+Tested on x86_64-pc-linux-gnu host as:
+ # CFLAGS='-O2 -mfpu=neon-vfpv4' CXXFLAGS='-O2 -mfpu=neon-vfpv4' \
+ armv7a-unknown-linux-gnueabihf-emerge -v1 sys-devel/gcc --quiet-build=n
+
+Fix by Peter Levine.
+https://bugs.gentoo.org/581406
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -176,6 +176,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
+@@ -842,6 +843,7 @@
+ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
++ "CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
+ "EXPECT=$(EXPECT)" \
+ "FLEX=$(FLEX)" \
+ "INSTALL=$(INSTALL)" \
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -179,6 +179,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
diff --git a/14.0.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch b/14.0.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch
new file mode 100644
index 0000000..2daf73b
--- /dev/null
+++ b/14.0.0/gentoo/15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/876895
+--- a/gcc/c-family/c-cppbuiltin.cc
++++ b/gcc/c-family/c-cppbuiltin.cc
+@@ -957,6 +957,10 @@ c_cpp_builtins (cpp_reader *pfile)
+ cpp_define (pfile, "__cpp_rtti=199711L");
+ }
+
++ #ifdef DEF_GENTOO_GLIBCXX_ASSERTIONS
++ cpp_define (pfile, "_GLIBCXX_ASSERTIONS");
++ #endif
++
+ if (cxx_dialect >= cxx11)
+ cpp_define (pfile, "__GXX_EXPERIMENTAL_CXX0X__");
+
diff --git a/14.0.0/gentoo/20_all_libstdcxx-no-vtv.patch b/14.0.0/gentoo/20_all_libstdcxx-no-vtv.patch
new file mode 100644
index 0000000..2719e2d
--- /dev/null
+++ b/14.0.0/gentoo/20_all_libstdcxx-no-vtv.patch
@@ -0,0 +1,61 @@
+Final libstdc++.so should not contain rpath to make libvtv usable.
+It's up to final binaries to link against proper libvtv.
+
+Bug: https://bugs.gentoo.org/582524
+Bug: https://gcc.gnu.org/PR85884
+--- a/libstdc++-v3/src/Makefile.am
++++ b/libstdc++-v3/src/Makefile.am
+@@ -277,7 +277,6 @@ CXXLINK = \
+ $(LIBTOOL) --tag CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+- $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) \
+ $(LTLDFLAGS) $(LTLIBICONV) \
+ -o $@
+--- a/libstdc++-v3/src/Makefile.in
++++ b/libstdc++-v3/src/Makefile.in
+@@ -642,7 +642,6 @@ CXXLINK = \
+ $(LIBTOOL) --tag CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+- $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) \
+ $(LTLDFLAGS) $(LTLIBICONV) \
+ -o $@
+--- a/libstdc++-v3/src/c++11/Makefile.am
++++ b/libstdc++-v3/src/c++11/Makefile.am
+@@ -214,5 +214,4 @@ CXXLINK = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+- $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+--- a/libstdc++-v3/src/c++11/Makefile.in
++++ b/libstdc++-v3/src/c++11/Makefile.in
+@@ -588,7 +588,6 @@ CXXLINK = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+- $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+
+ all: all-am
+--- a/libstdc++-v3/src/c++98/Makefile.am
++++ b/libstdc++-v3/src/c++98/Makefile.am
+@@ -268,5 +268,4 @@ CXXLINK = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+- $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+--- a/libstdc++-v3/src/c++98/Makefile.in
++++ b/libstdc++-v3/src/c++98/Makefile.in
+@@ -590,7 +590,6 @@ CXXLINK = \
+ $(LIBTOOL) --tag CXX --tag disable-shared \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXX) \
+- $(VTV_CXXLINKFLAGS) \
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
+
+ all: all-am
diff --git a/14.0.0/gentoo/22_all_default_ssp-buffer-size.patch b/14.0.0/gentoo/22_all_default_ssp-buffer-size.patch
new file mode 100644
index 0000000..0e0dd42
--- /dev/null
+++ b/14.0.0/gentoo/22_all_default_ssp-buffer-size.patch
@@ -0,0 +1,14 @@
+Change the minimal SSP buffer size.
+
+https://bugs.gentoo.org/484714
+--- a/gcc/params.opt
++++ b/gcc/params.opt
+@@ -1012,7 +1012,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
+ The maximum number of SSA_NAME assignments to follow in determining a value.
+
+ -param=ssp-buffer-size=
+-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
++Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
+ The lower bound for a buffer to be considered for stack smashing protection.
+
+ -param=stack-clash-protection-guard-size=
diff --git a/14.0.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch b/14.0.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch
new file mode 100644
index 0000000..2ed7968
--- /dev/null
+++ b/14.0.0/gentoo/23_all_DEF_GENTOO_ZNOW-z-now.patch
@@ -0,0 +1,26 @@
+If requested we add -z now
+
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -1001,6 +1001,12 @@ proper position among the other output files. */
+ #endif
+ #endif
+
++#ifdef DEF_GENTOO_ZNOW
++#define LINK_NOW_SPEC "%{!nonow:-z now} "
++#else
++#define LINK_NOW_SPEC ""
++#endif
++
+ #ifdef ENABLE_DEFAULT_PIE
+ #define PIE_SPEC "!no-pie"
+ #define NO_FPIE1_SPEC "fno-pie"
+@@ -1161,7 +1167,7 @@ proper position among the other output files. */
+ %(linker) " \
+ LINK_PLUGIN_SPEC \
+ "%{flto|flto=*:%<fcompare-debug*} \
+- %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC \
++ %{flto} %{fno-lto} %{flto=*} %l " LINK_PIE_SPEC LINK_NOW_SPEC \
+ "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+ "%X %{o*} %{e*} %{N} %{n} %{r}\
+ %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
diff --git a/14.0.0/gentoo/24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch b/14.0.0/gentoo/24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch
new file mode 100644
index 0000000..b13215d
--- /dev/null
+++ b/14.0.0/gentoo/24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch
@@ -0,0 +1,65 @@
+We add -fstack-clash-protection if requested
+
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -2698,7 +2698,7 @@ Common Alias(fstack-check=, specific, no
+ Insert stack checking code into the program. Same as -fstack-check=specific.
+
+ fstack-clash-protection
+-Common Var(flag_stack_clash_protection) Optimization
++Common Var(flag_stack_clash_protection) Optimization Init(-1)
+ Insert code to probe each page of stack space as it is allocated to protect
+ from stack-clash style attacks.
+
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1425,6 +1425,15 @@ see the files COPYING3 and COPYING.RUNTI
+ #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
+ #endif
+
++/* Default value for flag_clash_protector when flag_clash_protector is
++ initialized to -1. */
++#ifdef DEF_GENTOO_SCP
++#define DEFAULT_FLAG_SCP 1
++#endif
++#ifndef DEFAULT_FLAG_SCP
++#define DEFAULT_FLAG_SCP 0
++#endif
++
+ /* By default, the C++ compiler will use function addresses in the
+ vtable entries. Setting this nonzero tells the compiler to use
+ function descriptors instead. The value of this macro says how
+--- a/gcc/toplev.cc
++++ b/gcc/toplev.cc
+@@ -1610,6 +1610,10 @@ process_options (void)
+
+ /* -fstack-clash-protection is not currently supported on targets
+ where the stack grows up. */
++ if (flag_stack_clash_protection == -1)
++ {
++ flag_stack_clash_protection = DEFAULT_FLAG_SCP;
++ }
+ if (flag_stack_clash_protection && !STACK_GROWS_DOWNWARD)
+ {
+ warning_at (UNKNOWN_LOCATION, 0,
+
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -246,7 +246,7 @@ endif
+ LIBGCC2_DEBUG_CFLAGS = -g
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
+ $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
+- -fbuilding-libgcc -fno-stack-protector \
++ -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection \
+ $(INHIBIT_LIBC_CFLAGS)
+
+ # Additional options to use when compiling libgcc2.a.
+@@ -302,7 +302,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF
+ $(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
+ -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
+ -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
+- $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
++ -fno-stack-clash-protection $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
+
+ # Extra flags to use when compiling crt{begin,end}.o.
+ CRTSTUFF_T_CFLAGS =
diff --git a/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch b/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch
new file mode 100644
index 0000000..9613216
--- /dev/null
+++ b/14.0.0/gentoo/25_all_lto-intl-workaround-PR95194.patch
@@ -0,0 +1,20 @@
+Trick libintl not to use '_INTL_REDIRECT_ASM' mode as it's
+incompatible with LTO builds.
+
+glibc does not normally use libintl implementations and uses
+it's own primitives. But musl ond others do fall back to libintl.
+
+Reported-by: Andrew Savchenko
+Bug: https://bugs.gentoo.org/723370
+Bug: https://gcc.gnu.org/PR95194
+--- a/intl/libgnuintl.h
++++ b/intl/libgnuintl.h
+@@ -93,7 +93,7 @@ extern "C" {
+ If he doesn't, we choose the method. A third possible method is
+ _INTL_REDIRECT_ASM, supported only by GCC. */
+ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+-# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
++# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus) && USE_ASM_ALIASES_THAT_BREAK_LTO
+ # define _INTL_REDIRECT_ASM
+ # else
+ # ifdef __cplusplus
diff --git a/14.0.0/gentoo/26_all_enable-cet.patch b/14.0.0/gentoo/26_all_enable-cet.patch
new file mode 100644
index 0000000..b13abab
--- /dev/null
+++ b/14.0.0/gentoo/26_all_enable-cet.patch
@@ -0,0 +1,193 @@
+https://bugs.gentoo.org/822036
+https://salsa.debian.org/toolchain-team/gcc/-/blob/master/debian/patches/gcc-distro-specs.diff
+
+From: Sam James <sam@gentoo.org>
+Subject: [PATCH] Enable CET (-fcf-protection=full) by default
+
+Needs:
+- CET to be enabled for GCC
+- -DEXTRA_OPTIONS_CF to be passed during build (via toolchain.eclass).
+
+Only supported on amd64.
+--- a/gcc/cp/lang-specs.h
++++ b/gcc/cp/lang-specs.h
+@@ -51,7 +51,7 @@ along with GCC; see the file COPYING3. If not see
+ " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
+ " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
+ " %{fmodules-ts:-fmodule-header %{fpreprocessed:-fdirectives-only}}"
+- " %(cc1_options) %2"
++ " %(cc1_options) %(default_flag_cf_spec) %2"
+ " %{!fsyntax-only:"
+ " %{!S:-o %g.s%V}"
+ " %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
+@@ -72,7 +72,7 @@ along with GCC; see the file COPYING3. If not see
+ " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
+ " %{fmodules-ts:-fmodule-header=system"
+ " %{fpreprocessed:-fdirectives-only}}"
+- " %(cc1_options) %2"
++ " %(cc1_options) %(default_flag_cf_spec) %2"
+ " %{!fsyntax-only:"
+ " %{!S:-o %g.s%V}"
+ " %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
+@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see
+ " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
+ " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
+ " %{fmodules-ts:-fmodule-header=user %{fpreprocessed:-fdirectives-only}}"
+- " %(cc1_options) %2"
++ " %(cc1_options) %(default_flag_cf_spec) %2"
+ " %{!fsyntax-only:"
+ " %{!S:-o %g.s%V}"
+ " %{!fmodule-*:%{!fmodules-*:%{!fdump-ada-spec*:"
+@@ -107,7 +107,7 @@ along with GCC; see the file COPYING3. If not see
+ " cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed"
+ " %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}"
+ " %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}"
+- " %(cc1_options) %2"
++ " %(cc1_options) %(default_flag_cf_spec) %2"
+ " %{!fsyntax-only:"
+ " %{fmodule-only:%{!S:-o %g.s%V}}"
+ " %{!fmodule-only:%(invoke_as)}}"
+@@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see
+ {".ii", "@c++-cpp-output", 0, 0, 0},
+ {"@c++-cpp-output",
+ "%{!E:%{!M:%{!MM:"
+- " cc1plus -fpreprocessed %i %(cc1_options) %2"
++ " cc1plus -fpreprocessed %i %(cc1_options) %(default_flag_cf_spec) %2"
+ " %{!fsyntax-only:"
+ " %{fmodule-only:%{!S:-o %g.s%V}}"
+ " %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}"
+--- a/gcc/gcc.cc
++++ b/gcc/gcc.cc
+@@ -994,6 +994,18 @@ proper position among the other output files. */
+ #define LINK_NOW_SPEC ""
+ #endif
+
++/* Default value for flag_cf_protection when flag_cf_protection is
++ initialized to CF_FULL.
++
++ We use a new option (EXTRA_OPTIONS_CF) here to avoid turning
++ this on accidentally for other arches. */
++#ifdef EXTRA_OPTIONS_CF
++#define DEFAULT_FLAG_CF_SPEC " %{!m16:%{!m32:%{!fcf-protection*:%{!fno-cf-protection:-fcf-protection}}}}"
++#endif
++#ifndef DEFAULT_FLAG_CF_SPEC
++#define DEFAULT_FLAG_CF_SPEC ""
++#endif
++
+ #ifdef ENABLE_DEFAULT_PIE
+ #define PIE_SPEC "!no-pie"
+ #define NO_FPIE1_SPEC "fno-pie"
+@@ -1196,6 +1208,7 @@ static const char *cpp_spec = CPP_SPEC;
+ static const char *cc1_spec = CC1_SPEC OS_CC1_SPEC;
+ static const char *cc1plus_spec = CC1PLUS_SPEC;
+ static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
++static const char *default_flag_cf_spec = DEFAULT_FLAG_CF_SPEC;
+ static const char *link_ssp_spec = LINK_SSP_SPEC;
+ static const char *asm_spec = ASM_SPEC;
+ static const char *asm_final_spec = ASM_FINAL_SPEC;
+@@ -1254,7 +1267,7 @@ static const char *cpp_options =
+ "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
+ %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
+ %{!fno-working-directory:-fworking-directory}}} %{O*}\
+- %{undef} %{save-temps*:-fpch-preprocess}";
++ %{undef} %{save-temps*:-fpch-preprocess} %(default_flag_cf_spec)";
+
+ /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
+
+@@ -1448,9 +1461,9 @@ static const struct compiler default_compilers[] =
+ %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
+ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
+- %(cc1_options)}\
++ %(cc1_options)%(default_flag_cf_spec)}\
+ %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
+- cc1 %(cpp_unique_options) %(cc1_options)}}}\
++ cc1 %(cpp_unique_options) %(cc1_options) %(default_flag_cf_spec)}}}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1},
+ {"-",
+ "%{!E:%e-E or -x required when input is from standard input}\
+@@ -1475,7 +1488,7 @@ static const struct compiler default_compilers[] =
+ %W{o*:--output-pch %*}}%V}}}}}}}", 0, 0, 0},
+ {".i", "@cpp-output", 0, 0, 0},
+ {"@cpp-output",
+- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(default_flag_cf_spec) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {".s", "@assembler", 0, 0, 0},
+ {"@assembler",
+ "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
+@@ -1707,6 +1720,7 @@ static struct spec_list static_specs[] =
+ INIT_STATIC_SPEC ("cc1_options", &cc1_options),
+ INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec),
+ INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
++ INIT_STATIC_SPEC ("default_flag_cf_spec", &default_flag_cf_spec),
+ INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec),
+ INIT_STATIC_SPEC ("endfile", &endfile_spec),
+ INIT_STATIC_SPEC ("link", &link_spec),
+--- a/gcc/objc/lang-specs.h
++++ b/gcc/objc/lang-specs.h
+@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. If not see
+ %{traditional|traditional-cpp:\
+ %eGNU Objective C no longer supports traditional compilation}\
+ %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\
+- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
++ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(default_flag_cf_spec) %{print-objc-runtime-info} %{gen-decls}}\
+ %{!save-temps*:%{!no-integrated-cpp:\
+- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
++ cc1obj %(cpp_unique_options) %(cc1_options) %(default_flag_cf_spec) %{print-objc-runtime-info} %{gen-decls}}}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {"@objective-c-header",
+ "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\
+@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. If not see
+ %{traditional|traditional-cpp:\
+ %eGNU Objective C no longer supports traditional compilation}\
+ %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\
+- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ cc1obj -fpreprocessed %b.mi %(cc1_options) %(default_flag_cf_spec) %{print-objc-runtime-info} %{gen-decls}\
+ -o %g.s %{!o*:--output-pch %i.gch}\
+ %W{o*:--output-pch %*}%V}\
+ %{!save-temps*:%{!no-integrated-cpp:\
+- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ cc1obj %(cpp_unique_options) %(cc1_options) %(default_flag_cf_spec) %{print-objc-runtime-info} %{gen-decls}\
+ -o %g.s %{!o*:--output-pch %i.gch}\
+ %W{o*:--output-pch %*}%V}}}}}", 0, 0, 0},
+ {".mi", "@objective-c-cpp-output", 0, 0, 0},
+ {"@objective-c-cpp-output",
+- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(default_flag_cf_spec) %{print-objc-runtime-info} %{gen-decls}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {"@objc-cpp-output",
+ "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\
+- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(default_flag_cf_spec) %{print-objc-runtime-info} %{gen-decls}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+--- a/gcc/objcp/lang-specs.h
++++ b/gcc/objcp/lang-specs.h
+@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
+ %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\
+ cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+- %(cc1_options) %2\
++ %(cc1_options) %(default_flag_cf_spec) %2\
+ -o %g.s %{!o*:--output-pch %i.gch} %W{o*:--output-pch %*}%V}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {"@objective-c++",
+@@ -46,16 +46,16 @@ along with GCC; see the file COPYING3. If not see
+ %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\
+ cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+- %(cc1_options) %2\
++ %(cc1_options) %(default_flag_cf_spec) %2\
+ %{!fsyntax-only:%(invoke_as)}}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {".mii", "@objective-c++-cpp-output", 0, 0, 0},
+ {"@objective-c++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+- cc1objplus -fpreprocessed %i %(cc1_options) %2\
++ cc1objplus -fpreprocessed %i %(cc1_options) %(default_flag_cf_spec) %2\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {"@objc++-cpp-output",
+ "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\
+ %{!M:%{!MM:%{!E:\
+- cc1objplus -fpreprocessed %i %(cc1_options) %2\
++ cc1objplus -fpreprocessed %i %(cc1_options) %(default_flag_cf_spec) %2\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
diff --git a/14.0.0/gentoo/28_all_drop_CFLAGS_sed.patch b/14.0.0/gentoo/28_all_drop_CFLAGS_sed.patch
new file mode 100644
index 0000000..764f34c
--- /dev/null
+++ b/14.0.0/gentoo/28_all_drop_CFLAGS_sed.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/849722
+https://github.com/InBetweenNames/gentooLTO/issues/846
+https://github.com/vaeth/portage-bashrc-mv/issues/11
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -5388,13 +5388,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+-# optimizations to be activated explicitly by the toplevel.
+-case "$CC" in
+- */prev-gcc/xgcc*) ;;
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" `
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` ;;
+-esac
+
+
+
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -440,13 +440,6 @@ ACX_PROG_GDC([-I"$srcdir"/d])
+ # Do configure tests with the C++ compiler, since that's what we build with.
+ AC_LANG(C++)
+
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+-# optimizations to be activated explicitly by the toplevel.
+-case "$CC" in
+- */prev-gcc/xgcc*) ;;
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" `
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` ;;
+-esac
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CXXFLAGS)
+ AC_SUBST(GDCFLAGS)
diff --git a/14.0.0/gentoo/29_all_msgfmt-libstdc++-link.patch b/14.0.0/gentoo/29_all_msgfmt-libstdc++-link.patch
new file mode 100644
index 0000000..0d2f113
--- /dev/null
+++ b/14.0.0/gentoo/29_all_msgfmt-libstdc++-link.patch
@@ -0,0 +1,39 @@
+Ensure that msgfmt doesn't encounter problems during gcc bootstrapping.
+
+Solves error messages like the following:
+
+msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6)
+
+The libgcc_s.so used during build doesn't satisfy the needs of the
+libstdc++.so that msgfmt is linked against. On the other hand, msgfmt
+is used as a stand-alone application here, and what library it uses
+behind the scenes is of no concern to the gcc build process.
+Therefore, simply invoking it "as usual", i.e. without any special
+library path, will make it work as expected here.
+
+2011-09-19 Martin von Gagern
+
+References:
+https://bugs.gentoo.org/372377
+https://bugs.gentoo.org/295480
+https://bugs.gentoo.org/843119
+--- a/libstdc++-v3/po/Makefile.am
++++ b/libstdc++-v3/po/Makefile.am
+@@ -39,6 +39,7 @@ MSGFMT = msgfmt
+ EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN)
+
+ .po.mo:
++ env --unset=LD_LIBRARY_PATH \
+ $(MSGFMT) -o $@ $<
+
+ all-local: all-local-$(USE_NLS)
+--- a/libstdc++-v3/po/Makefile.in
++++ b/libstdc++-v3/po/Makefile.in
+@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am
+
+
+ .po.mo:
++ env --unset=LD_LIBRARY_PATH \
+ $(MSGFMT) -o $@ $<
+
+ all-local: all-local-$(USE_NLS)
diff --git a/14.0.0/gentoo/30_all_tar_libstdc++-link.patch b/14.0.0/gentoo/30_all_tar_libstdc++-link.patch
new file mode 100644
index 0000000..adb414a
--- /dev/null
+++ b/14.0.0/gentoo/30_all_tar_libstdc++-link.patch
@@ -0,0 +1,57 @@
+From eae11e896edef4199a128bf6720b5bd4e5edc2f9 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 17 Dec 2022 02:42:59 +0000
+Subject: [PATCH] Fix calling libarchive's tar
+
+https://bugs.gentoo.org/886447
+
+Very similar to 33_all_msgfmt-libstdc++-link.patch, whose description is:
+"""
+Ensure that msgfmt doesn't encounter problems during gcc bootstrapping.
+
+Solves error messages like the following:
+
+msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6)
+
+The libgcc_s.so used during build doesn't satisfy the needs of the
+libstdc++.so that msgfmt is linked against. On the other hand, msgfmt
+is used as a stand-alone application here, and what library it uses
+behind the scenes is of no concern to the gcc build process.
+Therefore, simply invoking it "as usual", i.e. without any special
+library path, will make it work as expected here.
+
+2011-09-19 Martin von Gagern
+
+References:
+https://bugs.gentoo.org/372377
+https://bugs.gentoo.org/295480
+https://bugs.gentoo.org/843119
+"""
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3955,10 +3955,10 @@ install-headers-tar: stmp-int-hdrs install-include-dir
+ # Unless a full pathname is provided, some shells would print the new CWD,
+ # found in CDPATH, corrupting the output. We could just redirect the
+ # output of `cd', but some shells lose on redirection within `()'s
+- (cd `${PWD_COMMAND}`/include ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
+- (cd `${PWD_COMMAND}`/include-fixed ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
++ (unset LD_LIBRARY_PATH ; cd `${PWD_COMMAND}`/include ; \
++ tar -cf - .; exit 0) | (unset LD_LIBRARY_PATH ; cd $(DESTDIR)$(libsubdir)/include; tar xpf - )
++ (unset LD_LIBRARY_PATH ; cd `${PWD_COMMAND}`/include-fixed ; \
++ tar -cf - .; exit 0) | (unset LD_LIBRARY_PATH ; cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
+ # /bin/sh on some systems returns the status of the first tar,
+ # and that can lose with GNU tar which always writes a full block.
+ # So use `exit 0' to ignore its exit status.
+@@ -3979,7 +3979,7 @@ install-headers-cp: stmp-int-hdrs install-include-dir
+ # Targets without dependencies, for use in prev-gcc during bootstrap.
+ real-install-headers-tar:
+ (cd `${PWD_COMMAND}`/include-fixed ; \
+- tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; tar xpf - )
++ unset LD_LIBRARY_PATH; tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include-fixed; unset LD_LIBRARY_PATH; tar xpf - )
+
+ real-install-headers-cpio:
+ cd `${PWD_COMMAND}`/include-fixed ; \
diff --git a/14.0.0/gentoo/README.history b/14.0.0/gentoo/README.history
new file mode 100644
index 0000000..6204a28
--- /dev/null
+++ b/14.0.0/gentoo/README.history
@@ -0,0 +1,24 @@
+1 23 April 2023
+
+ + 01_all_default-fortify-source.patch
+ + 02_all_default-warn-format-security.patch
+ + 03_all_default-warn-trampolines.patch
+ + 04_all_nossp-on-nostdlib.patch
+ + 05_all_alpha-mieee-default.patch
+ + 06_all_ia64_note.GNU-stack.patch
+ + 07_all_libiberty-asprintf.patch
+ + 08_all_libiberty-pic.patch
+ + 09_all_nopie-all-flags.patch
+ + 10_all_sh-drop-sysroot-suffix.patch
+ + 11_all_ia64-TEXTREL.patch
+ + 14_all_respect-build-cxxflags.patch
+ + 15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch
+ + 20_all_libstdcxx-no-vtv.patch
+ + 22_all_default_ssp-buffer-size.patch
+ + 23_all_DEF_GENTOO_ZNOW-z-now.patch
+ + 24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch
+ + 25_all_lto-intl-workaround-PR95194.patch
+ + 26_all_enable-cet.patch
+ + 28_all_drop_CFLAGS_sed.patch
+ + 29_all_msgfmt-libstdc++-link.patch
+ + 30_all_tar_libstdc++-link.patch
^ permalink raw reply related [flat|nested] 47+ messages in thread
end of thread, other threads:[~2024-04-07 23:25 UTC | newest]
Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 11:02 [gentoo-commits] proj/gcc-patches:master commit in: 14.0.0/gentoo/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-04-07 23:25 Sam James
2024-03-11 12:43 Sam James
2024-03-07 20:41 Sam James
2024-03-07 20:14 Sam James
2024-03-06 17:47 Sam James
2024-03-03 22:58 Sam James
2024-02-19 0:02 Sam James
2024-02-13 11:17 Sam James
2024-02-13 11:17 Sam James
2024-02-12 7:03 Sam James
2024-02-08 11:02 Sam James
2024-02-07 19:01 Sam James
2024-02-05 0:01 Sam James
2024-02-03 7:52 Sam James
2024-02-03 0:09 Sam James
2024-01-30 15:16 Sam James
2024-01-30 15:16 Sam James
2024-01-28 23:02 Sam James
2024-01-24 13:53 Sam James
2024-01-19 7:45 Sam James
2024-01-17 1:06 Sam James
2024-01-10 12:08 Sam James
2024-01-08 8:10 Sam James
2023-12-31 23:11 Sam James
2023-12-26 18:51 Sam James
2023-12-25 17:18 Sam James
2023-12-25 17:04 Sam James
2023-12-18 0:00 Sam James
2023-12-14 21:23 Sam James
2023-12-10 22:42 Sam James
2023-12-07 18:40 Sam James
2023-12-06 10:52 Sam James
2023-11-20 8:15 Sam James
2023-11-19 11:05 Sam James
2023-11-19 11:04 Sam James
2023-11-14 7:11 Sam James
2023-11-05 22:40 Sam James
2023-10-31 19:56 Sam James
2023-10-27 23:43 Sam James
2023-10-22 23:00 Sam James
2023-10-21 17:42 Sam James
2023-10-16 12:41 Sam James
2023-10-02 13:23 Sam James
2023-06-18 23:02 Sam James
2023-06-15 23:06 Sam James
2023-04-23 23:03 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox