diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 01406c6..a9770c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2004-08-24 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> + PR tree-optimization/17016 + * tree-ssa-loop-niter.c (number_of_iterations_cond, + number_of_iterations_exit): Use POINTER_TYPE_P instead + of testing for POINTER_TYPE. + +2004-08-24 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> + * tree-ssa-loop-ivcanon.c: New file. * tree-ssa-loop-manip.c (create_iv): New function. * Makefile.in (tree-ssa-loop-ivcanon.o): Add. diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index af1fbad..caba8b5 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -171,7 +171,7 @@ number_of_iterations_cond (tree type, tree base0, tree step0, return; } - if (TREE_CODE (type) == POINTER_TYPE) + if (POINTER_TYPE_P (type)) { /* We assume pointer arithmetic never overflows. */ mmin = mmax = NULL_TREE; @@ -653,7 +653,7 @@ number_of_iterations_exit (struct loop *loop, edge exit, type = TREE_TYPE (op0); if (TREE_CODE (type) != INTEGER_TYPE - && TREE_CODE (type) != POINTER_TYPE) + && !POINTER_TYPE_P (type)) return false; if (!simple_iv (loop, stmt, op0, &base0, &step0)) |