https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101929

--- Comment #12 from Hongtao.liu <crazylht at gmail dot com> ---

> It's difficult (if not impossible) for the vectorizer to second-guess
> the followup FRE, we're a long way from doing loop + SLP vectorization
> in one go and discover we can elide the vector store.

I'm thinking of adding some detect in the vectorizer to find the "fre pair" of
the new vectorized store and existed vector load, then eliminate vector_store
cost in add_stmt_cost since it's probably be eliminated.

New vector store:  MEM <vector(4) unsigned int> [(unsigned int *)&tmp] =
vect__192.68_825;

Existed vector load below: vect__63.9_482 = MEM <vector(4) unsigned int>
[(unsigned int *)&tmp]

Reply via email to