https://gcc.gnu.org/g:b33742aed1176e4701a1daff6c34ff2ca9991be7
commit r17-1563-gb33742aed1176e4701a1daff6c34ff2ca9991be7 Author: Richard Biener <[email protected]> Date: Mon Jun 15 10:40:10 2026 +0200 Fix VEC_COND_EXPR matching with inverted compare The following fixes detecting of VEC_COND_EXPR <cmp, {0,..}, {-1,...}> 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: --- gcc/tree-ssa-reassoc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-reassoc.cc b/gcc/tree-ssa-reassoc.cc index 924742878ea6..dec648838911 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! */
