summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authordberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-27 15:33:51 +0000
committerdberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-27 15:33:51 +0000
commit20743c8aa7b65f7839c71bf4cb88959f739eb57a (patch)
tree7316a4dd4832eb491970ec88bf5e6d47edf076fa /gcc/tree-ssa-loop-niter.c
parent284c96f9f3155dec651373b033f0c633044f9bea (diff)
downloadgcc-20743c8aa7b65f7839c71bf4cb88959f739eb57a.tar.gz
Add missing part of committed patch from 21st
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index b720e194201..6d8b5086de5 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -1437,10 +1437,12 @@ infer_loop_bounds_from_undefined (struct loop *loop)
/* For each array access, analyze its access function
and record a bound on the loop iteration domain. */
- if (TREE_CODE (op1) == ARRAY_REF)
+ if (TREE_CODE (op1) == ARRAY_REF
+ && !ref_contains_indirect_ref (op1))
estimate_iters_using_array (stmt, op1);
- if (TREE_CODE (op0) == ARRAY_REF)
+ if (TREE_CODE (op0) == ARRAY_REF
+ && !ref_contains_indirect_ref (op0))
estimate_iters_using_array (stmt, op0);
/* For each signed type variable in LOOP, analyze its
@@ -1491,7 +1493,8 @@ infer_loop_bounds_from_undefined (struct loop *loop)
for (args = TREE_OPERAND (stmt, 1); args;
args = TREE_CHAIN (args))
- if (TREE_CODE (TREE_VALUE (args)) == ARRAY_REF)
+ if (TREE_CODE (TREE_VALUE (args)) == ARRAY_REF
+ && !ref_contains_indirect_ref (TREE_VALUE (args)))
estimate_iters_using_array (stmt, TREE_VALUE (args));
break;