https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115484
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|AVX vectorization is |if-to-switch prevents AVX |limited to 3 comparisons |vectorization Ever confirmed|0 |1 Last reconfirmed| |2024-06-14 Blocks| |53947 Keywords| |missed-optimization Status|UNCONFIRMED |NEW Target| |x86_64-*-* --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue seems to be that if-to-switch creates a switch () once you get to four conditions and switch statements are not handled by the pre-vectorizer if-conversion (or by vectorization natively). Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations