https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82847
--- Comment #8 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Richard Biener from comment #7) > So a possible fix would be to require vect_perm_short tests to append > appropriate x86 flags for compiling (likewise for vect_perm_byte). > > This particular testcase starts passing when SSSE3 is enabled. > > The situation on x86 is that not all permutation masks are equal so I don't > expect that one can append random subtarget flags enabling or disabling ISAs > and still have all vectorizer tests pass as expected. > > Not sure what the desired way of fixing this is. > > Some targets have things like mips_msa which checks whether -mmsa was given > but x86 has targets like sse4 which checks whether we can assemble SSE4 > instructions (with explicitely adding -msse4). That looks somewhat > inconsistent to me. So we could go for a sse3a_enabled target and condition > vect_perm_short on that. But it would of course be a lie as already SSE2 > can do a subset of short permutes via pshufhw/pshuflw and punpck*, > in fact any short permute should be synthesizable via those. The sse3a_enabled approach sounds best to me FWIW. Adding extra flags would only work for tests with an explicit dg-do, since the default compile/run choice would still depend on the baseline vectorisation flags. sse3a_enabled would work with or without a dg-do.