------- Comment #4 from rguenth at gcc dot gnu dot org 2008-05-02 14:53 ------- It looks sub-optimal. But we should try to figure out why and what is wrong.
The optimality can be fixed with Index: tree-ssa-loop-ivopts.c =================================================================== --- tree-ssa-loop-ivopts.c (revision 134885) +++ tree-ssa-loop-ivopts.c (working copy) @@ -4716,7 +4716,8 @@ try_add_cand_for (struct ivopts_data *da { cand = iv_cand (data, i); - if (cand->iv->base_object != NULL_TREE) + if (cand->iv->base_object != NULL_TREE + || POINTER_TYPE_P (TREE_TYPE (cand->iv->base))) continue; if (iv_ca_cand_used_p (ivs, cand)) or similar. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36038