https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112443
--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> --- The below can fix that, there's typo for 2 splitters. @@ -17082,7 +17082,7 @@ (define_insn_and_split "*avx2_pcmp<mode>3_4" (match_dup 4))] UNSPEC_BLENDV))] { - if (INTVAL (operands[5]) == 1) + if (INTVAL (operands[5]) == 5) std::swap (operands[1], operands[2]); operands[3] = gen_lowpart (<MODE>mode, operands[3]); }) @@ -17112,7 +17112,7 @@ (define_insn_and_split "*avx2_pcmp<mode>3_5" (match_dup 4))] UNSPEC_BLENDV))] { - if (INTVAL (operands[5]) == 1) + if (INTVAL (operands[5]) == 5) std::swap (operands[1], operands[2]); })