https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111683
--- Comment #25 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 22 Mar 2024, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111683 > > --- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > (In reply to Richard Biener from comment #23) > > It looks like this could go to suitable_reference_p instead? > > You mean return false for those making them not suitable at all? > I thought without a write such references would act more like RS_ANY, but > a reason I didn't just treat such references as RS_ANY rather than RS_NONZERO > in suitable_reference_p was because of the assert that all refs in a component > have the same ref_step_type but nothing actually comparing it before the > assertion. Hmm, true. > But if you think I should just return false from suitable_reference_p if the > step isn't a multiple of the sizes, I can surely try that. > > > That said, I do wonder why with my patch split_data_refs_to_components > > doesn't fixup. I think it's supposed to handle the case where > > dependences are unknown conservatively... > > I'm afraid I'm not familiar with data refs enough to know what was going on. I tried to follow what happens there and I'm also somewhat lost. Anyway, I think fixing this in predcom in a convenient place even if it might be not the true fix is OK. You might want to put a comment before any such fix indicating there might be more latent issues in predcom or dependence analysis in general.