Hello, > I cannot see how fold-const.c:try_move_mult_to_index ever > successfully will do a transformation if the loop > > for (;; ref = TREE_OPERAND (ref, 0)) > { > if (TREE_CODE (ref) == ARRAY_REF) > { > ... > break; > } > > if (!handled_component_p (ref)) > return NULL_TREE; > } > > will not break in the first iteration. What kind of complex > trees are we trying to match here?
for example struct x { int x; int y; } a[1000]; &a[i].x + 8 * j is transformed to &a[i+j].x Zdenek