> >> > > >> > A more stricter test would be > >> > > >> > if (!maybe_eq (max_size1, size1) && !maybe_eq (max_size2, size2)) > >> > return true; > >> > /* If there's a variable access in one of the refs fall through > >> > to access-path based disambiguation. */ > >> > > >> > where you'd need to pass down ao_ref_size in addition to max_size as > >> > well. > >> > >> Proably || here? > > > > Hmm, !maybe_eq () -> ! max_size1 == size1 -> max_size != size1 thus > > I think && is correct if you want to disambiguate a[1].v2 and a[i].v1 > > > > But yes, if you don't want that then || is cheaper. Probably add > > another testcase with one of the accesses with a constant index? > > Might be misunderstanding, but isn't the check for a variable access > !known_eq (max_size1, size1) == maybe_ne (max_size1, size1)? "maybe_eq" > means "could be equal in some circumstances, even if they're not always > equal".
Seems I am getting progressively more confused. I think I want to pass the size down from ao_ref to the functions and then see if they are always equal. Why would I want to use maybe variant? Honza > > Richard