summaryrefslogtreecommitdiff
path: root/0301-Add-required-check-for-iteration-through-uses.patch
diff options
context:
space:
mode:
Diffstat (limited to '0301-Add-required-check-for-iteration-through-uses.patch')
-rw-r--r--0301-Add-required-check-for-iteration-through-uses.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/0301-Add-required-check-for-iteration-through-uses.patch b/0301-Add-required-check-for-iteration-through-uses.patch
new file mode 100644
index 0000000..105f4f7
--- /dev/null
+++ b/0301-Add-required-check-for-iteration-through-uses.patch
@@ -0,0 +1,33 @@
+From ca24d352e98e357f4f7b8f0d262201765705a08a Mon Sep 17 00:00:00 2001
+From: Pronin Alexander <pronin.alexander@huawei.com>
+Date: Thu, 31 Oct 2024 16:31:33 +0800
+Subject: [PATCH 4/6] Add required check for iteration through uses
+
+Signed-off-by: Pronin Alexander <pronin.alexander@huawei.com>
+---
+ gcc/tree-ssa-math-opts.cc | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/tree-ssa-math-opts.cc b/gcc/tree-ssa-math-opts.cc
+index 2c06b8a60..80c06fa01 100644
+--- a/gcc/tree-ssa-math-opts.cc
++++ b/gcc/tree-ssa-math-opts.cc
+@@ -4938,8 +4938,13 @@ convert_double_size_mul (gimple_stmt_iterator *gsi, gimple *stmt)
+
+ /* Find the mult low part getter. */
+ FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, match[3])
+- if (gimple_assign_rhs_code (use_stmt) == REALPART_EXPR)
+- break;
++ {
++ if (!is_gimple_assign (use_stmt))
++ continue;
++
++ if (gimple_assign_rhs_code (use_stmt) == REALPART_EXPR)
++ break;
++ }
+
+ /* Create high and low (if needed) parts extractors. */
+ /* Low part. */
+--
+2.33.0
+