https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91623
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/optabs.c.jj 2019-08-27 12:26:37.392912813 +0200
+++ gcc/optabs.c 2019-08-31 18:00:59.838412487 +0200
@@ -5868,6 +5868,8 @@ expand_vec_cond_expr (tree vec_cond_type
icode = get_vcond_icode (mode, cmp_op_mode, unsignedp);
if (icode == CODE_FOR_nothing)
{
+ if (tcode == LT_EXPR && op0a == op0)
+ tcode = NE_EXPR;
if (tcode == EQ_EXPR || tcode == NE_EXPR)
icode = get_vcond_eq_icode (mode, cmp_op_mode);
if (icode == CODE_FOR_nothing)
fixes this, though perhaps before doing that we should verify op0a is a vector
constant containing just 0s and -1s.
Or for the VECTOR_CST op0 fold it in the expander.