https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101058
--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Jakub Jelinek from comment #8) > Though, when this *punpckwd define_insn_and_split handles all possible > constant permutations for V2HImode, shouldn't ix86_vectorize_vec_perm_const > say so: > case E_V2HImode: > if (!TARGET_SSE2) > return false; > + /* All implementable with *punpckwd. */ > + if (d.testing_p) > + return true; > break; > ? Yes, we can add this optimization. V2HImode is actually mentioned a couple of lines below, where it is claimed that it is fully implementable for one operand.