aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2022-11-11 12:22:33 -0500
committerAndrew MacLeod <amacleod@redhat.com>2022-11-11 14:47:39 -0500
commit0a7b437ca71e2721e9bcf070762fc54ef7991aeb (patch)
tree26b6eaf5a37bec6dff938c9d954f6dbb76de6b1c /gcc/gimple-range.cc
parent52672be7d328df50f9a05ce3ab44ebcae50fee1b (diff)
downloadgcc-0a7b437ca71e2721e9bcf070762fc54ef7991aeb.zip
gcc-0a7b437ca71e2721e9bcf070762fc54ef7991aeb.tar.gz
gcc-0a7b437ca71e2721e9bcf070762fc54ef7991aeb.tar.bz2
Don't add dependencies in update_stmt.
gimple_ranger::update_stmt has no idea what the context of an update is, and should not be adding relations when it re-evaluates a stmt. PR tree-optimization/107523 gcc/ * gimple-range.cc (gimple_ranger::update_stmt): Use fur_stmt rather than fur_depend. gcc/testsuite/ * gcc.dg/pr107523.c: New.
Diffstat (limited to 'gcc/gimple-range.cc')
-rw-r--r--gcc/gimple-range.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc
index 2885d0f..ecd6039 100644
--- a/gcc/gimple-range.cc
+++ b/gcc/gimple-range.cc
@@ -546,7 +546,7 @@ gimple_ranger::update_stmt (gimple *s)
// Re-calculate a new value using just cache values.
Value_Range tmp (TREE_TYPE (lhs));
fold_using_range f;
- fur_depend src (s, &(gori ()), &m_cache);
+ fur_stmt src (s, &m_cache);
f.fold_stmt (tmp, s, src, lhs);
// Combine the new value with the old value to check for a change.