On 8/1/07, Andrew_Pinski@playstation.sony.com > No, this is why we are getting MEM[index:] as generic_type_for for pointer > types is unsigned_type_for and unsigned_type_for returns the same size > integer as the pointer which is not what we want here really. Maybe we > should return the pointer to void type instead? Here is a new patch with an additional comment on why not converting to type is necessary/correct. It also takes into account your comment about create_iv. OK? Bootstrapped and tested on i386-apple-darwin8.10 with no regressions. Thanks, Andrew Pinski * tree-ssa-loop-manip.c (create_iv): Call force_gimple_operand for the step with a NULL_TREE. * tree-ssa-loop-ivopts.c (find_bivs): Convert the step to sizetype if type is a pointer type. (add_candidate_1): Don't convert the base and step to the generic type if the orginal type is a pointer type. (add_iv_value_candidates): Use sizetype for the step if type is a pointer type. (cand_value_at): Likewise. * tree-ssa-address.c (add_to_parts): Use POINTER_PLUS_EXPR for pointer types. * tree-affine.c (tree_to_aff_combination ): Don't convert the tem affine to the type. (add_elt_to_tree): Use sizetype for the step if a pointer. Use POINTER_PLUS_EXPR for pointers. (aff_combination_to_tree): Use sizetype for the step if a pointer.