This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/77848] Gimple if-conversion results in redundant comparisons


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

--- Comment #4 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Ah, never mind, I see what's happening.

The order of events is
 * if-conversion
 * loop vectorization
 * DCE
 * cunroll
 * slp vectorization

If we force versioning on with if-conversion, then the loop vectorizer sees
that it can't do anything with the loop, so it folds away the if-converted
version.  Thus SLP never gets a chance to look at the if-converted loop.  So it
seems that always forcing versioning on has an unintended consequence of
missing SLP opportunities.

Should the folding of LOOP_VECTORIZED (1, 2) be deferred to the SLP vectorizer?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]