summaryrefslogtreecommitdiff
path: root/0028-Array-widen-compare-Fix-the-return-value-match-after.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-02-28 10:03:49 +0000
committerCoprDistGit <infra@openeuler.org>2025-02-28 10:03:49 +0000
commit73127104a245052cd5cf29cdaaca3e5c32c70348 (patch)
tree8e28b63e478c43c252f18b49836dff7313affe54 /0028-Array-widen-compare-Fix-the-return-value-match-after.patch
parent49d3feaf4665cdb07576fc1a2382a4d82a612d35 (diff)
automatic import of gccopeneuler24.03_LTS_SP1
Diffstat (limited to '0028-Array-widen-compare-Fix-the-return-value-match-after.patch')
-rw-r--r--0028-Array-widen-compare-Fix-the-return-value-match-after.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/0028-Array-widen-compare-Fix-the-return-value-match-after.patch b/0028-Array-widen-compare-Fix-the-return-value-match-after.patch
new file mode 100644
index 0000000..c5622b8
--- /dev/null
+++ b/0028-Array-widen-compare-Fix-the-return-value-match-after.patch
@@ -0,0 +1,40 @@
+From a89b84cd038e02f0cdafecea1cf337d5f8480683 Mon Sep 17 00:00:00 2001
+From: dingguangya <dingguangya1@huawei.com>
+Date: Fri, 8 Sep 2023 11:55:04 +0800
+Subject: [PATCH] [Array-widen-compare] Fix the return value match after update
+ the get_loop_exit_edges interface
+
+The get_loop_exit_edges interface returns a value type
+from vec<edge> -> auto_vec<edge>
+
+diff --git a/gcc/tree-ssa-loop-array-widen-compare.cc b/gcc/tree-ssa-loop-array-widen-compare.cc
+index ba6170fa0..d27f91f11 100644
+--- a/gcc/tree-ssa-loop-array-widen-compare.cc
++++ b/gcc/tree-ssa-loop-array-widen-compare.cc
+@@ -272,12 +272,12 @@ record_origin_loop_exit_info (class loop *loop)
+ || origin_loop.cond_stmt1 != NULL || origin_loop.cond_stmt2 != NULL)
+ return false;
+
+- vec<edge> exit_edges = get_loop_exit_edges (loop);
++ auto_vec<edge> exit_edges = get_loop_exit_edges (loop);
+ if (exit_edges == vNULL)
+ return false;
+
+ if (exit_edges.length () != 2)
+- goto fail;
++ return false;
+
+ FOR_EACH_VEC_ELT (exit_edges, i, e)
+ {
+@@ -304,8 +304,6 @@ record_origin_loop_exit_info (class loop *loop)
+ && origin_loop.cond_stmt1 != NULL && origin_loop.cond_stmt2 != NULL)
+ found = true;
+
+-fail:
+- exit_edges.release ();
+ return found;
+ }
+
+--
+2.33.0
+