https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126332
--- Comment #6 from Drea Pinski <pinskia at gcc dot gnu.org> --- (In reply to Richard Biener from comment #5) > That said, why's the load commoning not done earlier in phiopt3? (not > that it would help) Currently it is limited to non-loops for phiopt2/3 as doing it in phiopt2/3 for some loops will make some loops unvectorizable. (an example is eembc's viterb00; see https://github.com/llvm/llvm-project/issues/219918 where GCC currently can vectorize the loop at -O3 but LLVM fails due to load commoning). Maybe a better heurstics is needed for loops and vectorization. Maybe we can see if the pointer has a well defined scev and reject it then. Let me try this coming week.
