34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
|
|
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
|
||
|
|
|