summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-11-22 12:06:38 +0000
committerSam James <sam@gentoo.org>2023-11-22 12:07:48 +0000
commit02b9e1ebe9786a09cb4b00914d89d343241d6977 (patch)
tree4f95500c59152d01c5b4ccb1f718aeb344faed31 /sys-devel
parentsys-devel/gcc: drop 10.4.1_p20230426-r1 (diff)
downloadgentoo-02b9e1ebe9786a09cb4b00914d89d343241d6977.tar.gz
gentoo-02b9e1ebe9786a09cb4b00914d89d343241d6977.tar.bz2
gentoo-02b9e1ebe9786a09cb4b00914d89d343241d6977.zip
sys-devel/gcc/files: drop old patches
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc/files/gcc-14.0.0_pre20231015-pycryptodome-ice.patch212
-rw-r--r--sys-devel/gcc/files/gcc-14.0.0_pre20231022-PR111860.patch129
2 files changed, 0 insertions, 341 deletions
diff --git a/sys-devel/gcc/files/gcc-14.0.0_pre20231015-pycryptodome-ice.patch b/sys-devel/gcc/files/gcc-14.0.0_pre20231015-pycryptodome-ice.patch
deleted file mode 100644
index 377f68511f78..000000000000
--- a/sys-devel/gcc/files/gcc-14.0.0_pre20231015-pycryptodome-ice.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-https://gcc.gnu.org/PR111845
-https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f1744dd50bb1661c98b694ff907cb0a1be4f6134
-
-From f1744dd50bb1661c98b694ff907cb0a1be4f6134 Mon Sep 17 00:00:00 2001
-From: Jakub Jelinek <jakub@redhat.com>
-Date: Wed, 18 Oct 2023 12:37:40 +0200
-Subject: [PATCH] tree-ssa-math-opts: Fix up match_uaddc_usubc [PR111845]
-
-GCC ICEs on the first testcase. Successful match_uaddc_usubc ends up with
-some dead stmts which DCE will remove (hopefully) later all.
-The ICE is because one of the dead stmts refers to a freed SSA_NAME.
-The code already gsi_removes a couple of stmts in the
- /* Remove some statements which can't be kept in the IL because they
- use SSA_NAME whose setter is going to be removed too. */
-section for the same reason (the reason for the freed SSA_NAMEs is that
-we don't really have a replacement for those cases - all we have after
-a match is combined overflow from the addition/subtraction of 2 operands + a
-[0, 1] carry in, but not the individual overflows from the former 2
-additions), but for the last (most significant) limb case, where we try
-to match x = op1 + op2 + carry1 + carry2; or
-x = op1 - op2 - carry1 - carry2; we just gsi_replace the final stmt, but
-left around the 2 temporary stmts as dead; if we were unlucky enough that
-those referenced the carry flag that went away, it ICEs.
-
-So, the following patch remembers those temporary statements (rather than
-trying to rediscover them more expensively) and removes them before the
-final one is replaced.
-
-While working on it, I've noticed we didn't support all the reassociated
-possibilities of writing the addition of 4 operands or subtracting 3
-operands from one, we supported e.g.
-x = ((op1 + op2) + op3) + op4;
-x = op1 + ((op2 + op3) + op4);
-but not
-x = (op1 + (op2 + op3)) + op4;
-x = op1 + (op2 + (op3 + op4));
-Fixed by the change to inspect also rhs[2] when rhs[1] didn't yield what
-we were searching for (if non-NULL) - rhs[0] is inspected in the first
-loop and has different handling for the MINUS_EXPR case.
-
-2023-10-18 Jakub Jelinek <jakub@redhat.com>
-
- PR tree-optimization/111845
- * tree-ssa-math-opts.cc (match_uaddc_usubc): Remember temporary
- statements for the 4 operand addition or subtraction of 3 operands
- from 1 operand cases and remove them when successful. Look for
- nested additions even from rhs[2], not just rhs[1].
-
- * gcc.dg/pr111845.c: New test.
- * gcc.target/i386/pr111845.c: New test.
----
- gcc/testsuite/gcc.dg/pr111845.c | 16 ++++++++
- gcc/testsuite/gcc.target/i386/pr111845.c | 47 +++++++++++++++++++++++
- gcc/tree-ssa-math-opts.cc | 48 +++++++++++++++---------
- 3 files changed, 94 insertions(+), 17 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/pr111845.c
- create mode 100644 gcc/testsuite/gcc.target/i386/pr111845.c
-
-diff --git a/gcc/testsuite/gcc.dg/pr111845.c b/gcc/testsuite/gcc.dg/pr111845.c
-new file mode 100644
-index 000000000000..1bcb4f88e6f1
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr111845.c
-@@ -0,0 +1,16 @@
-+/* PR tree-optimization/111845 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 --param tree-reassoc-width=2" } */
-+
-+int a, b;
-+unsigned int c, d, e;
-+
-+void
-+foo (int x)
-+{
-+ b += d;
-+ c += b < d;
-+ b += e = a < x;
-+ c += b;
-+ c += b < e;
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/pr111845.c b/gcc/testsuite/gcc.target/i386/pr111845.c
-new file mode 100644
-index 000000000000..d52110a40422
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/pr111845.c
-@@ -0,0 +1,47 @@
-+/* PR tree-optimization/111845 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -g -masm=att" } */
-+/* { dg-final { scan-assembler-times "\tadcq\t" 8 { target lp64 } } } */
-+/* { dg-final { scan-assembler-times "\tadcl\t" 8 { target ia32 } } } */
-+
-+unsigned long l, m;
-+
-+__attribute__((noipa)) void
-+foo (unsigned long x, unsigned long y, unsigned long h, unsigned long i, int a, int b)
-+{
-+ unsigned long c, d;
-+ unsigned long e = __builtin_add_overflow (x, y, &c);
-+ unsigned long f = __builtin_add_overflow (c, a < b, &d);
-+ m = ((h + i) + e) + f;
-+ l = d;
-+}
-+
-+__attribute__((noipa)) void
-+bar (unsigned long x, unsigned long y, unsigned long h, unsigned long i, int a, int b)
-+{
-+ unsigned long c, d;
-+ unsigned long e = __builtin_add_overflow (x, y, &c);
-+ unsigned long f = __builtin_add_overflow (c, a < b, &d);
-+ m = (h + (i + e)) + f;
-+ l = d;
-+}
-+
-+__attribute__((noipa)) void
-+baz (unsigned long x, unsigned long y, unsigned long h, unsigned long i, int a, int b)
-+{
-+ unsigned long c, d;
-+ unsigned long e = __builtin_add_overflow (x, y, &c);
-+ unsigned long f = __builtin_add_overflow (c, a < b, &d);
-+ m = h + (i + (e + f));
-+ l = d;
-+}
-+
-+__attribute__((noipa)) void
-+qux (unsigned long x, unsigned long y, unsigned long h, unsigned long i, int a, int b)
-+{
-+ unsigned long c, d;
-+ unsigned long e = __builtin_add_overflow (x, y, &c);
-+ unsigned long f = __builtin_add_overflow (c, a < b, &d);
-+ m = h + ((i + e) + f);
-+ l = d;
-+}
-diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc
-index 51c14d6bad9f..363f31646691 100644
---- a/gcc/tree-ssa-math-opts.cc
-+++ b/gcc/tree-ssa-math-opts.cc
-@@ -4581,6 +4581,7 @@ match_uaddc_usubc (gimple_stmt_iterator *gsi, gimple *stmt, tree_code code)
- if (!INTEGRAL_TYPE_P (type) || !TYPE_UNSIGNED (type))
- return false;
-
-+ auto_vec<gimple *, 2> temp_stmts;
- if (code != BIT_IOR_EXPR && code != BIT_XOR_EXPR)
- {
- /* If overflow flag is ignored on the MSB limb, we can end up with
-@@ -4615,26 +4616,29 @@ match_uaddc_usubc (gimple_stmt_iterator *gsi, gimple *stmt, tree_code code)
- rhs[0] = gimple_assign_rhs1 (g);
- tree &r = rhs[2] ? rhs[3] : rhs[2];
- r = r2;
-+ temp_stmts.quick_push (g);
- }
- else
- break;
- }
-- while (TREE_CODE (rhs[1]) == SSA_NAME && !rhs[3])
-- {
-- gimple *g = SSA_NAME_DEF_STMT (rhs[1]);
-- if (has_single_use (rhs[1])
-- && is_gimple_assign (g)
-- && gimple_assign_rhs_code (g) == PLUS_EXPR)
-- {
-- rhs[1] = gimple_assign_rhs1 (g);
-- if (rhs[2])
-- rhs[3] = gimple_assign_rhs2 (g);
-- else
-- rhs[2] = gimple_assign_rhs2 (g);
-- }
-- else
-- break;
-- }
-+ for (int i = 1; i <= 2; ++i)
-+ while (rhs[i] && TREE_CODE (rhs[i]) == SSA_NAME && !rhs[3])
-+ {
-+ gimple *g = SSA_NAME_DEF_STMT (rhs[i]);
-+ if (has_single_use (rhs[i])
-+ && is_gimple_assign (g)
-+ && gimple_assign_rhs_code (g) == PLUS_EXPR)
-+ {
-+ rhs[i] = gimple_assign_rhs1 (g);
-+ if (rhs[2])
-+ rhs[3] = gimple_assign_rhs2 (g);
-+ else
-+ rhs[2] = gimple_assign_rhs2 (g);
-+ temp_stmts.quick_push (g);
-+ }
-+ else
-+ break;
-+ }
- /* If there are just 3 addends or one minuend and two subtrahends,
- check for UADDC or USUBC being pattern recognized earlier.
- Say r = op1 + op2 + ovf1 + ovf2; where the (ovf1 + ovf2) part
-@@ -5039,7 +5043,17 @@ match_uaddc_usubc (gimple_stmt_iterator *gsi, gimple *stmt, tree_code code)
- g = gimple_build_assign (ilhs, IMAGPART_EXPR,
- build1 (IMAGPART_EXPR, TREE_TYPE (ilhs), nlhs));
- if (rhs[2])
-- gsi_insert_before (gsi, g, GSI_SAME_STMT);
-+ {
-+ gsi_insert_before (gsi, g, GSI_SAME_STMT);
-+ /* Remove some further statements which can't be kept in the IL because
-+ they can use SSA_NAMEs whose setter is going to be removed too. */
-+ while (temp_stmts.length ())
-+ {
-+ g = temp_stmts.pop ();
-+ gsi2 = gsi_for_stmt (g);
-+ gsi_remove (&gsi2, true);
-+ }
-+ }
- else
- gsi_replace (gsi, g, true);
- /* Remove some statements which can't be kept in the IL because they
---
-2.39.3
diff --git a/sys-devel/gcc/files/gcc-14.0.0_pre20231022-PR111860.patch b/sys-devel/gcc/files/gcc-14.0.0_pre20231022-PR111860.patch
deleted file mode 100644
index 42deb046d0f3..000000000000
--- a/sys-devel/gcc/files/gcc-14.0.0_pre20231022-PR111860.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-https://gcc.gnu.org/PR111860
-https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9ed6b22eb4188c57bb3f5cdba5a7effa95395186
-
-From 9ed6b22eb4188c57bb3f5cdba5a7effa95395186 Mon Sep 17 00:00:00 2001
-From: Tamar Christina <tamar.christina@arm.com>
-Date: Mon, 23 Oct 2023 14:07:20 +0100
-Subject: [PATCH] middle-end: don't keep .MEM guard nodes for PHI nodes who
- dominate loop [PR111860]
-
-The previous patch tried to remove PHI nodes that dominated the first loop,
-however the correct fix is to only remove .MEM nodes.
-
-This patch thus makes the condition a bit stricter and only tries to remove
-MEM phi nodes.
-
-I couldn't figure out a way to easily determine if a particular PHI is vUSE
-related, so the patch does:
-
-1. check if the definition is a vDEF and not defined in main loop.
-2. check if the definition is a PHI and not defined in main loop.
-3. check if the definition is a default definition.
-
-For no 2 and 3 we may misidentify the PHI, in both cases the value is defined
-outside of the loop version block which also makes it ok to remove.
-
-gcc/ChangeLog:
-
- PR tree-optimization/111860
- * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
- Drop .MEM nodes only.
-
-gcc/testsuite/ChangeLog:
-
- PR tree-optimization/111860
- * gcc.dg/vect/pr111860-2.c: New test.
- * gcc.dg/vect/pr111860-3.c: New test.
----
- gcc/testsuite/gcc.dg/vect/pr111860-2.c | 17 +++++++++++++++++
- gcc/testsuite/gcc.dg/vect/pr111860-3.c | 17 +++++++++++++++++
- gcc/tree-vect-loop-manip.cc | 21 ++++++++++++++++++++-
- 3 files changed, 54 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.dg/vect/pr111860-2.c
- create mode 100644 gcc/testsuite/gcc.dg/vect/pr111860-3.c
-
-diff --git a/gcc/testsuite/gcc.dg/vect/pr111860-2.c b/gcc/testsuite/gcc.dg/vect/pr111860-2.c
-new file mode 100644
-index 000000000000..07f64ffb5318
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/pr111860-2.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O -fno-tree-sink -ftree-vectorize" } */
-+int buffer_ctrl_ctx_0, buffer_ctrl_p1, buffer_ctrl_cmd;
-+
-+int
-+buffer_ctrl (long ret, int i)
-+{
-+ switch (buffer_ctrl_cmd)
-+ {
-+ case 1:
-+ buffer_ctrl_ctx_0 = 0;
-+ for (; i; i++)
-+ if (buffer_ctrl_p1)
-+ ret++;
-+ }
-+ return ret;
-+}
-diff --git a/gcc/testsuite/gcc.dg/vect/pr111860-3.c b/gcc/testsuite/gcc.dg/vect/pr111860-3.c
-new file mode 100644
-index 000000000000..07f64ffb5318
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/vect/pr111860-3.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O -fno-tree-sink -ftree-vectorize" } */
-+int buffer_ctrl_ctx_0, buffer_ctrl_p1, buffer_ctrl_cmd;
-+
-+int
-+buffer_ctrl (long ret, int i)
-+{
-+ switch (buffer_ctrl_cmd)
-+ {
-+ case 1:
-+ buffer_ctrl_ctx_0 = 0;
-+ for (; i; i++)
-+ if (buffer_ctrl_p1)
-+ ret++;
-+ }
-+ return ret;
-+}
-diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
-index d67c94700144..43ca985c53ce 100644
---- a/gcc/tree-vect-loop-manip.cc
-+++ b/gcc/tree-vect-loop-manip.cc
-@@ -1626,12 +1626,31 @@ slpeel_tree_duplicate_loop_to_edge_cfg (class loop *loop, edge loop_exit,
- 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, 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 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.
-+ In the last two cases we may remove a non-MEM PHI node, but since
-+ they dominate both loops the removal is unlikely to cause trouble
-+ as the exits must already be using them. */
-+ if (virtual_operand_p (new_arg)
-+ && (SSA_NAME_IS_DEFAULT_DEF (new_arg)
-+ || !flow_bb_inside_loop_p (loop,
-+ gimple_bb (SSA_NAME_DEF_STMT (new_arg)))))
-+ {
-+ auto gsi = gsi_for_stmt (phi);
-+ remove_phi_node (&gsi, true);
-+ continue;
-+ }
- new_phi_args.put (new_arg, gimple_phi_result (phi));
-
- if (TREE_CODE (new_arg) != SSA_NAME)
---
-2.39.3