https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90610
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- Testing Index: gcc/match.pd =================================================================== --- gcc/match.pd (revision 271644) +++ gcc/match.pd (working copy) @@ -5453,8 +5453,8 @@ (define_operator_list COND_TERNARY first vector we only can insert the first elt from the first vector. */ at = 0; - ins = fold_read_from_vector (cop0, 0); - op0 = op1; + if ((ins = fold_read_from_vector (cop0, 0))) + op0 = op1; } else {