From: Richard Biener Date: Mon, 15 Jun 2026 08:40:10 +0000 (+0200) Subject: Fix VEC_COND_EXPR matching with inverted compare X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b33742aed1176e4701a1daff6c34ff2ca9991be7;p=thirdparty%2Fgcc.git Fix VEC_COND_EXPR matching with inverted compare The following fixes detecting of VEC_COND_EXPR which we recognize in ovce_extract_ops by inverting 'cmp'. But after checking that the false value is {-1,...} we then continue verifying it is also {0,...} which it of course is not. Fixed by checking the true value in that case. * tree-ssa-reassoc.cc (ovce_extract_ops): Fixup false value matching for the inverted comparison case. --- diff --git a/gcc/tree-ssa-reassoc.cc b/gcc/tree-ssa-reassoc.cc index 924742878ea..dec64883891 100644 --- a/gcc/tree-ssa-reassoc.cc +++ b/gcc/tree-ssa-reassoc.cc @@ -4207,7 +4207,7 @@ ovce_extract_ops (tree var, gassign **rets, bool *reti, tree *type, } else return ERROR_MARK; - if (!integer_zerop (f)) + if (!integer_zerop (inv ? t : f)) return ERROR_MARK; /* Success! */